[FFmpeg-user] Let ffmpeg pick correct fps from stdin

Moritz Barsnick barsnick at gmx.net
Fri Jan 15 11:22:54 CET 2016


On Fri, Jan 15, 2016 at 09:56:43 +0000, Carl Eugen Hoyos wrote:
> You should not use the input option "-r" unless you 
> know exactly what you do, always use "-framerate".

I don't think all demuxers have implemented "-framerate" yet:

$ ffmpeg -framerate 1 -probesize 100k -i https://localhost/cgi-bin/nph-mjprox?1
ffmpeg version N-77840-gcc538e9 Copyright (c) 2000-2016 the FFmpeg developers
  built with icc (ICC) 14.0.3 20140422
  configuration: --prefix=/usr/new/tools/video/install/ffmpeg/2016-01-14 --cc=icc --cxx=icpc --enable-gpl --enable-version3 --enable-nonfree --disable-shared --enable-gnutls --enable-libcdio --enable-libfreetype --enable-libx264 --enable-libvpx --enable-libmp3lame --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtwolame --enable-libopenjpeg --enable-librtmp --enable-libass --enable-libv4l2 --enable-libvidstab --enable-libfdk-aac --enable-libsmbclient --enable-libquvi --enable-libzvbi --enable-libtesseract --enable-libzmq
  libavutil      55. 13.100 / 55. 13.100
  libavcodec     57. 22.100 / 57. 22.100
  libavformat    57. 21.101 / 57. 21.101
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 23.100 /  6. 23.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Option framerate not found.
$ ffmpeg -r 1 -probesize 100k -i https://localhost/cgi-bin/nph-mjprox?1
ffmpeg version N-77840-gcc538e9 Copyright (c) 2000-2016 the FFmpeg developers
  built with icc (ICC) 14.0.3 20140422
  configuration: --prefix=/usr/new/tools/video/install/ffmpeg/2016-01-14 --cc=icc --cxx=icpc --enable-gpl --enable-version3 --enable-nonfree --disable-shared --enable-gnutls --enable-libcdio --enable-libfreetype --enable-libx264 --enable-libvpx --enable-libmp3lame --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtwolame --enable-libopenjpeg --enable-librtmp --enable-libass --enable-libv4l2 --enable-libvidstab --enable-libfdk-aac --enable-libsmbclient --enable-libquvi --enable-libzvbi --enable-libtesseract --enable-libzmq
  libavutil      55. 13.100 / 55. 13.100
  libavcodec     57. 22.100 / 57. 22.100
  libavformat    57. 21.101 / 57. 21.101
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 23.100 /  6. 23.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[mjpeg @ 0xb889280] Changing bps to 8
Input #0, mpjpeg, from 'https://localhost/cgi-bin/nph-mjprox?1':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 640x480 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 25 tbn, 25 tbc
At least one output file must be specified

(Shouldn't is report "1 fps" instead of "25 fps" if I specify "-r 1" as
input option?)

Moritz


More information about the ffmpeg-user mailing list