Alex Balgavy

Just some stuff about me.

Here's my dotfiles repository.

Check out my blog.

My keys: PGP, SSH

My crypto wallets (BTC, XMR)

ffmpeg how to trim x seconds from the start and end of a video

Written by John Riselvato - original link

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.