Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This says to use /dev/dsp as the audio input. But I don't have a /dev/dsp I can find my webcam's mic in /dev/snd as /dev/snd/by-id/usb-Dynex_Dynex_1.3MP_Webcam-02

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The /dev/dsp device comes from the old Open Sound System drivers, which are deprecated these days. The devices you've listed support the newer ALSA API, so can't be used with ffmpeg's oss decoder.

Instead follow the instructions in the other question, but modify the command to:

ffmpeg -f alsa -i $ALSA_DEVICE_NAME ...

Where $ALSA_DEVICE_NAME is the device name displayed by arecord -L that corresponds to your webcam. It will likely list a few options for the webcam, but picking the one starting with hw: or plughw: should be fine.

share|improve this answer
    
Thank you! You're exactly correct. For the record (since good ffmpeg recipes are nice to stumble across), here's me recording a ten second video-audio clip from my webcam: ffmpeg -f alsa -i "plughw:CARD=Webcam,DEV=0" -f video4linux2 -vcodec mjpeg -s 640x480 -i "/dev/video0" -y -t 10 -sameq "/tmp/test.mp4" –  John Baber Apr 8 '12 at 4:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.