DeanL - 2019-01-21

Old problem but here is a potential solution...

Let's say you normalized with -a -d 4 -c
The replaygain values will be off by -4dB since they are modeled around 89dB and you normalized to 93dB. Replaygain will always try to lower the volume to 89dB. If you adjust the replaygain values by subtracting the 4dB then you must add that 4dB back when loading the files the next time. If you don't, mp3gain will assume the current values are based on 89dB. If you do the same -a -d 4 -c then it will raise the volume since it thinks they are at 89dB currently.

How will mp3gain know to add back the 4dB the next time. You create a new tag and put a value of 93.0. This give you a normalized reference point.
Load the file - if the dBlevel_tag exists then adjust the replaygain values back to their original value by doing...
x = (replaygain_album_gain - (dBlevel_tag - 89))
y = (replaygain_track_gain - (dBlevel_tag - 89))

You must restore the original replaygain values before any new calculations are done.
If you use a previous version of mp3gain later then you must use -s r to force recalculation.

My current aacgain mod sets a "normalization_level_dB" tag (currently for aac files only) and sets it to "93.0" if that's what I normalized to.

If you use -m then you have to adjust the dBlevel tag accordingly. If you use -g later then you would have to read the existing normalization_level_dB and adjust it's value by adding ( (-g i) x 1.5)

 

Last edit: DeanL 2019-01-21