Here is what I want to do; I want to trim out all unwanted sections of an audio file at once. Is there an application that allows you to input time intervals (start and end) for all unwanted sections. Then at the click of a button or press of a key, all the sections would be trimmed out (deleted) leaving the remaining portions merged as a single file. Any suggestions? Thanks in advance.

  • Controlling it programmatically? Or just a software able to do that "moving around things with the mouse" by a human? Commented Sep 8, 2022 at 20:17

1 Answer 1


You can do this with Python and MoviePy, (which behind the scenes will use FFMPEG), just the other way round! To be specific you specify your audio file as an input and the time stamps of all of the segments that you wish to keep then generate a new file as the output.

All of the above are:

  • Free, Gratis & Open Source
  • Cross Platform

Of course you can do the same thing with FFMPEG manually but I personally find that harder to use.

An example:

from moviepy.editor import *
orig = AudioFileClip('02 Nightmares.mp3')
orig.duration # Lets me see how long the original is 278.44 seconds in this case
clips = []
for start, end in [(0.0, 10.0), (15, 25), (40, 50)]: # My list of start/end times
    clips.append(orig.subclip(start, end))
final = concatenate_audioclips(clips)
final.write_audiofile("../test.mp3")  # or where you would like to save it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.