Skip to content

(FFmpeg) How to Trim ‘x’ Seconds From the Start and End of a Video?

The last two questions covered trimming the start of a video and trimming the end of a video, but what does the command look like combined? 

In this example, the input file is 5 minutes long with the requirement of 15 seconds to be removed from the start and 1 minute to be removed from the end. Resulting in a new 3 minute and 45 second video clip:

  $ ffmpeg -t 00:04:00 -i input.mp4 -ss 00:00:15 -async 1 output.mp4   

Together, with the use of -t and -ss, the manipulation of the video length is quick and easy.

Love FFmpeg? Grab a copy of FFmpeg For Beginners on Kindle or Paperback to learn over 120 ways to master FFmpeg!

buy now on amazon