Friday, February 15, 2008

Command Line Video Capture Linux

You can use v4lctl to select channel or input on the card. streamer from Xawtv is an easy command line to use but it doesn't have audio compression. ffmpeg can grab audio and compress it. I didn't have luck with their built-in audio codecs. So I downloaded and compiled lame into it.

The audio devices change from -f audio_device to -f oss . I used a quick shell script to find that mpeg2video offers the best compression without overtaxing the Athlon 1400 processor.

ffmpeg -t 00:00:10 -s 640x480 -r 30 -f video4linux -i
/dev/video0 -b 400k -vcodec mpeg2video -ac 2 -f oss -i /dev/dsp
-acodec libmp3lame -y tensec.mpg

For compressing DVDs to iPod format, don't forget to specify the -ac 2 flag to downsample from typical 5.1 audio.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home