Skip to content

Instantly share code, notes, and snippets.

@Gen2ly
Created May 31, 2012 15:44
Show Gist options
  • Save Gen2ly/2844272 to your computer and use it in GitHub Desktop.
Save Gen2ly/2844272 to your computer and use it in GitHub Desktop.
Define normalization levels in mp3s (album-specifically)
#!/bin/bash
# Define normalization levels in mp3s (album-specifically)
audio_dir=~/Audio # Audio directory
sub_dir_inc=(Audiobooks Music Podcasts) # Sub-directories good to keep seperate
cd "$audio_dir"
for d in "${sub_dir_inc[@]}"; do
# -a keep gain even relative to albums, -k lower to not clip, -T modify orgin
# -d adjust volume by decibel amount (volume low on PSP)
find "$d" -name "*.mp3" -exec mp3gain -a -k -T -d 4 "{}" \;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment