[MEncoder-users] No sound from USB webcam

Hatto von Hatzfeld hatto at salesianer.de
Sun Feb 17 19:24:35 CET 2008


I have got here a Logitech usb webcam (Deluxe for Notebooks, vendor / 
product ID 046d:09c1). It needs the uvcvideo driver and therefore the 
driver v4l2. With help from "lsusb -v" I have found out that the video 
chip supports 640x480 pixel and its built-in microphone 16 Bit and 16kHz.

I managed (on my OpenSuSE 10.3) to capture a video clip without sound 
using this command:

mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 
-fps 15 -nosound -ovc lavc -o test.avi

(The "-fps 15" I found after some experiments - using higher values made 
the clip replay too fast.)

I can capture sound (without video) from the ALSA device using this 
command:

arecord -d 10 -f S16_LE -c 1 -r16000 -t wav -D hw:1,0 test.wav

This confirms the data I have got from "lsusb -v".

Using audacity I can capture sound from the OSS device /dev/dsp1, and 
skype (beta) is able to capture sound from "hw:U0x46d0x9c1,0" (and to 
capture the video stream, too).

MY PROBLEM: How to capture a video clip with sound? 

Here what I have tried without any success:

mencoder tv:// -tv 
driver=v4l2:width=640:height=480:device=/dev/video0:alsa:forceaudio:amode=0:adevice=hw.1
-fps 15 -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o testsnd.avi

mencoder tv:// -tv 
driver=v4l2:width=640:height=480:device=/dev/video0:alsa:forceaudio:amode=0:adevice=hw.1,0 
-fps 15 -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o testsnd.avi

mencoder tv:// -tv 
driver=v4l2:width=640:height=480:device=/dev/video0:amode=0:adevice=/dev/dsp1:forceaudio
-fps 15 -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o testsnd.avi

I added ":audiorate=16000" to the tv options, but in all these cases the 
command simply failed.

I tried to add ":immediatemode=1" in the same way (maybe I misunderstood 
this parameter); in this case the the video stream is captured but no 
sound.

Any hints?

Hatto



More information about the MEncoder-users mailing list