[FFmpeg-user] Removing parts of a video using the select filter
Simon van Bernem
simon.vanbernem at yahoo.de
Sun Jan 9 13:48:25 EET 2022
My specific usecase is removing multiple parts
of a video. So e.g. I want to "remove the part
from 0:10 to 0:15 and the part from 1:15 to 4:10 and the part from 10:00 to the end".
How would that look like with this approach?
Can you have multiple -ss and -to pairs?
Can you express to discard a section, not keep
it?
Regards,
Simon
>
> Am 09.01.2022 in 12:39, Stephen Liu via ffmpeg-user <ffmpeg-user at ffmpeg.org> schrieb:
>
>
> Hi,
> I run following command on Terminal to trim a section of the video (for VCD video):-
> $ ffmpeg -i imput.VOB -target pal-vcd -ss 00:02:10 -to 00:03:18 -c:v copy -c:a copy output.VOB
>
> -ss starting time (hrs:min:sec)
> -to stop time (hrs:min:sec)
>
> This command line works for me seamlessly.
>
> Regards
>
> On Sunday, January 9, 2022, 06:43:39 PM GMT+8, MacFH - C E Macfarlane - News <news at macfh.co.uk> wrote:
>
> 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.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-user
mailing list