Help - Search - Members - Calendar
Full Version: compatibility of aacgain and foobar replaygain tag
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Support - (fb2k)
=trott=
Hi all,

I'm starting this topic here since it seems to be foobar-related and has nothing to do with aac. this is my original post in the aac forum. (couldn't find how to move a topic):

QUOTE(=trott= @ Jun 8 2005, 01:24 AM)
Hi all,

I noticed that there is a difference between using replaygain on aac files when scanning with either foobar or aacgain and then applying it using aacgain.

I have several files which were scanned with foobar and several scanned with aacgain. (using the aacgain/mp3gain gui). After scanning all files, I applied the gain change using aacgain. (so that non-foobar players will also play the files using the correct gain.)

Recently I noticed that several files were just too silent...A quick check revealed that replaygain info was indeed present. I switched to track gain to make sure I was not just listening to quiet albums...

The problem did not go away. So I re-scanned the track gain using foobar. Sure enough, I got values of between +5/+9 depending on the file. when playing them back with this new gain setting they seem ok.

So, as I understand it replaygain is a fixed formula to calculate a gain offset to the original file and as such different implementations should never give different values...(especially as aacgain is based on mp3gain which lists in its documentation that its replaygain tags are compatible with foobar's...or was it the other way around?)

Any ideas as to why this is possible? And maybe how I can quickly find all badly-tagged files without re-scanning them all?
*



The last reply was by Garf:

QUOTE(Garf @ Jun 10 2005, 12:18 AM)
QUOTE(=trott= @ Jun 10 2005, 09:55 AM)
I have the impression that foobar does not use the global gain tag...

So Garf, my impression is that it's just the opposite of what you're saying...
*



This is simply not possible. The global gain is not a "tag" but a value in the AAC bitstream, you cannot decode an AAC stream without interpreting it correctly.

Since you stated that other players (which most probably don't understand Replaygain tags) play it correctly and foobar plays it too silent, I stand by my statement that somehow the replaygain tags are still reflecting the old values.

Try "reload info from file" perhaps?
*




The problem has not been solved yet, but I noticed it also occurs with several mp3's. (I didn't notice it before since most of my rips are in aac format.)
This would eliminate both aac as a codec or aacgain as the problem, since mp3gain also gives the same problem.

Garf's suggestion did not help, I can see the replaygain values are close to 0. The problem is: when I remove that info from the file and scan again I get a much bigger value. After playing the file with that new value (and foobar's replaygain enabled) the volume is ok.

Can anyone say whether the replaygain tags in foobar and those written by aacgain/mp3gain are, in fact, at all compatible? I read someplace they are, but what I'm seeing here would suggest they are not.

Garf
QUOTE(=trott= @ Jul 17 2005, 02:19 PM)
Garf's suggestion did not help, I can see the replaygain values are close to 0. The problem is: when I remove that info from the file and scan again I get a much bigger value. After playing the file with that new value (and foobar's replaygain enabled) the volume is ok.

Can anyone say whether the replaygain tags in foobar and those written by aacgain/mp3gain are, in fact, at all compatible? I read someplace they are, but what I'm seeing here would suggest they are not.
*



Seems my suggestion did exactly work as I said it would and have been saying since the beginning: the replaygain tags were reflecting the values before you used aacgain on the files. By deleting them and rescanning, you get tags with the correct values.

So what's the problem??
Mike Giacomelli
QUOTE(=trott= @ Jul 17 2005, 04:19 AM)
Hi all,

I'm starting this topic here since it seems to be foobar-related and has nothing to do with aac. this is my original post in the aac forum. (couldn't find how to move a topic):

QUOTE(=trott= @ Jun 8 2005, 01:24 AM)
Hi all,

I noticed that there is a difference between using replaygain on aac files when scanning with either foobar or aacgain and then applying it using aacgain.

I have several files which were scanned with foobar and several scanned with aacgain. (using the aacgain/mp3gain gui). After scanning all files, I applied the gain change using aacgain. (so that non-foobar players will also play the files using the correct gain.)

Recently I noticed that several files were just too silent...A quick check revealed that replaygain info was indeed present. I switched to track gain to make sure I was not just listening to quiet albums...

The problem did not go away. So I re-scanned the track gain using foobar. Sure enough, I got values of between +5/+9 depending on the file. when playing them back with this new gain setting they seem ok.

