How to cut using ffmpeg using start and end time not duration?

Viewed 4900

I have seen many links that shows specifying the start time and duration but I want to specify the start and end time. From example from 5 min mark to 12 min mark. How to do this using ffmpeg?

2 Answers

Basic syntax is

ffmpeg -ss START -to END -i input ... {rest of parameters}

You need to use the to command-line parameter which denotes the end time. Also, while the cutting operation is simple, be sure to figure out if you only want to copy the portion you are interested in (less accurate) or if you want to re-encode it.

Here is a link that explains several options (input seeking, output seeking, and frame-accurate cutting using re-encoding).

Related