I am trying to record a video clip, using my webcam, but sound synchronisation is always poor. I have used Cheese, UCView and VLC. One possible cause is explained in the reply to this question, but I am not an expert.
In desperation, I now want to try ffmpeg. The ffmpeg documentation gives the following exampleMy system has no /dev/dsp, but does have /dev/snd with these filesCode:ffmpeg -f oss -i /dev/dsp -f video4linux2 -i /dev/video0 /tmp/out.mpgBy running alsamixer, I have nutted out that controlC0 refers to the HDA Intel sound card, controlC1 is my USB webcam and controlC29 is the microphone built in to my notebook.Code:$ ls /dev/snd by-id by-path controlC0 controlC1 controlC29 hwC0D0 pcmC0D0c pcmC0D0p pcmC0D1p pcmC1D0c seq timer
Using a reasonable guess for someone not used to the sound system, I tried thisAfter a couple of other attempts, I tried dropping the '-f oss' parameter and sawCode:$ ffmpeg -f oss -i /dev/snd/controlC29 -f video4linux2 -i /dev/video0 /tmp/out.mpg FFmpeg version SVN-r24044, Copyright (c) 2000-2010 the FFmpeg developers built on Jul 21 2010 15:03:32 with gcc 4.5.0 20100716 (Red Hat 4.5.0-3) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --extra-version=rpmfusion --enable-bzlib --enable-libdc1394 --enable-libdirac --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect libavutil 50.20. 0 / 50.20. 0 libavcodec 52.79. 1 / 52.79. 1 libavformat 52.73. 0 / 52.73. 0 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1.20. 1 / 1.20. 1 libswscale 0.11. 0 / 0.11. 0 libpostproc 51. 2. 0 / 51. 2. 0 [oss @ 0x13a46c0] Soundcard does not support 16 bit sample format /dev/snd/controlC29: Input/output errorAttempting to use alsa resulted inCode:$ ffmpeg -i /dev/snd/controlC29 -f video4linux2 -i /dev/video0 /tmp/out.mpg <snip> /dev/snd/controlC29: Operation not permittedI am unwilling to blindly edit the file /etc/modprobe.d/dist-oss.conf because it warnsCode:$ ffmpeg -f alsa -i /dev/snd/controlC29 -f video4linux2 -i /dev/video0 /tmp/out.mpg FFmpeg version SVN-r24044, Copyright (c) 2000-2010 the FFmpeg developers built on Jul 21 2010 15:03:32 with gcc 4.5.0 20100716 (Red Hat 4.5.0-3) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --extra-version=rpmfusion --enable-bzlib --enable-libdc1394 --enable-libdirac --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect libavutil 50.20. 0 / 50.20. 0 libavcodec 52.79. 1 / 52.79. 1 libavformat 52.73. 0 / 52.73. 0 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1.20. 1 / 1.20. 1 libswscale 0.11. 0 / 0.11. 0 libpostproc 51. 2. 0 / 51. 2. 0 ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM /dev/snd/controlC29 [alsa @ 0x14c46c0] cannot open audio device /dev/snd/controlC29 (No such file or directory) /dev/snd/controlC29: Input/output errorI think my question boils down to "How do I record a video clip on Fedora 14 using ffmpeg?", but I am specifically interested in knowing how to specify a sound input device for my system.Code:# OSS Sound Support # This has been disabled in F11 onwards because it can interfere with the # PulseAudio sound service (a legacy OSS application can prevent PulseAudio # applications from playing sound by preventing PulseAudio from (re-)opening # the sound device). To re-enable support, uncomment the following line:
Cheers, Doug


Reply With Quote

