[FFmpeg-user] Removing parts of a video using the select filter
Michael Koch
astroelectronic at t-online.de
Sun Jan 9 13:33:51 EET 2022
Am 09.01.2022 um 11:43 schrieb MacFH - C E Macfarlane - News:
> On 08/01/2022 23:43, amindfv--- via ffmpeg-user wrote:
>>
>> On Sat, Jan 08, 2022 at 08:20:46PM +0000, MacFH - C E Macfarlane -
>> News wrote:
>>>
>>> To select parts of a video, I use ...
>>>
>>> FFMPEG -ss <start-time> -i <input> -codec copy -to <end> <output>
>>>
>>> ... however it's tedious, because with this method the video will
>>> only break
>>> at certain points between compression units (can't remember the proper
>>> terminology), and it can take some experimentation to find the precise
>>> timing of these to get the audio right as well, and often, because
>>> of the
>>> way the compression works, the first extracted frame is often an
>>> unwanted
>>> last frame of a previous scene.
>>>
>>> I have long lamented that FFMPEG doesn't make this both easier and
>>> to allow
>>> greater resolution, if necessary recreating the start and end
>>> compression
>>> units to get the exact timing wanted.
>>
>> If you get rid of the "-codec copy" you can have any precision you'd
>> like.
>
> But the entire video will be re-encoded, which is undesirable because,
> as the codecs use lossy compression, there will be further degradation
> of the entire video clip just gain some precision at each end.
Is it possible to re-encode only the beginning and the end, and use
-codec copy for the central part?
Michael
More information about the ffmpeg-user
mailing list