[FFmpeg-user] Using ffmpeg to remove commercials from video file

Werner Robitza werner.robitza at gmail.com
Sat Aug 17 09:58:50 CEST 2013

> For the record - my final script is this - if someone else should need to
> try the same thing. It took a bit of trial'n error to figure out the
> correct
> syntax and usage of the -to switch.

Where is your script?

> At some point I would like to use a different switch than -to since it
> takes
> a /duration/ and not a specific time in the movie - hence forcing me to
> calculate this duration. But that's for (another) rainy day.

-to does not take a duration – it takes the timestamp of where you would
encoding to end. This is exactly the option you need.

-t takes the encoding duration. Depending on your programming/scripting
language of choice it's rather easy to calculate the difference between two
HH:MM:SS.mmmm timestamps.

More information about the ffmpeg-user mailing list