Help - Search - Members - Calendar
Full Version: ReplayGain vs MP3Gain
Hydrogenaudio Forums > Hydrogenaudio Forum > General Audio
Mus
Hi,

Sorry if this is well-worn, I did a search and didn't easily find an answer.

I chose to ReplayGain my MP3s because I understand that it is totally undoable as it relies on a plugin to interpret tags.

I got the impression that MP3Gain changes the audio data itself and that whilst this would have uniform volumes on any player, under some cicumstances the files might clip and this would not be undoable at all.

Am I right in my assumptions?

At the moment I'm using a Rockboxed iRiver H160, so the replaygain plugin is available for it. Otherwise, if MP3Gain is reliable I don't have to use the ReplayGain plugin at all.

Thanks

M
greynol
QUOTE (Mus @ Sep 13 2006, 11:04) *
I chose to ReplayGain my MP3s because I understand that it is totally undoable as it relies on a plugin to interpret tags.
This is correct.

QUOTE
I got the impression that MP3Gain changes the audio data itself and that whilst this would have uniform volumes on any player, under some cicumstances the files might clip and this would not be undoable at all.
This is not correct. MP3Gain also stores information in tags. Provided you haven't removed the tags, changes made to your files are completely undoable (EDIT: even if they clip).
kjoonlee
MP3Gain used to alter the audio data only.

Now it adds RG metadata and undo data.
stigc
Does anyone know how Mp3Gain detects albums when running in album mode? It seems like I treats tracks in the same folders as an album.
me7
Yes, mp3Gain detects folders as albums.
Mus
OK, thanks guys. So, if MP3Gain works only by tagging, do MP3 players have to have a plugin to make it work, just like RG?

Ta

M

PS I set email notification of replies - none arrived. ???
greynol
QUOTE (Mus @ Sep 13 2006, 14:39) *
So, if MP3Gain works only by tagging, do MP3 players have to have a plugin to make it work

No, no. Mp3Gain alters the data.
CiTay
Sometimes it helps to read the help file that comes with certain programs, such as MP3Gain.

QUOTE
MP3Gain can store "Analysis" and "Undo" information in special tags inside the mp3 file itself. If tag writing is turned on, then MP3Gain only has to spend time analyzing an mp3 file once. If you load the same file into MP3Gain at a later time, then the program will see the tag and instantly display the volume and recommended gain changes for the mp3.
With the tag information, MP3Gain is also able to automatically undo any changes you make to an mp3 file. All you have to do is load the mp3 file into MP3Gain and select "Modify Gain - Undo Gain changes" from the menu.

Here are the options in the "Options - Tags" submenu:

Ignore (do not read or write tags): Completely turns off all tag features.
Re-calculate (do not read tags): Forces MP3Gain to re-analyze an mp3 even if it already has MP3Gain tags in it.
Don't check while adding files: By default, MP3Gain checks each mp3 as it is added to the list to see if it has tag information. If you select this option, however, MP3Gain skips that test while adding files to the list. This can speed up the process if you're adding a large folder of mp3s to MP3Gain.
Remove Tags from files: Deletes all MP3Gain tags from any mp3 files in the list. This should only be necessary if your mp3 player is having problems with the MP3Gain tags.


I think the undo option is overrated. I couldn't care less what the original loudness was, and i certainly don't want to restore it...

P.S. foobar2000 can do both, store it in tags (without altering the audio), and by altering the audio as well.
Mus
> Sometimes it helps to read the help file that comes with certain programs, such as MP3Gain.


I did but didn't see that bit.

So, there are no dangers whatsoever in getting MP3Gain or foobar to apply the changes? I don't wish to mess up 11,000 MP3s.

I didn't realise foobar let you apply the gain too, though. However, the plugin approach on Rockbox does at least allow you to use Track gain when shuffling rather than Album gain.
kjoonlee
Well, there's nothing stopping you from using both approaches: apply physical volume change per album gain, and use track gain values for shuffled playback.
smz
QUOTE (kjoonlee @ Sep 14 2006, 15:38) *
Well, there's nothing stopping you from using both approaches: apply physical volume change per album gain, and use track gain values for shuffled playback.

