[FFmpeg-user] frame accurate durations

Chris Vincze chris-v at moving-picture.com
Wed May 30 00:28:36 CEST 2012


Yes, I would have thought that as this is a transcode, rather than a vcodec copy, especially to an i-frame codec, that ffmpeg would need to retain the full frame information in the buffer. Also, the source file has keyframes every 25 frames and the segments are only ever out by a frame. Out of 12 segments it's usually missing around 5 frames, which doesn't seem to tally with what it would be if it was a keyframe issue.

I'll try running this again with an i-frame source and see what happens.

Thanks for your responses

Chris

________________________________________
From: Florian Vallée [florian at ey3ball.net]
Sent: 29 May 2012 22:51
To: FFmpeg user questions and RTFMs
Subject: Re: [FFmpeg-user] frame accurate durations

On Tue, May 29, 2012 at 10:55 PM, Belcampo <belcampo at zonnet.nl> wrote:
> This can only be done this way if all frames are i-frames/keyframes. NON-All-Keyframe files you only can 'split' at
> a i-frame/keyframe and often they are not a 'regular' intervals.

I'm not sure that's true,

Since he is re-encoding the stream here, he can use -ss option as an
output option. This way ffmpeg can cut on an arbitrary frame because
it will decode the whole stream prior to cutting. Since all frames are
decoded, it can stop on any.

The issue with this method is that each invocation of ffmpeg will need
to re-decode the whole stream up to the cut point, which can be slow
if you wish to cut far ahead in the file.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


More information about the ffmpeg-user mailing list