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

Rob Hallam ffmpeg at roberthallam.com
Mon Jun 13 12:42:55 EEST 2022


On Mon, 13 Jun 2022 at 10:40, Cecil Westerhof via ffmpeg-user
<ffmpeg-user at ffmpeg.org> wrote:
> I know that because of iframes you need to put the inputfile before
> the start and to parameters if you want to sure that the start time is
> correctly used. Because of this I defined the following function.

(snip)

Have you tried seeking (-ss) before input to test if it is accurate
enough for you? It would certainly be faster.

https://trac.ffmpeg.org/wiki/Seeking

> As of FFmpeg 2.1, when transcoding with ffmpeg (i.e. not just stream copying), -ss is now also "frame-accurate" even when used as an input option. Previous behavior (seeking only to the nearest preceding keyframe, even if not precisely accurate) can be restored with the -noaccurate_seek option.

Cheers,
Rob


More information about the ffmpeg-user mailing list