A very nice idea! cool.gif

BTW, there is something unclear to me about the reversibility of volume changes: AFAIK it is done by fiddling the "Global Gain" field of mp3 frames and I always supposed that this field should be normally set to 0, so to revert to the original it would be enough to reset it to 0, without the need of any ancillary metadata. Is my supposition wrong?

Cheers!

Sergio
kjoonlee
I think it's a multiplier, so setting it to zero would mean silence. I think. unsure.gif
smz
QUOTE (kjoonlee @ Sep 14 2006, 15:58) *
I think it's a multiplier, so setting it to zero would mean silence. I think. unsure.gif

biggrin.gif YES!

And besides that it really seems my assumption was wrong.

See: Karlheinz Braundenburg - MP3 and AAC Explained - AES 17th International Conference on High Quality Audio Coding (available here)

QUOTE
Since Huffman coding is basically a variable code length
method and noise shaping has to be done to keep the
quantization noise below the masking threshold, a global
gain value (determining the quantization step size) and
scalefactors (determining noise shaping factors for each
scalefactor band) are applied before actual quantization.
The process to find the optimum gain and scalefactors
for a given block, bit-rate and output from the perceptual
model is usually done by two nested iteration loops in an
analysis-by-synthesis way



Cheers! Sergio
Mus
QUOTE (kjoonlee @ Sep 14 2006, 07:38) *
Well, there's nothing stopping you from using both approaches: apply physical volume change per album gain, and use track gain values for shuffled playback.


Wouldn't that mean the Track gain was used on top of the applied Album value, or am I misunderstanding again?
kjoonlee
edit: Good question.

Well, let's say the target loudness was 89 dB SPL.

Album gain was +3 dB and track gain was +1 dB.

That means the album's volume was 86 dB, and the track's volume was 88 dB.

Let's apply the +3 dB album gain with MP3Gain, physically.

Now the album's volume is 89 dB, and the track's volume is now 91 dB.

If you rescan for RG info, the album gain value is +0 dB, and the track gain value is now -2 dB.

You can use -2 dB (written as tags) when using shuffled playback.
greynol
QUOTE (kjoonlee @ Sep 14 2006, 08:54) *
Album gain was +3 dB and track gain was +1 dB.

After doing a replaygain/mp3gain analysis, album gain will the same as the smallest track gain detected. It is therefore impossible to have an album gain of +3dB and a track gain of +1dB.
kjoonlee
Wrong.

Black Orpheus: AP: 0.914552, AG: +3.00 dB
TP: 0.914552, TG: +1.72 dB
TP: 0.758718, TG: +2.80 dB
TP: 0.493108, TG: +8.55 dB
TP: 0.666550, TG: +4.82 dB
TP: 0.815305, TG: +2.66 dB
TP: 0.887043, TG: +3.06 dB
TP: 0.897218, TG: +2.62 dB
TP: 0.841426, TG: +3.53 dB
TP: 0.836488, TG: +2.62 dB

Album gain can be higher than track gain.
kjoonlee
QUOTE (Mus @ Sep 15 2006, 00:14) *
Wouldn't that mean the Track gain was used on top of the applied Album value, or am I misunderstanding again?

QUOTE (kjoonlee @ Sep 15 2006, 00:54) *
If you rescan for RG info, the album gain value is +0 dB, and the track gain value is now -2 dB.

A good RG scanner (edit: or volume modifier) would remember to tweak the original values after the physical volume has been modified, without rescanning.
greynol
QUOTE (kjoonlee @ Sep 14 2006, 09:22) *
Album gain can be higher than track gain.

Based no your understanding of how replaygain works, please explain how this can be. I'm confused.

Nevermind, I think found my error. It's probably because the album gain is calculated using the 95th percentile of loudness for the album which can either be larger or smaller than the 95th percentile of any given track.

EDIT: Well I'm still probably confused, but that's another matter. tongue.gif
kjoonlee
Right. All you need is a quiet album with one loud track.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.