[FFmpeg-user] Random repetitions in output

Moritz Barsnick barsnick at gmx.net
Mon Nov 6 15:25:01 EET 2017


On Mon, Nov 06, 2017 at 13:46:29 +0100, Carl Eugen Hoyos wrote:
> > It seems the image2 muxer uses the framerate reported by the
> > demuxer (but as cfr).
> 
> This is wrong, the image2 muxer does not know anything about
> the input frame rate.

Hmm. Even if I avoid testsrc (in case it is not quite a demuxer, but
rather a filter chain element) and go through an "external file", the
image2 muxer reports use of the same framerate as the input:

$ ffmpeg -f lavfi -i testsrc=r=25 -t 1 -f matroska - | ffmpeg -i - testimage_%03d.png
[...]
Output #0, image2, to 'testimage_%03d.png':
  Metadata:
    encoder         : Lavf58.0.102
    Stream #0:0: Video: png, rgb24, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc58.1.100 png
frame=   25 fps=0.0 q=-0.0 Lsize=N/A time=00:00:01.00 bitrate=N/A speed=2.86x
video:447kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

$ ffmpeg -f lavfi -i testsrc=r=30 -t 1 -f matroska - | ffmpeg -i - testimage_%03d.png
[...]
Output #0, image2, to 'testimage_%03d.png':
  Metadata:
    encoder         : Lavf58.0.102
    Stream #0:0: Video: png, rgb24, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc (default)
    Metadata:
      encoder         : Lavc58.1.100 png
frame=   30 fps=0.0 q=-0.0 Lsize=N/A time=00:00:01.00 bitrate=N/A speed=2.48x
video:529kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

In both cases, the image2 muxer reports using the framerate which the
matroska demuxer identified. It must have that info from somewhere. Did
it look at the timestamps of the packets passing in?

Moritz


More information about the ffmpeg-user mailing list