LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read AVI Example.vi error #1074395975

Hi Beuvink,

 

Since this is an old post and a new question, it would be best to start a new thread.  You will get more views and it will help us keep each thread to a single question.

 

What do you mean that some frames work and others do not?  When converting from MPG4 to AVI you only get every other frame?  How are you performing this conversion?

Justin D.

Applications Engineer
National Instruments
0 Kudos
Message 11 of 13
(957 Views)

Hi Justin,

 

I did reply tho this thread as in my case this is not a major issue. I still use an old version of Labview (8.6) and the stripped-down vision stuff that comes installed standard. So this is not the latest version (maybe it is already solved in the current generations).

 

What I need to do is match some prototype sensor data to things that really happen (detecting and classify cars), for this the sensor was placed in a setup for many days and for some periods a video was made. Some video was grabbed with a very simple webcam and some was grabbed with a security camera, stored digitally in MPG4 format. These security cameras are normal video ans thus interlaced.

 

I did something like this in the past where I made a video-browser that uses the AVI file to grab an image at a pre-defined timestamp and some UI to browse around the event moment (subsecond browsing in a >10hr AVI file doesn't work that well in most video software....). I don't care that much for performance (getting one frame from a video file is much slower then playing it due to the compression algo's).

 

I converted the MPG4 files using Pazera Free to MJPEG (I also tried other formats but this was the best pick) and every other frame I get an 'time out error' as described in this thread. After a while this jumps from odd to even frames. The AVI info functions returns 49fps which is strange because for a video camera it should be 50fps, so I think there is a rounding error somewhere and the jump will odd/even will probably be related to this. I think there is a mistake somewhere in field/frame information but the vision stuff is a dll wrapper around directX and I can't look inside these wrapper dll's. I also didn't check my DirectX version, AVI encoding/decoding stuff etc.

 

I did find a work around: I import the converted MPG4 files into windows movie maker and create a new AVI file (@30fps). This destroys the image quality but these files seem to work fine.

 

A way to get the same error is try to get a frame that has a number equal to or higher then the number of frames in the file.

 

For me the problem is 'solved' and since this thread is no longer that active I assume that the problem is also solved in newer Labview/vision versions.

 

Kind regards,

 

Mark 

 

---

25+ years long fan of LabVIEW. Move to Emerson looks to be for the better! See the last posts in subscription model thread.
0 Kudos
Message 12 of 13
(950 Views)

Hi beuvink,

 

Do you know what avi codec are you using when you convert from the MPG4 file to AVI? There are some codecs that work much better in LabVIEW than others.

 

Also, I noticed that you were using Pazera Free to MJPEG converter, is there a reason why you aren't using the Pazera MP4 to AVI converter?

 

In terms of your application, are you just trying to synchronize each frame from the video with corresponding data? If so, it might be easier for you to leverage an external media player through ActiveX. In particular, Quicktime is able to play MP4 files and go frame by frame in LabVIEW.

 

Paul M

National Instruments | Applications Engineer | www.ni.com/support
0 Kudos
Message 13 of 13
(938 Views)