(FFmpeg) How to trim ‘x’ seconds from start and end of an audio track?

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

In this example, the input file is 1 minute long with the requirement of 10 seconds removed from the start and 10 seconds removed from the end of the audio. Resulting in a new 40 second audio clip:

$ ffmpeg -t 00:00:50 -i input.mp3 -ss 00:00:10 -async 1 output.mp3    

In question “How to trim ‘x’ seconds from the end of a track?”, using a smaller duration time than the input audio resulted in causes the end of the audio to be trimmed. 

In question “How to trim ‘x’ seconds from the start of an audio track?”, we learned that through the use of seeking, trimming the start of an audio track is achieved. 

Together, the two can easily manipulate the length of audio quickly and easily.

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