[FFmpeg-user] Removing parts of a video using the select filter

Rob Hallam ffmpeg at roberthallam.com
Sun Jan 9 14:38:04 EET 2022


On Sun, 9 Jan 2022 at 11:34, Michael Koch <astroelectronic at t-online.de> wrote:

> Is it possible to re-encode only the beginning and the end, and use
> -codec copy for the central part?

How apropos! *

I've been trying to do essentially this for years- it was the reason I
subscribed to and posted to this list initially. It would be great to
have a mode which has the frame-exact + sync nature of a re-encode,
without the re-encode!

The trouble I've run into the few times I've tried it is that when I
try and glue the parts back together via concat, things do not work
nicely. Perhaps if there were a way to replicate all the codec
properties of the original stream when re-encoding, it might work; but
it's also possible that something else like PTS would throw it off.

Rob

* typed and posted while waiting on ffmpeg to visually "losslessly"
re-encode so that I can do a frame exact cut, currently at 0.601x
realtime


More information about the ffmpeg-user mailing list