Martin Cooper's Linux Blog

All things Linux …

mp3gain

I normally use the GUI version of this program to level the gain on mp3 music files but I wanted to do the same job automatically in a small script to level out all my podcasts in their seperate folders prior to loading them onto my mp3 player.

The values I use are;

-c : ignore clipping
-p : preserve file modification time
-r : apply Track gain
-d 6.0: makes it 95.0 dB (defaults to 89.0)

The script I use moves to the main Podcast folder then line of script finds all mp3’s in the sub-folders with it.

$ cd /home/martin/Podcasts

$ find . -name *.mp3 -exec mp3gain -c -p -r -d 6.0 ‘{}’ \;

This then levels out the gain on all podcasts to 95db.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: