Skip to content

Instantly share code, notes, and snippets.

@himattm
Created March 7, 2022 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save himattm/fc03d3bef73ec7fcd8ce0f968720c6cb to your computer and use it in GitHub Desktop.
Save himattm/fc03d3bef73ec7fcd8ce0f968720c6cb to your computer and use it in GitHub Desktop.
Uses ffmpeg to convert mp4 to mp3 and also truncate silences
#!/bin/bash
for i in *.mp4
do
#ffmpeg -i "$i" "${i%mp4}mp3" # Convert mp4 to mp3
ffmpeg -i "$i" -af silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-55dB "removed_silence_${i%mp4}mp3"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment