LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView to grab and save video to mpeg?

I've used LabView to grab and save video to .avi files (which are quite large), then compressed the files.  Is it possible to grab and save directly to a .mpeg file type?
0 Kudos
Message 1 of 13
(9,213 Views)
LabVIEW can directly save to compressed avi's (I'm assuming you have the vision module), which depending on the codec and settings, can be higher quality and much smaller than classical mpegs (avi files can also use a mpeg codec). Many codecs may not compress fast enough to handle to streaming a video acquisition though. You'll need to sure who ever needs to read the avi's has the required codec.

A good codec that shouldn't too hard to setup and test is XviD (which is mpeg4 compatible). Install it and go to configure encoder set it to
Profile @ Level: unrestricted
Encoding type: Single Pass
Target quantizer: 4.00 (change this to change the quality)
Quality Preset: Real-time (general purpose is higher quality but may not stream well).

On the IMAQ AVI create node set the compression filter to
Xvid MPEG-4 Codec
(you can use IMAQ AVI Get filter names for a list of installed codecs)

I use ffdshow (the tryouts version)which adds several (20+) codecs. But ffdshow can be quite intimidating (lots and lots of options). For the vision avi functions to work right with it, you have to set it so the codec you want to is only available through the vfw interface,  I use the huffyuv codec contained in it since I need lossless videos. It also adds mpeg, h. 264, flv (flash videos like on you tube) and several of the windows media format ones. ffdshow also includes a XviD codec, and can run on windows, mac (it's in the perian codec pack) and linux. For transcoding my videos (if I want to recompress them). I use mencoder (since it's much easier to get what I want than changing ffdshow's compressor settings).


Matt W
0 Kudos
Message 2 of 13
(9,210 Views)

Thanks Matt; this sounds like useful information I will digest and probably try out.

Fred

0 Kudos
Message 3 of 13
(9,183 Views)

HI FREDJ

can you share some light on how to compress .avi file??

Regards
0 Kudos
Message 4 of 13
(8,915 Views)
Hey nolsqn,

If you have NI Vision Development Module installed, you can just follow the steps found in this NI KnowledgeBase article: Writing a Compressed AVI File with IMAQ Vision.


Message Edited by Bolin on 06-27-2008 06:00 PM
Chris Bolin
LabVIEW Partner Program, CLA
0 Kudos
Message 5 of 13
(8,894 Views)

hi fredj

thanx it was really helpfull

 

 

Regards
0 Kudos
Message 6 of 13
(8,801 Views)

HI Matt W.

I'm wondering if you have ever got the Xvid codec to work as the compression filter in Labview?  I installed Xvid, but can't get it to show up in the Get Filter Names block.

Thanks

Stephen

0 Kudos
Message 7 of 13
(8,113 Views)

Hi,

 

How to split audio or sound from a mpeg video stream? Is it required to use vision module for this? 

 

thanks in advance

0 Kudos
Message 8 of 13
(7,568 Views)

Hi Karkera, 

 

It seems you are making progress in your original thread. 

 

We should probably keep this topic there. 

 

 

Jesse Dennis
Engineer
INTP
0 Kudos
Message 9 of 13
(7,543 Views)

For the Xvid MEPG 4 decoder have been installed in my computer but the VI(IMAQ AVI2 Get codc name)can not list this decoder name. So may i ask how can you use this decoder in labview.

 

Thanks

Daniel

0 Kudos
Message 10 of 13
(6,499 Views)