So, as I understand it replaygain is a fixed formula to calculate a gain offset to the original file and as such different implementations should never give different values...(especially as aacgain is based on mp3gain which lists in its documentation that its replaygain tags are compatible with foobar's...or was it the other way around?)

Any ideas as to why this is possible? And maybe how I can quickly find all badly-tagged files without re-scanning them all?
*



The last reply was by Garf:

QUOTE(Garf @ Jun 10 2005, 12:18 AM)
QUOTE(=trott= @ Jun 10 2005, 09:55 AM)
I have the impression that foobar does not use the global gain tag...

So Garf, my impression is that it's just the opposite of what you're saying...
*



This is simply not possible. The global gain is not a "tag" but a value in the AAC bitstream, you cannot decode an AAC stream without interpreting it correctly.

Since you stated that other players (which most probably don't understand Replaygain tags) play it correctly and foobar plays it too silent, I stand by my statement that somehow the replaygain tags are still reflecting the old values.

Try "reload info from file" perhaps?
*




The problem has not been solved yet, but I noticed it also occurs with several mp3's. (I didn't notice it before since most of my rips are in aac format.)
This would eliminate both aac as a codec or aacgain as the problem, since mp3gain also gives the same problem.

Garf's suggestion did not help, I can see the replaygain values are close to 0. The problem is: when I remove that info from the file and scan again I get a much bigger value. After playing the file with that new value (and foobar's replaygain enabled) the volume is ok.

Can anyone say whether the replaygain tags in foobar and those written by aacgain/mp3gain are, in fact, at all compatible? I read someplace they are, but what I'm seeing here would suggest they are not.
*



Did you even read my reply in the last thread you posted on this? I've just reread it and it seems to exactly answer your question in no uncertain terms. Even so I'll try once more. From what I understand, this is your present state:

You used replaygain in foobar to generate a value for the loudness of the file.
You then used AACgain to change the loudness of the file to a second value.
You appear to be asking why changing the loudness of a file from value #1 to value #2 renders replaygain tags containing value #1 incorrect.

Answer: They're incorrect because you changed them! Theres no incompatability. just if you change the file's gain with something like aacgain/mp3gain/wavgain, you MUST update the replaygain value in foobar, otherwise it will continue to use the old value.

Does that help?
=trott=
QUOTE(Mike Giacomelli @ Jul 17 2005, 09:47 PM)
Did you even read my reply in the last thread you posted on this?  I've just reread it and it seems to exactly answer your question in no uncertain terms.  Even so I'll try once more.  From what I understand, this is your present state:
*



That was uncalled for I believe...

Now to the problem at hand since apparantly I did not explain it very well: the tags of aacgain and foobar, are they compatible or not?

I did read your reply, as I read any reply, and what you're saying is that I'm complaining that if I set value 1 to A, change value 1 to B, B will not be equal to A. What I'm actually saying is that if I:

1) scan with foobar
2) scan a file with aacgain. eg I have one here: after the scan I get a track gain of -9 and a track volume of 98.2. I apply the track gain. I now have a track gain of 0 and a track volume of 89.2. In other words: after aacgain adjusts the track volume with the value of the (track|album) gain, it also adjusts the track and album gain values so they reflect the changed track volume.
3) to avoid confusion, update info on file in foobar
4) look at properties from file in foobar: replaygain_track_gain = -0.21
5) re-scan track gain in foobar: replaygain_track_gain = -0.20 dB

so the only noticeable change between 4 and 5 is that foobar replaygain scan adds the letters 'dB'. Will this have an impact on playback? I don't know...

I think I can conclude that we have a file here in foobar which is 'normalized' and has a track gain value sufficiently close to 0 which reflects that. So even if I play it back using track gain mode in foobar, foobar should read a value close to 0 so should not change the volume much.

However, and this was the question I asked, when doing this, on some tracks (not all, not even many) if you re-scan the file with foobar replaygain I suddenly get a very big value. This should not happen as the foobar and aacgain tags are supposedly compatible.

Anyway, forget it...
Garf
QUOTE(=trott= @ Jul 18 2005, 08:33 AM)
However, and this was the question I asked, when doing this, on some tracks (not all, not even many) if you re-scan the file with foobar replaygain I suddenly get a very big value. This should not happen as the foobar and aacgain tags are supposedly compatible.

Anyway, forget it...
*



That can not have anything to do with tag compatibility, I don't see why you think it could.

If I understand your explanation:

Replaygain value = 0.01dB
Rescan with foobar
Replaygain value = -10.0dB

This looks more like aacgain simply not applying the gain change at all, but setting the tag as if it did.
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-2008 Invision Power Services, Inc.