LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reading frames in avi files

Solved!
Go to solution

When reading large AVI files, I get an error when trying to read frame 870 or higher: 

 

Error -1074395967 occurred at IMAQ AVI2 Read Frame

Possible reason(s):

IMAQ Vision: (Hex 0xBFF604C1) Error reading AVI frame

 

Is this a limitation of the system? I have the problem even when using the AVI read example.

Message 1 of 29
(8,265 Views)

Hard to tell without seeing the code.  There should be no reason you can read 869 frames, but not 870.  Could be an "out-of-memory" error (are you allocating a separate image buffer for each frame? 870 image buffers might take a bit of memory, but hard to assess without code).

 

BS

0 Kudos
Message 2 of 29
(8,248 Views)

I tried it on another machine and get the same result.

 

It looks like a memory problem with the "IMAQ AVI2 Open" vi: everything works fine as long as the AVI file is smaller then about 2 Gb. When the file is larger, this vi takes a long time to load and the system later gives an error at frame 870 (or 869 once).

 

You can try it with the example vi "Read AVI example" vi (or the express version: both have the problem). 

 

Luc

Message 3 of 29
(8,239 Views)

I don't have many AVI files that large!  I did find one that is 6 Gb, a 1280 by 720 color Motion JPEG file encoded at 30 frames per second (and playing back much slower -- I'm only up to 250 frames and it's been playing 2 minutes), but it seems to be working with Read AVI Example.

 

What are your other image parameters (Height, Width, Codec, B/W or Color)?  Does changing them make a difference?

 

In the Spring, NI updated the AVI functions (they now say AVI2).  If you are still having problems, the original AVI functions are there (somewhere) as AVI1 functions -- perhaps they will work.

 

Well, I've just passed 10 minutes, 1300 frames, and the progress bar is less than 20% across, so I'm going to Send this now and stop the program ...

 

BS

0 Kudos
Message 4 of 29
(8,233 Views)
Solution
Accepted by topic author lucchris

I tried slowing down the playback (2 frames/sec it wa) but it still stopped at frame 870.

 

I then replaced the AVI2 vi's with AVI vi's: everything works fine now! The opening of the file now also goes quick.

 

I also tried the 64 bit version of LabView but with the original AVI2 files it too stopped at fram 870!

Message 5 of 29
(8,216 Views)

If you have a Support Contract and can go to Support.ni.com and "Contact an Engineer", I suggest that you report this "feature" of the new AVI2 Read function (although NI may already be aware of it).  

Message 6 of 29
(8,206 Views)

I also get this problem LabView hangs after frame 3872. There is a bug in this function.

Message 7 of 29
(8,176 Views)

It was reported to NI and a Corrective Action Request (403508) was issued.

 

The problem seems to come from mixing the "old" vi's with the "new" AVI2 vi's.

0 Kudos
Message 8 of 29
(8,171 Views)

I have to disagree. I do not use old functions. The test program is very simple (see the picture). But video contains over 60,000 images (640x480, 8-bit grayscale, no compression). This example hangs on image 3474.

 

Sampe Programm

Message 9 of 29
(8,161 Views)

I'm having the same problem. My video file size is 4Gb. I'm trying to read frame 5000 (there are 15,000 frames in the file). I had absolutley no issues with the older AVI blocks. I decided to replace them with the AVI2 set and now it just hangs. I'm using Labview 2013, anyone know if the issue has been fixed with the 2014 update?

Message 10 of 29
(7,658 Views)