Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: What's the use of the Mp3gain -r and -a parameters? (Read 6323 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

What's the use of the Mp3gain -r and -a parameters?

Hi everyone,

I'm currently redoing my music collection and setting everything up with Mp3gain and Vorbisgain tags. For that, I'm using the console on my Ubuntu box. There is one thing that is unclear to me though:

What is the use of the -r and -a parameters? (As is "$ mp3gain -a *.mp3" or "$ mp3gain -r song.mp3")

The helpfile states:
-r apply Track gain automatically (all files set to equal loudness)
-a apply Album gain automatically (files are all from the same album: a single gain change is applied to all files, so their loudness relative to each other remains unchanged, but the average album loudness is normalized)

However, when I open an album folder and simply execute "$ mp3gain *.mp3", it will still do a full album analysis of all files in the directory without the -a parameter (I'd have to specify -e to not calculate the album gain) and I haven't been able to find a difference between using and not using -r.

Can someone explain what these parameters do exactly and what the difference is or is someone willing to run a small test and see if they find something that I haven't yet?


Kind regards!  :)

Re: What's the use of the Mp3gain -r and -a parameters?

Reply #1
https://www.mankier.com/1/mp3gain

According to the manual, if you don't specify anything, the values are written to tags but the files aren't modified.

If you want to use replaygain, you should probably use more modern software, otherwise you will need to script in figuring out what files are in what album.

Re: What's the use of the Mp3gain -r and -a parameters?

Reply #2
If you want to use replaygain, you should probably use more modern software, otherwise you will need to script in figuring out what files are in what album.

Mp3gain probably doesn't even support EBU R128, right? I'd really wouldn't want to use it for scanning anymore.

Re: What's the use of the Mp3gain -r and -a parameters?

Reply #3
According to the manual, if you don't specify anything, the values are written to tags but the files aren't modified.

Thanks for the link. I still couldn't figure out what exactly happens according to the manual, but I read the Mp3gain Wikipedia page and somehow, I tried to open two files in a sound editor:

So, when specifying -r -a -l or -g, Mp3gain will actually edit the waveforms of the files and store Undo-tags in their metadata. This way, all devices will play them at their ReplayGain loudness, regardless of tag-support. The downside is that, even though Mp3gain claims it's lossless, it's not perfectly safe to ensure that an Undo-process will restore the waveform perfectly.

When not entering any of those parameters, it will only write the ReplayGain values into the metadata of the file (either as APEv2 or as ID3, if specified), which can easily be removed or altered. Probably recommended.

If you want to use replaygain, you should probably use more modern software, otherwise you will need to script in figuring out what files are in what album.
Mp3gain probably doesn't even support EBU R128, right? I'd really wouldn't want to use it for scanning anymore.

Well, ReplayGain has just been nice, since it uses the same profile for mp3, ogg and flac, all formats which I have and want to play back interchangably without much difference in loudness. I don't care that much about 100% accuracy, as long, as the differences are not too great.

What would you recommend?

Re: What's the use of the Mp3gain -r and -a parameters?

Reply #4
The downside is that, even though Mp3gain claims it's lossless, it's not perfectly safe to ensure that an Undo-process will restore the waveform perfectly.
While in theory this is true, in practice the undo process really is totally lossless.

 

Re: What's the use of the Mp3gain -r and -a parameters?

Reply #5
Quote
I don't care that much about 100% accuracy, as long, as the differences are not too great.
Nothing is "perfect" because if you asked different people to adjust the volumes of several tracks to match, you'd get different results from different people, especially if the songs where dynamically-different or different genres.   

I feel it works "as well as can be expected", and it's better than nothing.  (I've sometimes used MP3gain, but I mostly use ReplayGain with Winamp, or Sound Check with my iPod.)

I haven't experimented with EBU R 128 to say if it's better or worse.    From my very-limited study of this stuff,  EBU R 128 might be more-appropriate for a loudness meter (a modern replacement for a VU meter), and ReplayGain may be more appropriate for matching the loudness of entire songs.  
 
And, the MP3 format only allows volume-changes in 1.5dB steps, so you could miss the calculated-target volume by 0.75dB.   And assuming you don't allow clipping, that limits your adjustment range too.  (I don't believe MP3Gain will actually clip but if the peaks are allowed to go over 0dB you can clip your DAC if you play-back at full-digital volume.)