[FFmpeg-user] Image extraction broken with ffmpeg, but not with mencoder. How can I fix this?
krueger at lesspain.de
Thu Sep 5 13:41:15 CEST 2013
On Thu, Sep 5, 2013 at 1:11 PM, Tom Evans <tevans.uk at googlemail.com> wrote:
> On Wed, Sep 4, 2013 at 9:46 PM, James Board <jpboard2 at yahoo.com> wrote:
>> I consulted the documentation. It doesn't explain why how '-vsync 0' stops
>> ffmpeg from artificially inserting duplicate frames into your output image files.
>> If you think the documentation does explain this, them point out which sections
> The vsync section in the manual describes the behaviour of the
> different vsync options.
> "0" passes through each frame with its timestamp to the muxer. This
> means if your source is VFR then you will not have a CFR output. If
> you were transcoding video+audio, this would probably result in audio
> "1" will duplicate and/or drop frames as needed in order to have the
> required output fps. Eg, if a section of the VFR video is 10fps, and
> the requested ofps is 25fps, then ffmpeg will duplicate frames to get
> the desired fps, and avoid audio desynch. This produces CFR files.
> "2" can drop frames and/or pass them through with their timestamps to
> the muxer. This enables the muxer to generate VFR files.
> The default is "-1", which intelligently chooses between "1" and "2"
> based upon the capabilities of the muxer you are feeding. So if you
> don't want duplicates or dropped frames, you must not use "-1", "1" or
> So why do you get the dupes. It would seem like your input video is
> VFR, and you are outputting to image2, which is a CFR muxer, so ffmpeg
> is duplicating frames to get your requested output.
> BTW, this seemed quite clear to me from the docs for vsync. Could you
> suggest any improvements that would have made it clearer for you?
> The linked ticket explains the reasoning for this. This is effectively
> your position:
>> Yeah I agree that for most people, their default thought is
>> "I'm converting to images? It will output one output image per
>> input frame" so +1 from me for making -vsync vfr default in this case... :)
Just as one sampling point: For me it is the expected/intuitive
behavior for the image2 demuxer (just to emit the images as they are)
as well and I can understand his astonishment as I have run into that
myself in the past. Having said that, with any default you decide for,
you will normally have people disagreeing and you either vote or let
someone who feels responsible (maintainer) decide and trust them.
More information about the ffmpeg-user