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: mp3gain album gain understanding (Read 6899 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

mp3gain album gain understanding

I've spent quite a few hours over the past couple of days looking into how I can use mp3gain (actually MacMP3Gain) to normalize the volume of my entire library while still keeping the relative volumes consistent between tracks.

I *thought* I could do this by simply album gain-ing my entire library, but I think I might be wrong.  The reason is that after running some tests using aacgain (which is the backend of MacMP3Gain and from what I can tell identical to the command line version of mp3gain except for AAC support) it appears that the flaw in this logic is that new music added to the library will not quite be at the same level as the rest.  So if I may, let me state a few things i understand about the behavior of mp3gain and album gain and maybe you all can validate them for me:

1) Regardless of using track gain or album gain, mp3gain will try to normalize the volume of the track to 89dB (unless specified otherwise). 

2) Using album gain mode will cause the change applied to be based on some calculations done across all the files given, thereby possibly affecting the difference from 89dB to a noticeable degree.

If my understanding of these two are correct, here is an example scenario of what I think may happen:  I apply album gain across all 4712 tracks in my library.  Tomorrow I go out and purchase a new CD, rip it, etc, etc.  Now I have one of two choices: I either run mp3gain across the entire library including the new tracks again, or only on the new tracks.  If I run it on the entire library I beleive that the new tracks will not decrease/increase in volume similar to the existing ones because the data of the 4712 will greatly outweight the data of the 12.  If I run it on only the new tracks I beleive that there is a good possibility that there will be a noticeable difference one way or the other because of the greater about of fluctuation between the 4712 tracks in the first "album" and the 12 or so in the second one.  So I'm leaning toward the only way to do this properly is exactly what I read first thing in the documentation

Quote
This mode is normally used when running mp3gain on a single CD's worth of music.


which is to use album mode, but use it individually on each album.  Because in this case, each album's tracks are kept in respect to only themselves, but the entire thing is normalized to as close to 89dB as possible.  I beleive this scenario would leave me with an entire library of albums which sound like the originals as far as volume fluctuation between tracks but still sound pretty darn close to eachother (close enough to not need to constantly adjust anyway) between albums.  Sound about right?

Sorry for the long post.  I hope I'm not repeating.  I saw similar things to this discussed, but nothing that answered my questions.  Thanks!

mp3gain album gain understanding

Reply #1
When using album gain mode, mp3gain will try to normalize the volume of the tracks (plural) to 89dB.  Normally you would gain album by album when using album mode, as you surmised.

mp3gain album gain understanding

Reply #2
Thanks for the reply.  In the meantime I ran a little test to see if I could get numbers to support this, but I was either unsuccessful or ran a bad test or am reading the results incorrectly.  Here's what I did: 

I took two albums which I knew had a very distinct difference in volume between the two.  Actually they are the same album.  The original version and the remaster.  Then I ran analysis on the entire sample and then on each album expecting to get different numbers for the "Album" result.  But here's what I got:

Code: [Select]
File    MP3 gain    dB gain    Max Amplitude    Max global_gain    Min global_gain
entire sample    
/Users/ginster/Music/sample1/2112/01 - 2112.mp3    -2    -2.56    31784.697856    210    83
/Users/ginster/Music/sample1/2112/02 - A Passage To Bangkok.mp3    -1    -1.8    30888.558592    210    113
/Users/ginster/Music/sample1/2112/03 - The Twilight Zone.mp3    0    0.38    23563.730944    210    99
/Users/ginster/Music/sample1/2112/04 - Lessons.mp3    -1    -1.97    28433.514496    210    75
/Users/ginster/Music/sample1/2112/05 - Tears.mp3    3    4.09    17995.628544    210    123
/Users/ginster/Music/sample1/2112/06 - Something For Nothing.mp3    0    0.03    22963.126272    210    119
/Users/ginster/Music/sample1/2112 [Remaster]/01 - 2112.mp3    -5    -7.45    38054.363136    210    90
/Users/ginster/Music/sample1/2112 [Remaster]/02 - A Passage To Bangkok.mp3    -5    -6.86    35406.741504    190    136
/Users/ginster/Music/sample1/2112 [Remaster]/03 - The Twilight Zone.mp3    -4    -5.89    34165.88288    192    121
/Users/ginster/Music/sample1/2112 [Remaster]/04 - Lessons.mp3    -5    -7.63    35475.357696    193    93
/Users/ginster/Music/sample1/2112 [Remaster]/05 - Tears.mp3    -3    -5.1    33300.80768    193    136
/Users/ginster/Music/sample1/2112 [Remaster]/06 - Something For Nothing.mp3    -5    -7.34    35920.084992    210    76
"Album"    -4    -6.52    38054.363136    210    75

