Monday, December 15, 2008

Capturing webcam video and audio on Linux

This post is for those who may have tried luvcview or some other, but can't work out how to capture both video and audio from a UVC standard compliant webcam. I've been Googling around and seen a lot of questions and a modest number of almost-useful answers.

I use a UVC compliant / conforming Logitech QuickCam E 3500 webcam on Ubuntu Linux 8.10.
I have installed ffmpeg and all the gstreamer packages - "good", "bad" and "ugly".

This command worked fine for me:

ffmpeg -f video4linux2 -s 640x480 -r 25 -i /dev/video0 -f oss -i /dev/dsp1 /home/steve/test.mpg

Once you have it going, you can then tweak / adjust video and sound codecs and see how that works for you. The command above creates an mpeg file, with good light and good sound I can then import directly into my video editing software (kino, kdenlive - whatever) and use.

1 comment:

  1. thanks, the ffmpeg command works great, after lots of unsuccessful trials with camorama, gqcam etc. very helpful =)

    ReplyDelete

Thanks for deciding to share your thoughts here. In commenting on this blog, you can express any opinion you like, though any opinion expressed should make some attempt to be consistent with verifiable reality. Say what you like, confident that I won't delete any comments that are polite and respectful of me and others who may comment here. Civility aside, SPAM comments will be deleted if only because they are usually far too long and selling rubbish anyway. (Comments on posts older than 30 days are moderated. I'll approve them as soon as I can.)