Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

labview froze while writing avi

I was grabbing video from my IEEE1394 camera and writing each image to an avi file when labview froze. At the point it froze, I had created an avi file, written a bunch of images to it using a while loop, but not stopped it, therefore running the "close avi" sub-VI. I now have a 4GB file that I can't open with windows media player or with labview's open avi sub-VI. Is there any way to get the images off the file or to fix the avi?
0 Kudos
Message 1 of 4
(4,329 Views)
Unfortunately, it sounds like the file may have been corrupted somehow, in which case it would be unretrievable. what kind of message do you get when you try to open it?

4GB is a huge file. Were you using and compression when writing the AVI? Here is a link on compression functions available in LabVIEW for AVI files:

http://digital.ni.com/public.nsf/websearch/0A4D5BF47FD3FF0186256E9A004FD671?OpenDocument

If you are already compressing it, you may want to break it up and write to smaller files if possible.
0 Kudos
Message 2 of 4
(4,311 Views)
The error message I get when I try to open the file in labview with the open avi sub-VI is 1074395993 IMAQ Vision: (Hex 0xBFF604A7) File I/O Error. Is there another way to try to open it?
I haven't been compressing the video, although I'm rapidly filling my hard drive. How do you know which one to use? I'm going to be thresholding my video, possibly within a smaller region of interest, and looking at number of pixels lighter than my threshold value over time. I'm not sure how the compression filters work and don't want to lose any data. Do you have any recommendations? Here are the filters I have available: DV Video Encoder, Indeo® video 5.10 Compression Filter, MJPEG Compressor, Pinnacle DCxx MJPEG Compressor, Cinepak Codec by Radius, Intel Indeo(R) Video R3.2, Intel Indeo® Video 4.5, Indeo® video 5.10, Intel IYUV codec, Microsoft RLE, Microsoft Video 1, Microsoft Windows Media Video 9. When I try to play my bad avi file in windows media player, it gives me an error that it can't read the file and suggests I may be using an incompatible codec... are all of the codecs available compatible with windows media player?
Thanks for your help!
0 Kudos
Message 3 of 4
(4,303 Views)
kelly.dorgan -

Unfortunately, since the AVI file was not closed correctly, I don't know of any way to get the images out of it.

Windows Media Player is compatible with all of the compressors IMAQ Vision can use - the reason that it didn't work on your AVI file is that it is corrupt. Different compressors have different characteristics, including speed of writing, file size, and quality. I'd recommend running the Compressor Comparison example that ships with Vision to get an idea of the various tradeoffs.

Greg Stoll
IMAQ R&D
National Instruments
Greg Stoll
LabVIEW R&D
0 Kudos
Message 4 of 4
(4,297 Views)