first album in sample    
/Users/ginster/Music/sample1/2112/01 - 2112.mp3    -2    -2.56    31784.697856    210    83
/Users/ginster/Music/sample1/2112/02 - A Passage To Bangkok.mp3    -1    -1.8    30888.558592    210    113
/Users/ginster/Music/sample1/2112/03 - The Twilight Zone.mp3    0    0.38    23563.730944    210    99
/Users/ginster/Music/sample1/2112/04 - Lessons.mp3    -1    -1.97    28433.514496    210    75
/Users/ginster/Music/sample1/2112/05 - Tears.mp3    3    4.09    17995.628544    210    123
/Users/ginster/Music/sample1/2112/06 - Something For Nothing.mp3    0    0.03    22963.126272    210    119
"Album"    -4    -6.52    31784.697856    210    75

second album in sample    
/Users/ginster/Music/sample1/2112 [Remaster]/01 - 2112.mp3    -5    -7.45    38054.363136    210    90
/Users/ginster/Music/sample1/2112 [Remaster]/02 - A Passage To Bangkok.mp3    -5    -6.86    35406.741504    190    136
/Users/ginster/Music/sample1/2112 [Remaster]/03 - The Twilight Zone.mp3    -4    -5.89    34165.88288    192    121
/Users/ginster/Music/sample1/2112 [Remaster]/04 - Lessons.mp3    -5    -7.63    35475.357696    193    93
/Users/ginster/Music/sample1/2112 [Remaster]/05 - Tears.mp3    -3    -5.1    33300.80768    193    136
/Users/ginster/Music/sample1/2112 [Remaster]/06 - Something For Nothing.mp3    -5    -7.34    35920.084992    210    76
"Album"    -4    -6.52    38054.363136    210    76


If I'm reading this correctly.  It clearly shows that the remaster is going to be adjusted lower to a much greater degree than the original.  The thing that surprises me is the identical values for MP3 Gain and dB Gain for all of the "Album" results.  Does this make sense?

Thanks!

mp3gain album gain understanding

Reply #3
Don't run album gain on your whole collection; do it on one album at a time.

If you scan them all at once, relative volume (the volume differences between tracks) will remain constant. This is not what you want.

If you use foobar2000 0.9, you can scan selection as albums (by tags) then apply album ReplayGain to MP3 data. This has the same effect as scanning an album at a time then applying album gain, except you can do it in large batches.

edit:
Quote
Code: [Select]
"Album"    -4    -6.52

The thing that surprises me is the identical values for MP3 Gain and dB Gain for all of the "Album" results.  Does this make sense?[a href="index.php?act=findpost&pid=378355"][{POST_SNAPBACK}][/a]

That's because all files were scanned as if they were from the same album. It's as if you chose to lower the volume of all previous files by -6 dB, regardless of whether they're close to 89 dB or not.

mp3gain album gain understanding

Reply #4
Quote
That's because all files were scanned as if they were from the same album. It's as if you chose to lower the volume of all previous files by -6 dB, regardless of whether they're close to 89 dB or not.


I understand that it's giving a single number for the first sample because they were all scanned as if they were part of the same album.  But what I expected was that the "Album" db Gain value would be *different* for each analysis, not exactly the same.  What these results mean to me is that no matter what combination I choose, basically it's going to turn the volume down by 6.52 dB and it doesn't matter whether I run album gain on the entire library or each album.

So my confusion lies in the fact that I realize it is logical that I would only want to run album gain on each individual album, but at the same time the method I am using to prove this to myself is failing. 

mp3gain album gain understanding

Reply #5
How so? I think you've only run album gain on the entire library. If you rescan each album separately, you'll get different album gain values than before.

If you've only run album gain once on the whole library, the whole library will share a single album peak and album gain value.

mp3gain album gain understanding

Reply #6
Ok, maybe this is where my flaw is.  Here is how I'm generating the output above.  Each block of output under the sections "entire sample", "first album in sample", and "second album in sample" were generated by running:

aacgain -o <files you see below>

This is equivalent to mp3gain -o I believe.  If I understand correctly, this isn't actually doing anything to the files, just some analysis.  I verified this by checking the timestamps on the files, they don't change.  So the output I copied into my second post is actually three outputs.  One on the entire sample, one on the first album, one on the second.

