trimming a video

Sometimes you want to trim videos at the command line, my workflow goes like this, figure out where I want the vid to start and end, and then run the following command:

ffmpeg -i input.mp4 -ss 00:01:00 -to 00:01:30 -c copy output.mp4

This will trim the video from 1:00 to 1:30, resulting in a 30-second clip.

Also note that you can leave off leading zeros in the time format so you could get 13 to 57 seconds with ffmpeg -i input.mp4 -ss 13 -to 57 -c copy output.mp4.


edit this page