[FFmpeg-user] How to cut selected parts of ffmpeg output

John Finlay finlay at moeraki.com
Sun Nov 3 06:00:44 CET 2013


On 11/2/2013 9:23 AM, Thierry Lelegard wrote:
> Hello,
>
> Is there a way to cut selected parts of the ffmpeg output stream?
>
> Typically, this would be used to remove parts of a TV recording, the extra
> start and end and all ads in the middle. For instance, is there a way to
> say: skip from second 0 to 45.7, then keep until second 1234.6, then
> skip until second 1347.4, then keep until second 2345.3, finally skip
> until the end. Any other way of specifying the skip/keep point would be
> ok of course.
>
> The skip/keep points must apply on the output to keep the best accuracy
> (not limited to intra frames) and to stay synchronized with external
> subtitle files (subtitles/ass video filters).
>
> I have not found anything in the documentation but it is so rich that
> I may have missed the right method.
>
> Thanks for any hint.
> -Thierry

You could try cutting the video using the segment muxer using the 
segment_times option to specify the times to split the video at. Then 
select the segments you want to keep and combine them using the concat 
protocol.

John


More information about the ffmpeg-user mailing list