Normalize mp3 volume level
ReplayGain
ReplayGain is a different standard for almost the same thing. One difference is that it doesn't have to calculate an average over a collection of mp3's because ReplayGain tunes all music to an 'universal volume level'. To enable ReplayGain in Rhythmbox musicplayer: in the menu go to Edit, Plugins and check 'ReplayGain' you can also set preferences.
Note 20130628: this setting seems to have no effect in Rhythmbox.
Install:
sudo apt-get install mp3gain mp3gain *
Analyze and set the ReplayGain information in the APEv2 tag:
mp3gain -p *
Show tags:
mp3gain -s c *
Here are some options to analyze and apply the calculated gain to the audio stream. Your audio player then does not need to support ReplayGain:
-r apply gain to audio stream
-k if needed, lower the volume to prevent clipping of audio
-p preserve file timestamp
mp3gain -r -k -p *
RVA
With the following command volume information is stored in every selected mp3 so that a player with support for RVA (Relative Volume Adjustment) can play the mp3 at a normalized level. The encoded audio itself is not altered. With option '-m' an average volume level is calculated over the collection of files first to use as the targeted relative average volume.
Note: your mp3 player needs to support RVA.
sudo apt-get install normalize-audio normalize-audio -m -v *
If your mp3 player does not support RVA2 you can use the following statement. The following command will adjust the volume by de-coding the mp3 to WAV using the RVA volume adjustment and then it is re-encoded to 128 bit mp3 (change this if you like).
Note:
- you need 'lame' and 'mpg123' codecs
- depending on the size can take a lot of drive-space and time
- your mp3 files will have the same bitrate
- you will loose some quality in the process - using a higher bitrate you still will loose some quality AND disk space as well.
sudo apt-get install mpg123 normalize-mp3 -m -v --bitrate 128 --mp3encode="lame -h -quiet --preset %b %w %m" *