NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Member
FredJ
Posts: 3
0 Kudos

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?
Active Participant
Matt_W1
Posts: 319
0 Kudos

Re: LabView to grab and save video to mpeg?

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
Member
FredJ
Posts: 3
0 Kudos

Re: LabView to grab and save video to mpeg?

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

Fred

Active Participant
nolsqn
Posts: 272
0 Kudos

Re: LabView to grab and save video to mpeg?

HI FREDJ

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

Regards
Member
chris.b
Posts: 168
0 Kudos

Re: LabView to grab and save video to mpeg?

[ Edited ]
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
Active Participant
nolsqn
Posts: 272
0 Kudos

Re: LabView to grab and save video to mpeg?

hi fredj

thanx it was really helpfull

 

 

Regards
Member
stephen_waterloo
Posts: 1
0 Kudos

Re: LabView to grab and save video to mpeg?

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

Member
Karkera
Posts: 18
0 Kudos

Re: LabView to grab and save video to mpeg?

Hi,

 

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

 

thanks in advance

Active Participant
Jesse_D
Posts: 486
0 Kudos

Re: LabView to grab and save video to mpeg?

Hi Karkera, 

 

It seems you are making progress in your original thread. 

 

We should probably keep this topic there. 

 

 

Jesse Dennis
Design Engineer
Erdos Miller
Member
Daniel_Weng
Posts: 13
0 Kudos

Re: LabView to grab and save video to mpeg?

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