I'm guessing it's just a case of false expectations.  The problem is I have not been able to find a place that explains what this output generated by the -o option means.  So I am basing everything on the educated assumption that this output is telling me what mp3gain is *about* to do to my files, should I include either the track gain or album gain option (I forget what they are at the moment) which tells it to actually apply the gain.

And I'm sorry to keep bugging people about this.  I'm hoping that this thread will be of some use to others as well ... otherwise I would just leave it alone.  Thanks again!

mp3gain album gain understanding

Reply #7
My version says that /o is for shaping output into "a database-friendly tab-delimited list."

mp3gain is probably storing scanned information with the files. Run mp3gain without any options to learn the commands, and try using something equivalent to "/a /s r" on each album.

mp3gain album gain understanding

Reply #8
Quote
try using something equivalent to "/a /s r" on each album


I was trying to see if it would tell me what it was going to do before commiting the changes.  And if I'm not mistaken, leaving the "-a" out should accomplish this.  However, after reading your post I did some more Googling and discovered http://www.hydrogenaudio.org/forums/lofive...php/t38462.html which explained what the "-s r" does.  I'm not at home, so I can't look at the "-?" output ... I either missed this "-s r" option or didn't realize what it meant.  But you're absolutely right, this could be why I am getting the same results since aacgain is not "forgetting" the original analysis.  I'll try this tonight.  Thanks!

mp3gain album gain understanding

Reply #9
Quote
Don't run album gain on your whole collection; do it on one album at a time.


Not necessary. MP3Gain will identify each folder as album. Just use the frontend. Not the command line.

Better yet, use foobar2000. Scan using "scan selection as album based on tags". After that, use the frontend. It will apply the gain changes according to the foobar calculations.

Oh, and both programs will not rescan already adjusted files. So not to worry.
I'm the one in the picture, sitting on a giant cabbage in Mexico, circa 1978.
Reseñas de Rock en Español: www.estadogeneral.com

mp3gain album gain understanding

Reply #10
MP3Gain does not work for me... as I'm very meticulous...

A have ran a test on [ Depeche Mode - Playing The Angel ] , I ripped it all in MP3 V0, then I ran AlbumGain set to 92.0

When I listened the songs after the adjustment... it turned out to be that some of the songs were WAY too low than others. With a tendency that what is already low is going to be even lower and unconsistent.

If I TrackGain all tracks, I will lose the level consistency between tracks.
If I AlbumGain all tracks, will happen the same. I believe that because of its limitation to adjust 1.5 at max downwards or upwards, it compromises all original consistency.

And hey, it turns out to be VERY DIFFERENT from the CD consistency.

But as far as foobar2000 does it differently, I don't know...

mp3gain album gain understanding

Reply #11
Quote
When I listened the songs after the adjustment... it turned out to be that some of the songs were WAY too low than others. With a tendency that what is already low is going to be even lower and unconsistent.
[a href="index.php?act=findpost&pid=378640"][{POST_SNAPBACK}][/a]


