psych-major
02-20-2007, 04:03 PM
Having moved from Windows to Linux full time on my personal/work laptop, I noticed that Mp3 relative volume, i.e. gain, was not managed as automagically as it had been in iTunes. So, off to Google for a solution...
The following assumes that Mp3 playback is already enabled for your distro, which is a separate issue that is well documented elsewhere...
There are several apps suitable for this task; mp3gain is what we will use here...
First, download the appropriate version of mp3gain for your distro. The sourceforge site seems to have only Windows versions, but I have found pre-compiled packages for Slackware (http://platinum.linux.pl/download/linux/slackpkg/mp3gain-1.4.6-i686-1.tgz), and Debian/Ubuntu users can grab it from the package manager. There are also RPM files for RedHat/SuSE (http://rpm.pbone.net/index.php3).
After mp3gain is installed, it can be used from the command line with something like the following:
find /path/to/mp3/directory -type d -exec sh -c "cd \"{}\" && mp3gain -r -T *.mp3" \;This command will search for all mp3 files recursively under the directory you entered, and for each one it finds, it will cd into that directory and run the mp3gain command with the switches -r and -T. -r tells mp3gain to normalize all mp3 files relative to each other, and the -T does so directly in the file, without making a copy first. Feel free to read the man page of mp3gain and adjust as needed.
There is also a GUI front-end to mp3gain; JavaMP3Gain, which can be downloaded here (http://step.polymtl.ca/~guardia/archives/JavaMP3Gain_20040902_3.zip).
Once you have downloaded and unzipped it, copy the file JavaMP3Gain.jar to a logical location, such /home/username/apps.
You can then launch it from the command line with the following:
java -jar /home/username/apps/JavaMP3Gain.jarOr you can create a shortcut or menu entry with the same command.
Either way, you will get a nice, no-frills GUI with the basic options covered. Simply choose your options, and click 'Start'
*Permissions - Note, the user running mp3gain must have write privileges to the mp3 files being modified.
That's it, depending on the number of mp3's and the speed of your PC, within a few minutes you should have them all set to the same relative gain, and you will no longer need to reach for the volume every time a new song comes up!
Also of note, if your iPod is mounted, you can run mp3gain against it, too...;)
The following assumes that Mp3 playback is already enabled for your distro, which is a separate issue that is well documented elsewhere...
There are several apps suitable for this task; mp3gain is what we will use here...
First, download the appropriate version of mp3gain for your distro. The sourceforge site seems to have only Windows versions, but I have found pre-compiled packages for Slackware (http://platinum.linux.pl/download/linux/slackpkg/mp3gain-1.4.6-i686-1.tgz), and Debian/Ubuntu users can grab it from the package manager. There are also RPM files for RedHat/SuSE (http://rpm.pbone.net/index.php3).
After mp3gain is installed, it can be used from the command line with something like the following:
find /path/to/mp3/directory -type d -exec sh -c "cd \"{}\" && mp3gain -r -T *.mp3" \;This command will search for all mp3 files recursively under the directory you entered, and for each one it finds, it will cd into that directory and run the mp3gain command with the switches -r and -T. -r tells mp3gain to normalize all mp3 files relative to each other, and the -T does so directly in the file, without making a copy first. Feel free to read the man page of mp3gain and adjust as needed.
There is also a GUI front-end to mp3gain; JavaMP3Gain, which can be downloaded here (http://step.polymtl.ca/~guardia/archives/JavaMP3Gain_20040902_3.zip).
Once you have downloaded and unzipped it, copy the file JavaMP3Gain.jar to a logical location, such /home/username/apps.
You can then launch it from the command line with the following:
java -jar /home/username/apps/JavaMP3Gain.jarOr you can create a shortcut or menu entry with the same command.
Either way, you will get a nice, no-frills GUI with the basic options covered. Simply choose your options, and click 'Start'
*Permissions - Note, the user running mp3gain must have write privileges to the mp3 files being modified.
That's it, depending on the number of mp3's and the speed of your PC, within a few minutes you should have them all set to the same relative gain, and you will no longer need to reach for the volume every time a new song comes up!
Also of note, if your iPod is mounted, you can run mp3gain against it, too...;)