[FFmpeg-trac] #7771(undetermined:new): Unable to set frame rate received from camera

FFmpeg trac at avcodec.org
Tue Mar 5 13:18:17 EET 2019

#7771: Unable to set frame rate received from camera
             Reporter:  lhastie      |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
 I have a USB camera that is capable of H.264 on-board compression.  I use
 the following FFmpeg command line to grab the encoded H.264 from the
 camera at 30fps and a resolution of 1280x720, and put it in a 'flv'

 ffmpeg -y -f dshow -video_size 1280x720 -framerate 30 -vcodec h264 -i
 video="USB Camera" -vcodec copy
  -copyinkf -f flv c:\temp\test.flv

 The problem is that the FFmpeg input stream seems to think it is receiving
 30fps but the actual output from FFmpeg shows only 5fps.  See FFmpeg
 standard output below :

 ffmpeg -y -f dshow -video_size 1280x720 -framerate 30 -vcodec h264 -i
 video="USB Camera" -vcodec copy -copyinkf -f flv c:\temp\test.flv[[BR]]

 ffmpeg version N-93252-gf948082e5f Copyright (c) 2000-2019 the FFmpeg
   built with gcc 8.2.1 (GCC) 20190212
   configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
 fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
 libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame
 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
 --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
 --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
 libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
 --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
 --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-
 nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
   libavutil      56. 26.100 / 56. 26.100
   libavcodec     58. 47.102 / 58. 47.102
   libavformat    58. 26.101 / 58. 26.101
   libavdevice    58.  6.101 / 58.  6.101
   libavfilter     7. 48.100 /  7. 48.100
   libswscale      5.  4.100 /  5.  4.100
   libswresample   3.  4.100 /  3.  4.100
   libpostproc    55.  4.100 / 55.  4.100
 Input #0, dshow, from 'video=USB Camera':
   Duration: N/A, start: 2445085.764000, bitrate: N/A
     Stream #0:0: Video: h264 (Main) (H264 / 0x34363248), yuv420p,
 1280x720, '''30 fps''', 30 tbr, 10000k tbn, 20000k tbc
 Output #0, flv, to 'c:\temp\test.flv':
     encoder         : Lavf58.26.101
     Stream #0:0: Video: h264 (Main) ([7][0][0][0] / 0x0007), yuv420p,
 1280x720, q=2-31, '''30 fps''', 30 tbr, 1k tbn, 10000k tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
 Press [q] to stop, [?] for help
 frame=   60 '''fps=5.7''' q=-1.0 Lsize=    1324kB time=00:00:11.79
 bitrate= 919.5kbits/s speed=1.12x
 video:1322kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.109154%

 Not sure if there is something I am missing on the command line?  Any
 suggestions would be much appreciated.

Ticket URL: <https://trac.ffmpeg.org/ticket/7771>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list