Discussion:
other avi codecs?
(too old to reply)
kelly.dorgan
2006-04-17 22:10:07 UTC
Permalink
I am recording video from an IEEE-1394 camera and have tried all the codecs available but none seem to work well. The problem with most of them is that the video is jerky, I think the time to compress the video is longer than the frame rate so it's missing some images. The only compression filter that works well is DV Video Encoder, however, the videos end up with 720 x 480 resolution no matter what the resolution on the camera is set to. I need to have higher resolution videos that are good quality. I tried Microsoft RLE with the highest quality set but the video is jerky and the files are huge (lower quality images are pixely). Can I download other codecs that would work with LabView? I'm using LabView 7.1.1. Would upgrading to LabView 8 help? Part of the problem is that my camera is 8-bit grayscale but the AVIs are RGB, so the files are really big. Can LabView 8 make grayscale AVIs?
Thanks!
Little A
2006-04-18 18:10:10 UTC
Permalink
Hello,
There are a few things that we can look at.  To answer your question about codecs, I have a few suggestions and questions.  What is your frame rate and at what resolution?  Is the video less "jerky" if you do not compress the video?  How many frames are you trying to acquire and save?
 
A quick search about the DV Video Encoder confirms that this particular filter does have a resolution specification which is why your resolution is being limited.  The codecs that you can use with the write avi functions are DirectShow compatible, so it is possible that you may be able to download other codecs that may work.  The codecs are not related to the version of LabVIEW you are using, so I do not believe changing LabVIEW versions would affect this.  The AVI VIs are included with Vision.  I do not think there is a way to save an AVI with only 8-bit depth, this is one of the specifications of an AVI.
 
I hope this helps to answer your questions.  Let me know if you have any other questions about this issue.
Regards,
Angela M.
Applications Engineer
NI
 
 
Josh Meisner
2006-06-30 17:10:09 UTC
Permalink
Hi,
 
I've stuggled with this problem for a few years. The best option I have found for high quality video with relatively small size is a unique version of DIVX using the ffdshow video encoder. Essentially&nbsp;ffdshow allows you to adjust the encoder properties of any codec (as they were meant to be adjusted). LabVIEW has never developed a vi to be able to adjust the codec parameters properly. Anyhow, if you download the Cole2K media encoder pack (<a href="http://www.cole2k.net/?display=Codec-Pack-Advanced" target="_blank">here</a>) and install it. It will allow you to select and adjust any codec you have on your computer and adjust it's parameters through the start/programs/cole2k media-codec pack/ffdshow VFW. I would suggest using the mpeg4, divx, one=pass constant quality (~85) setting from the generic menu. (yields&nbsp;&gt;= dvd quality video with ~1.5Gb/hr compression)
&nbsp;
You will be able to record very fast (I've tested up to 25 fps for 640 by 480, and 10 fps for 1200 by 1600) video with very good quality and compression. However, the recorded file may not load in IMAQ AVI Read.vi. This has to do with the fact it will try to use the ffdshow video decoder instead of the proper codec (i.e. DivX in the example setting). I hope this helps you and anyone else interested in video codecs and compression.
&nbsp;
The ultimate solution to your problem lies in the fact that a&nbsp;*.vi was never designed to access and adjust the video codec encoder parameters. This is a solution I would suggest&nbsp;advising to any supporting NI applications engineers. It appears in almost every video editing software I have ever run across, so I would suspect it would be easy to access and adjust (perhaps even active X in the case of divx or some of the other more popular codecs.)
&nbsp;
Good luck, hope this helps,
&nbsp;
Josh Meisner

zou
2006-04-18 18:10:08 UTC
Permalink
Have you tried divX?&nbsp; It reduces avi size quite lot.

George Zou
http://gtoolbox.yeah.net
kelly.dorgan
2006-04-19 22:10:10 UTC
Permalink
Thanks for the replies.&nbsp;I'm taking high resolution (1280 x 960 or 1024 x 768) images at 7.5 frames/sec. I generally record about 5 minute video sequences, so if&nbsp;I don't use a compression filter, the files get very large very fast and eventually freeze LabView.&nbsp;&nbsp;I have tried several more&nbsp;codecs that I downloaded and they all seem to be jerky or they just freeze LabView (with DivX the program froze after one frame). The best one I've found so far is FastCodec by VideoSoft.org...&nbsp;I think it's a little jerky when I record and I tried&nbsp;reading and writing frames to a new AVI using that codec and then playing it back and it played fine at half speed but was jerky at full speed.&nbsp;I'm not sure if the problem is that I just haven't found a fast enough codec to keep up with the frame rate or if my computer isn't fast enough. I'm using Windows XP on a 4 year old laptop with a 1.6 GHz processor and 512 MB memory. Can anyone recommend a fast codec for recording high resolution video?
Thanks!
kelly.dorgan
2006-04-20 21:40:08 UTC
Permalink
Thanks for the Huffyuv site... that codec seems to work well. The problem I'm having now is that the videos play correctly in windows media player, but in LabView (using Read AVI Example), they are playing too slow (takes about 1.5 times as long as it should)&nbsp;and a little jerky. The same thing is happening when I use FastCodec as well. Videos that are uncompressed or compressed using DV Video Encoder play&nbsp;well in LabView. Any idea what's wrong?
Thanks!
Continue reading on narkive:
Loading...