[FFmpeg-user] Better way to cut parts out of a long video?

Rob Hallam ffmpeg at roberthallam.com
Mon Jun 13 13:51:47 EEST 2022

On Mon, 13 Jun 2022 at 11:26, Cecil Westerhof via ffmpeg-user
<ffmpeg-user at ffmpeg.org> wrote:
> That could very seldom work, but is certainly not a general solution.
> In the past I was told to do it like this because it was faster. Then
> I got problems with the output and was told how iframes work.

What problems, exactly? Do they still occur with modern versions of
ffmpeg, and with the inputs and outputs you are using?

I wrote a small script a while ago to "find the nearest keyframe in
the input video before the point I want the output video to start" so
that ti could be used for input seeking. However, that was a long time
ago, and for the purposes of stream-copied (ie not re-encoded) output.
I have not had any reason to use it recently.

You could try 'combined seeking':

My understanding is that seeking after input requires reading (and
decoding?) frames, which is why it is much slower.


More information about the ffmpeg-user mailing list