I want to record video as well as audio from webcam using ffmpeg,
I have used the following codes to know what devices are available:
ffmpeg -list_devices true -f dshow -i dummy
And got the result:
ffmpeg version N-54082-g96b33dd Copyright (c) 2000-2013 the FFmpeg developersbuilt on Jun 17 2013 02:05:16 with gcc 4.7.3 (GCC)configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zliblibavutil 52. 37.101 / 52. 37.101libavcodec 55. 16.100 / 55. 16.100libavformat 55. 8.103 / 55. 8.103libavdevice 55. 2.100 / 55. 2.100libavfilter 3. 77.101 / 3. 77.101libswscale 2. 3.100 / 2. 3.100libswresample 0. 17.102 / 0. 17.102libpostproc 52. 3.100 / 52. 3.100[dshow @ 024eb460] DirectShow video devices[dshow @ 024eb460] "Sirius USB2.0 Camera"[dshow @ 024eb460] "Vimicro USB Camera (Altair)"[dshow @ 024eb460] DirectShow audio devices[dshow @ 024eb460] "Microphone (Realtek High Defini"dummy: Immediate exit requested
I am using the following codes to get more details about the device:
ffmpeg -f dshow -list_options true -i video="Vimicro USB Camera (Altair)"
And i am getting the following results:
ffmpeg version N-54082-g96b33dd Copyright (c) 2000-2013 the FFmpeg developersbuilt on Jun 17 2013 02:05:16 with gcc 4.7.3 (GCC)configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zliblibavutil 52. 37.101 / 52. 37.101libavcodec 55. 16.100 / 55. 16.100libavformat 55. 8.103 / 55. 8.103libavdevice 55. 2.100 / 55. 2.100libavfilter 3. 77.101 / 3. 77.101libswscale 2. 3.100 / 2. 3.100libswresample 0. 17.102 / 0. 17.102libpostproc 52. 3.100 / 52. 3.100[dshow @ 0249b3e0] DirectShow video device options[dshow @ 0249b3e0] Pin "Capture"[dshow @ 0249b3e0] pixel_format=yuyv422 min s=640x480 fps=30 max s=640x480 fps=30[dshow @ 0249b3e0] pixel_format=yuyv422 min s=640x480 fps=30 max s=640x480 fps=30[dshow @ 0249b3e0] pixel_format=yuyv422 min s=352x288 fps=30 max s=352x288 fps=30[dshow @ 0249b3e0] pixel_format=yuyv422 min s=352x288 fps=30 max s=352x288 fps=30[dshow @ 0249b3e0] pixel_format=yuyv422 min s=320x240 fps=30 max s=320x240 fps=30[dshow @ 0249b3e0] pixel_format=yuyv422 min s=320x240 fps=30 max s=320x240 fps=30[dshow @ 0249b3e0] pixel_format=yuyv422 min s=176x144 fps=30 max s=176x144 fps=30[dshow @ 0249b3e0] pixel_format=yuyv422 min s=176x144 fps=30 max s=176x144 fps=30[dshow @ 0249b3e0] pixel_format=yuyv422 min s=160x120 fps=30 max s=160x120 fps=30[dshow @ 0249b3e0] pixel_format=yuyv422 min s=160x120 fps=30 max s=160x120 fps=30video=Vimicro USB Camera (Altair): Immediate exit requested
When i am trying following codes to get video and audio stream:
ffmpeg -f dshow -s 320x240 -r 30 -vcodec mjpeg -i video="Vimicro USB Camera (Altair)" e:\output.mp4
I am getting an error message as "Could not set video optionsvideo=Vimicro USB Camera (Altair): Input/output error"
Following are the error details:
ffmpeg version N-54082-g96b33dd Copyright (c) 2000-2013 the FFmpeg developersbuilt on Jun 17 2013 02:05:16 with gcc 4.7.3 (GCC)configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zliblibavutil 52. 37.101 / 52. 37.101libavcodec 55. 16.100 / 55. 16.100libavformat 55. 8.103 / 55. 8.103libavdevice 55. 2.100 / 55. 2.100libavfilter 3. 77.101 / 3. 77.101libswscale 2. 3.100 / 2. 3.100libswresample 0. 17.102 / 0. 17.102libpostproc 52. 3.100 / 52. 3.100[dshow @ 002f78e0] Could not set video optionsvideo=Vimicro USB Camera (Altair): Input/output error
And i am unable to find where i am doing wrong.
So if anybody can find where i am doing wrong or how to record video as well as audio from webcam using ffmpeg please help me to solve this problem.