Of course. Most new CDs (as Depeche Mode's latest) are mastered way beyond 92dB. So, of course, you are, in fact, lowering the volume of your CDs. And you wonder why your low tracks sound lower?

foobar's calculations are more precise because MP3Gain does it's adjustments in +/- 1.5dB steps. Of course, when you run your foobar2000-scanned tracks throough MP3Gain, it will still apply the closer +/-1.5dB gain available.
I'm the one in the picture, sitting on a giant cabbage in Mexico, circa 1978.
Reseñas de Rock en Español: www.estadogeneral.com

mp3gain album gain understanding

Reply #12
Quote
If I TrackGain all tracks, I will lose the level consistency between tracks.
If I AlbumGain all tracks, will happen the same. I believe that because of its limitation to adjust 1.5 at max downwards or upwards, it compromises all original consistency.

And hey, it turns out to be VERY DIFFERENT from the CD consistency.


I'm pretty particular about the way tracks sound myself, but have not found this to be a problem.  In all the tests I've run things come out sounding good and like they did in the  source.  That said, I'm using MacMP3Gain/aacgain (not sure the versions right now) on OS X 10.4.5.

mp3gain album gain understanding

Reply #13
Quote
try using something equivalent to "/a /s r" on each album


That did it!    I didn't realize that it was storing the results during the first analysis and not re-analyzing when I was running aacgain on the two individual albums ... so of course the numbers were coming out the same.  Here's what I'm getting now:

Code: [Select]
File    MP3 gain    dB gain    Max Amplitude    Max global_gain    Min global_gain
entire sample    
/Users/ginster/Music/sample1/2112/01 - 2112.mp3    -2    -2.56    31784.690408    210    83
/Users/ginster/Music/sample1/2112/02 - A Passage To Bangkok.mp3    -1    -1.8    30888.556602    210    113
/Users/ginster/Music/sample1/2112/03 - The Twilight Zone.mp3    0    0.38    23563.726744    210    99
/Users/ginster/Music/sample1/2112/04 - Lessons.mp3    -1    -1.97    28433.526869    210    75
/Users/ginster/Music/sample1/2112/05 - Tears.mp3    3    4.09    17995.637595    210    123
/Users/ginster/Music/sample1/2112/06 - Something For Nothing.mp3    0    0.03    22963.138981    210    119
/Users/ginster/Music/sample1/2112 [Remaster]/01 - 2112.mp3    -5    -7.45    38054.352007    210    90
/Users/ginster/Music/sample1/2112 [Remaster]/02 - A Passage To Bangkok.mp3    -5    -6.86    35406.742527    190    136
/Users/ginster/Music/sample1/2112 [Remaster]/03 - The Twilight Zone.mp3    -4    -5.89    34165.87554    192    121
/Users/ginster/Music/sample1/2112 [Remaster]/04 - Lessons.mp3    -5    -7.63    35475.34464    193    93
/Users/ginster/Music/sample1/2112 [Remaster]/05 - Tears.mp3    -3    -5.1    33300.810998    193    136
/Users/ginster/Music/sample1/2112 [Remaster]/06 - Something For Nothing.mp3    -5    -7.34    35920.071206    210    76
"Album"    -4    -6.52    38054.352007    210    75

first album in sample    
/Users/ginster/Music/sample1/2112/01 - 2112.mp3    -2    -2.56    31784.690408    210    83
/Users/ginster/Music/sample1/2112/02 - A Passage To Bangkok.mp3    -1    -1.8    30888.556602    210    113
/Users/ginster/Music/sample1/2112/03 - The Twilight Zone.mp3    0    0.38    23563.726744    210    99
/Users/ginster/Music/sample1/2112/04 - Lessons.mp3    -1    -1.97    28433.526869    210    75
/Users/ginster/Music/sample1/2112/05 - Tears.mp3    3    4.09    17995.637595    210    123
/Users/ginster/Music/sample1/2112/06 - Something For Nothing.mp3    0    0.03    22963.138981    210    119
"Album"    -1    -2.13    31784.690408    210    75

second album in sample    
/Users/ginster/Music/sample1/2112 [Remaster]/01 - 2112.mp3    -5    -7.45    38054.352007    210    90
/Users/ginster/Music/sample1/2112 [Remaster]/02 - A Passage To Bangkok.mp3    -5    -6.86    35406.742527    190    136
/Users/ginster/Music/sample1/2112 [Remaster]/03 - The Twilight Zone.mp3    -4    -5.89    34165.87554    192    121
/Users/ginster/Music/sample1/2112 [Remaster]/04 - Lessons.mp3    -5    -7.63    35475.34464    193    93
/Users/ginster/Music/sample1/2112 [Remaster]/05 - Tears.mp3    -3    -5.1    33300.810998    193    136
/Users/ginster/Music/sample1/2112 [Remaster]/06 - Something For Nothing.mp3    -5    -7.34    35920.071206    210    76
"Album"    -5    -7.25    38054.352007    210    76


This shows what I expected to see.  That the "Album" values for the entire sample would fall between the "Album" values of the original version of the album and the remaster.  That whole missing the "-s r" option really threw me off, but I'm clear now and know where to go from here.  Thank you to kjoonlee and everyone who responded.  I hope this thread is found useful to others.

mp3gain album gain understanding

Reply #14
MP3Gain does not work for me... <snip>, I ripped it all in MP3 V0, then I ran AlbumGain set to 92.0

When I listened the songs after the adjustment... it turned out to be that some of the songs were WAY too low than others.

How can that be? In AlbumGain mode, MP3Gain will lower the amplitude of each track by the same amount. Either you are doing something wrong, or imagining things.

mp3gain album gain understanding

Reply #15
Look what happened to ginster.

/Users/ginster/Music/sample1/2112/05 - Tears.mp3 3 4.09 17995.628544 210 123

This song's volume is 84.91 dB SPL. It was lowered to 78.91 dB SPL because all files were treated as one album.

 

mp3gain album gain understanding

Reply #16
Misuse of a program does not mean the program doesn't work. In particular, I'm very dubious about the above-mentioned DM album having any track below 95 dB.