[FFmpeg-user] ffplay -f dshow -vcodec mjpeg fails?

Roger Pack rogerdpack2 at gmail.com
Tue Oct 2 03:07:03 CEST 2012


The following works, and selects the "mjpeg" input from a webcam:

$ ffmpeg -f dshow -vcodec mjpeg  -i video="USB Video Device" -vcodec
copy yo.mjpeg

However the same command for ffplay seems to fail:

$ ffplay -f dshow -vcodec mjpeg  -i video="USB Video Device"
ffplay version N-44264-g070b0e1 Copyright (c) 2003-2012 the FFmpeg developers
  built on Sep  7 2012 17:35:17 with gcc 4.7.1 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-pthreads
--enable-runtime-cpudetect --enable-avisynth --enable-bzlib
--enable-frei0r --enable-libass --enable-libcelt
--enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libfreetype --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libopenjpeg --enable-librtmp
--enable-libschroedinger --enable-libspeex --enable-libtheora
--enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs
--enable-libxvid --enable-zlib
  libavutil      51. 72.100 / 51. 72.100
  libavcodec     54. 55.100 / 54. 55.100
  libavformat    54. 25.105 / 54. 25.105
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 16.100 /  3. 16.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Unrecognized option 'vcodec'
Failed to set value 'mjpeg' for option 'vcodec'

So I suppose the question is...is ffplay in the wrong here, or dshow?
What should be done to make it possible to specify a webcam's input
format when shown through ffplay?
-roger-

ffmpeg output:



C:\dev\dirt-simple-usb-surveillance\vendor\ffmpeg>ffplay yo.mjpeg
ffplay version N-44264-g070b0e1 Copyright (c) 2003-2012 the FFmpeg developers
  built on Sep  7 2012 17:35:17 with gcc 4.7.1 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-pthreads
--enable-runtime-cpudetect --enable-avisynth --enable-bzlib
--enable-frei0r --enable-libass --enable-libcelt
--enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libfreetype --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libopenjpeg --enable-librtmp
--enable-libschroedinger --enable-libspeex --enable-libtheora
--enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs
--enable-libxvid --enable-zlib
  libavutil      51. 72.100 / 51. 72.100
  libavcodec     54. 55.100 / 54. 55.100
  libavformat    54. 25.105 / 54. 25.105
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 16.100 /  3. 16.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[mjpeg @ 0238f8c0] Estimating duration from bitrate, this may be inaccurate
Input #0, mjpeg, from 'yo.mjpeg':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj422p, 640x480, 25 fps, 25 tbr,
1200k tbn, 25 tbc
Frame changed from size:0x0 to size:640x480B vq=  222KB sq=    0B f=0/0
   2.49 A-V:  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0   0/0


More information about the ffmpeg-user mailing list