HydrogenAudio

Lossy Audio Compression => MP3 => MP3 - Tech => Topic started by: BFG on 2012-11-12 04:01:06

Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: BFG on 2012-11-12 04:01:06
I'm planning to apply replaygain MP3Gain (album) to my entire set of ripped CDs.  I know that the default setting for MP3Gain is 89dB, which gives around 14dB of headroom.  But I've read up on some industry standards - notably, SMPTE RP 200:2002 and EBU R128 - which recommend 83dB and 80dB respectively.  Furthermore, I tend not to listen to music at very high volumes - typically I never go over about 40% of max - and the Replaygain MP3Gain analysis shows I would have to go down to 82dB or lower to avoid all clipping.

So, is there any reason NOT to go down to 83dB or 80dB?  Am I reducing the dynamic range of the music by doing so (i.e. could I be causing some sections of the music to have a 0dB volume)?

And, an associated question - what does a blue track with ??? for clipping indicate in ReplayGain MP3Gain?  I can't find any documentation on this.
Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: saratoga on 2012-11-12 05:43:44
You're wasting some of the dynamic range of the DAC, but probably not of the music. Unless your system has very low snr its probably no disadvantage in practice.
Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: greynol on 2012-11-12 15:12:43
I chose something higher than even 89 because my digital media player was quieter than other sources playing material at that level.
Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: skamp on 2012-11-12 16:17:39
So, is there any reason NOT to go down to 83dB or 80dB?


It could make you max out the volume on low power sources such as DAPs, with (and sometimes without) low sensitivity and/or high impedance headphones.
Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: [JAZ] on 2012-11-12 19:03:44
@BFG: Are you going to play those MP3 in a player that supports replaygain, or in a player that does not.

If you play them in a player that does not support replaygain, then you need mp3gain and there's the option to specify an alternate gain. It is up to you to decide if it is too silent or too loud with that new value.

If you play them in a player that does support replaygain, usually there is an option to specify a gain for tracks with replaygain, and for tracks without replaygain. Many people decrease the gain for tracks without replaygain, and increase the gain for tracks with replaygain. One such player is foobar2000, but also Winamp does have that option.


About using a higher or lower reference level, the 83 and 80 values come mostly from the video industry where such practices have been common for longer. The dynamic range does not change, but the SNR (signal to noise) gets reduced (worse), because of amplifier noise and room acoustics. (Of course, provided that a higher SNR was already in the source, to begin with).
Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: greynol on 2012-11-12 19:28:43
There's also the possibility to scale during or prior to encoding instead of adjusting global gain after encoding.  This is what I do.

From there you can scan the encoded files in order to have RG track and/or album gain information on hand for further volume manipulation.
Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: BFG on 2012-11-12 22:58:28

@BFG: Are you going to play those MP3 in a player that supports replaygain, or in a player that does not.

If you play them in a player that does not support replaygain, then you need mp3gain and there's the option to specify an alternate gain. It is up to you to decide if it is too silent or too loud with that new value.

*rereads opening quote*
D'oh!  I wrote "replaygain" when I meant "MP3Gain".  I don't have any intention of using replaygain right now.
Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: BFG on 2012-11-12 23:00:32
There's also the possibility to scale during or prior to encoding instead of adjusting global gain after encoding.  This is what I do.

What tool(s), out of curiosity, do you use to do that?  Right now I'm keeping things pretty straightforward - just using Exact Audio Copy and MP3Gain.
Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: greynol on 2012-11-12 23:54:05
I rip to flac and use foobar2000 to add RG information.  From there I encode mp3s:
http://www.hydrogenaudio.org/forums/index....st&p=601287 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=67541&view=findpost&p=601287)

To encode I drag the flacs onto a shortcut to the batch file that I keep on my desktop.  Mp3s are created in the same folder.

I've been doing it this way for years without problems.

Instead of using a batch file, foobar2000 should be able to give the same result with minimal effort.
Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: greynol on 2012-11-13 00:14:34
I wrote "replaygain" when I meant "MP3Gain".

Fixed.

Regarding clipping, I wouldn't be concerned if Mp3Gain says your tracks are clipped prior to adjusting playback volume.  This clipping is in all likelihood going to be benign.  I wouldn't adjust the gain on these files upward without also listening to them, however.
Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: skamp on 2012-11-13 10:11:21
I rip to flac and use foobar2000 to add RG information.  From there I encode mp3s:
http://www.hydrogenaudio.org/forums/index....st&p=601287 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=67541&view=findpost&p=601287)


TL;DR: Greynol computes a gain value from his FLAC's Replaygain album gain tag and uses it with LAME's --scale parameter. If I'm not mistaken, the formula is "10^(G/20)", where G is the Replaygain value in dB.
The downside compared to using MP3gain is that it's probably not (easily / losslessly) reversible.
Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: greynol on 2012-11-13 14:29:12
The equation used is 10^[(G+3)/20] in order to add 3dB of gain.  If you want to attenuate by 6dB in order to adhere to the 83dB reference, just replace the +3 with -6.  Also, I have since updated the batch to add album artist to the ID3v2.

You can always adjust the level with mp3gain after the fact if you don't like the level.  Regarding lack of perfect reversibility, they're lossy files to begin with.
Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: skamp on 2012-11-13 17:00:26
Regarding lack of perfect reversibility, they're lossy files to begin with.


I didn't mean that it was a bad idea. As a matter of fact, I've just added in caudec the ability to apply Replaygain after decoding and before encoding, because why not?
Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: BFG on 2012-11-14 21:52:28
Thanks for all the feedback.  Can anyone answer my other question - on what MP3GainGUI is indicating when it highlights a track in blue and lists ??? for clipping?  It seems mainly to happen on very long tracks, so I'm wondering if it has to do with a timeout or inexact analysis.
Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: Dynamic on 2012-11-15 16:51:15
From MP3Gain Help/MP3Gain Interface/Menus/File List:

Quote
If there is a ??? in the clipping column for a file, then the mp3 probably has some bad data in it. This bad data could have been caused by a download error, a poor job of splicing two mp3s into one, or other factors. Listen closely to the mp3, and somewhere you'll probably be able to hear a loud click, pop, “chk”, or other sound. Because of this bad data, the program cannot accurately determine the maximum amplitude, because the bad data is causing extreme clipping.
Fortunately, in most cases the amount of bad data is small enough that it does not affect the calculation of the overall volume of the file. The suggested Track and Album gains are probably still valid.
Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: BFG on 2012-11-15 17:22:55
From MP3Gain Help/MP3Gain Interface/Menus/File List:

How the heck did I miss that?  Thanks.

Interestingly, it's only happening on tracks that were ripped directly from CD using EAC.  And EAC didn't report any problems on those tracks.
Title: MP3Gain - Any reason to Album Gain higher than 83dB?
Post by: Dynamic on 2012-11-15 19:56:25
Maybe scan the MP3 files in fb2k and possibly try to rebuild the streams (or use fb2k's ReplayGain scanner). Might even be bad tagging problems (e.g. combined lame tagging and EAC tagging)