[FFmpeg-user] Copy from mjpeg USB camera stream to file

Aviv Hurvitz aviv.hurvitz at gmail.com
Wed Jul 26 01:21:36 EEST 2017


I want to copy the original stream without any transcoding or processing.
I'm on Windows. I got this far:

>ffmpeg -y -f dshow -vcodec mjpeg -s 640x480 -framerate 30 -i
video="Integrated Camera" -vcodec copy  test.avi
ffmpeg version N-86848-g03a9e6f Copyright (c) 2000-2017 the FFmpeg
developers
  built with gcc 7.1.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda
--enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx
--enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig
--enable-frei0r --enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype
--enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
--enable-libzimg --enable-lzma --enable-zlib
  libavutil      55. 68.100 / 55. 68.100
  libavcodec     57.102.100 / 57.102.100
  libavformat    57. 76.100 / 57. 76.100
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 95.100 /  6. 95.100
  libswscale      4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, dshow, from 'video=Integrated Camera':
  Duration: N/A, start: 27503.402000, bitrate: N/A
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc,
bt470bg/unknown/unknown), 640x480, 30 fps, 30 tbr, 10000k tbn, 10000k tbc
Output #0, avi, to 'test.avi':
  Metadata:
    ISFT            : Lavf57.76.100
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc,
bt470bg/unknown/unknown), 640x480, q=2-31, 30 fps, 30 tbr, 60 tbn, 60 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame=   56 fps=8.0 q=-1.0 Lsize=    4470kB time=00:00:06.89
bitrate=5306.9kbits/s speed=0.989x
video:4455kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.343590%

Note on the last line my fps=8.0 while the input is 30 fps. How can I fix
this?
Thank you.


More information about the ffmpeg-user mailing list