Normalizing Audio in Linux

Published on

#Audio Normalization, Explained

Audio normalization is the process of applying an audio gain to music so that the average sound volume reaches a target level. In my case, I had multiple albums of soundtracks from all different sources, including video games and TV shows, with varying levels of volume. This was particularly annoying when I had my collection on shuffle, having to constantly change the audio level to fit the particular song. Audio normalization takes care of this so that you can listen at a relatively stable volume.

Warning: it is always a good idea to backup your music files before attempting to normalize them.


There are two levels at which normalization can be applied:

Most normalizers will work by song by default. In my case, I needed one with album functionality.

#The Competition

Each of these normalizers work by editing the ReplayGain tag in mp3 file headers. This means that they are lossless normalizers, so the quality of audio files is not affected. However, the drawback is that your music player needs to be able to see these header changes. Some music players will ignore this and the normalization will have no affect. For each competitor, I will test using the Clementine gui music player. Performance/speed is not of great importance to me, since normalization of my music is something that will likely occur only once per album, ever.


normalize-audio (available via APT) uses RMS amplitudes to determine volume; I noticed that this algorithm tends to make large gain changes to normalize songs. It supports file and album normalization and has lots of CLI options, including a preview of changes before they take place. However, Clementine was unable to recognize the changes made.


mp3gain (available from their homepage) uses a Replay Gain algorithm to determine volume, which tends to make smaller gain changes to normalize. It definitely comes with the most customizability as far as options go, however only supports integer gains on music, which may or may not be a big deal for you. It supports file and album normalization. Clementine was able to recognize the changes made. mp3gain was removed from the APT repo and replaced with an alternative replaygain.


replaygain (available via APT as python-rgain) is a python audio normalizer. It supports file and album normalization, as far as I can tell, but the documentation almost seems to suggest that both are applied simultaneously. Clementine was able to recognize the changes made.

#Conclusion: mp3gain

Simply due to its multitude of options and superior documentation, mp3gain takes the win.

Meet the Author

John Allbritten

Nashville, TN

I love learning new technologies, and I have a passion for open source. As I learn things, my notes turn into articles to share.

Related Posts