Normalize a Directory of mp3s

By  on  

Back in the early days of Napster, Kazaa, eMule, and other file sharing networks, I would download as many apps, movies, game, and movies as possible.  My illegal downloading was out of control; I would get DMCA notices from my ISP for apps and games I had no intention of using -- I would simply download them because I could.  And when someone finally cracked the holy grail, Half-Life 2, I was in heaven!

Getting apps and games to work required keygens and cracks, which was a fun challenge, but one annoyance was that pirated mp3 volume always seemed to be different.  One mp3 would be quiet, the next would super loud, and so on, so each song would require me to man the volume controls like a DJ.  Today I download mp3s from YouTube and still the volume is different from source to source, thus I'm still needing to adjust volume while I drive or code.  Ugh!

Since the same volume problem exists today from my YouTube downloads, I searched for command line utility to equalize mp3 volume and the winner was mp3gain.  With mp3gain you can equalize a directory of mp3s from command line with ease!

# From the mp3s' containing directory
mp3gain -r *.mp3

# 2Pac - Dear Mama.mp3
# Applying mp3 gain change of -4 to 2Pac - Dear Mama.mp3...
# Orestes - A Perfect Circle.mp3
# Applying mp3 gain change of -4 to Orestes - A Perfect Circle.mp3...
# Adele - Rolling in the Deep.mp3
# Applying mp3 gain change of -4 to Adele - Rolling in the Deep.mp3...

mp3gain will analyze all mp3s for volume, create a baseline, and equalize the volume in all mp3 files.

If you're hosting a party or simply don't want to be a slave to the volume knob, check out mp3gain.  Of course we shouldn't whine about free music but hey -- we're tech savvy and know how to get what we want.  The audio volume level issue isn't one that will go away any time soon so keep mp3gain in your toolbox!

Recent Features

Incredible Demos


  1. Unfortunately normalization (optimizing the peak signal level) has no consistent relationship to the overall loudness of a track. Peak optimization and perceived loudness are two different things.
    The perception of loudness is related to sound pressure level, frequency and duration of a sound.
    You should look into automated methods to equalize sound pressure levels.

  2. I remember downloading a client (forget the name) for Linux that allowed me to purchase songs off iTunes in Linux. It took a lot of work to give Apple my money, but I wanted to pay for the music.

    A lot of the music files (still) don’t have metadata (a setback from using that client)

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!