Skip to content

Instantly share code, notes, and snippets.

@evadecker
Created November 23, 2018 21:16
Show Gist options
  • Save evadecker/d49738402295a1a16afcebea1055da05 to your computer and use it in GitHub Desktop.
Save evadecker/d49738402295a1a16afcebea1055da05 to your computer and use it in GitHub Desktop.
Trim start/end silence on audio files
# This will overwrite the original file! Be careful!
# I use ZSH. If you use Bash, the syntax will be different here.
# Options:
# Change -20dB to whatever threshold you consider "silent" to be.
for file in *.mp3; ffmpeg -y -i $file -af silenceremove=1:0:-20dB ${file%.mp3}.mp3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment