[FFmpeg-user] frame accurate durations

Florian Vallée florian at ey3ball.net
Tue May 29 23:51:17 CEST 2012

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.

More information about the ffmpeg-user mailing list