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: Replay Gain - HowTo exactly ? (Read 8380 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Replay Gain - HowTo exactly ?

Hi,

I'm reading about Replay Gain since 3 days now. But I can't figure out how to read the RG information exactly from the different formats. MP3Gain seems to write ApeV2 Tags, fb2k writes id3v2 TXXX Tags into mp3 files.

Is there any documentation how to read / where to find those tags ?

I know the RG document (A proposal standard), but there is no info about that.

Hope someone can help.


Cheers. Skippy.

Replay Gain - HowTo exactly ?

Reply #1
My experience is limited...  I've only used Replay Gain with MP3s and Winamp.  When I right click a song and select File Info, Winamp displays the Replay Gain Information.  (It shows-up under both the Basic Info tab, and the ID3v2 tab.)

Replay Gain - HowTo exactly ?

Reply #2
MP3Gain seems to write ApeV2 Tags, fb2k writes id3v2 TXXX Tags into mp3 files.

Is there any documentation how to read / where to find those tags ?

Unfortunately there is no standard for what tag format to use to write the tags. Each program does its own thing.

See this thread.

Dave

Replay Gain - HowTo exactly ?

Reply #3
As another alternative, LAME puts its replaygain info into the LAME header. The TXXX frames seems to be the most popular and supported.

Quote
Is there any documentation how to read / where to find those tags?

For what purpose? Are you trying to do it manually? Or maybe some sort of software library? We can't really expand on this until you tell us how you want to view the tags.

Replay Gain - HowTo exactly ?

Reply #4
Quote
For what purpose? Are you trying to do it manually? Or maybe some sort of software library? We can't really expand on this until you tell us how you want to view the tags.


Yes, you're right. I forgot to mention, that I have written a jukebox program and want to implement normalization. First I tried a quick & dirty Peak Level Normalization, but that's crap. Since I don't want my users to mess up with their songs, I think Replay Gain is a good way to achieve the normalization.

Replay Gain - HowTo exactly ?

Reply #5
See this thread.


Thx for the hint, Dave. In this thread you write
Quote
Foobar 2000 uses ID3v2 'TXXX' or APE v2 tags (depending on preferences configuration) with the same tag names as used in mp3gain.

I can't see where to set ApeV2 Tag option, in the Playback section there are only options for Source Mode (album/track) and Processing (apply gain/prevent clippiing)

Replay Gain - HowTo exactly ?

Reply #6
You have to realise that there are two types of replaygain:

1. Vanilla replaygain. Like in Foobar2000. The mp3 itself is not changed but a tag is added with volume information. You need a player that is aware of this tag. Such a player will read the volume tag and will lower the volume accordingly. I use this myself.

2. Like Mp3gain. It actually changes the actual mp3 by lowering the volume. This will work on any player. (A tag is also written, but this is only used when undoing, not when playing).

Replay Gain - HowTo exactly ?

Reply #7
I can't see where to set ApeV2 Tag option, in the Playback section there are only options for Source Mode (album/track) and Processing (apply gain/prevent clippiing)
There are 2 ways to get to this option:
  • File/Preferences/Advanced/Tagging/MP3
  • Right-click on track/Tagging/MP3 Tag Types

Replay Gain - HowTo exactly ?

Reply #8
okay I see, it's the general tagging property.

Thx for the info.

Replay Gain - HowTo exactly ?

Reply #9
You have to realise that there are two types of replaygain:


This is useful info, it's making much more sense now. So MP3Gain stores the gain in every block of mp3 data, I think it's called global gain field ?

And storing the tags is depending on the player.... that should reduce/raise the volume regarding the gain value, eventually calculating with the maximum peak value to prevent clipping, if that's the user's choice. Right ?

Cool.

Replay Gain - HowTo exactly ?

Reply #10
I changed my mp3 library with mp3gain now, but still I have songs which are much more louder than others and also have silent ones. It seems to have no effect to it, actually I think the difference is even bigger somehow.

Does a player have to be aware of the changes and must it handle it by itself ?

I understood, that this is not the case. But then what about my experience with the changes ?

Cheers.

Replay Gain - HowTo exactly ?

Reply #11
Does anybody have same results with using mp3gain ?

Cheers.

Replay Gain - HowTo exactly ?

Reply #12
I changed my mp3 library with mp3gain now, but still I have songs which are much more louder than others and also have silent ones. It seems to have no effect to it, actually I think the difference is even bigger somehow.

Does a player have to be aware of the changes and must it handle it by itself ?
What player are you using, and does it understand replay gain tags?

If you use a player like foobar2000 that reads the mp3gain's replay gain tags, that would explain your results. mp3gain adjusts the volume, but also makes a corresponding adjustment to the tags. If your player reads the tags, the changes to the global gain fields and the replay gain tags will cancel each other out. You should not be using mp3gain in this case.

If you use a player that doesn't understand replay gain tags (like iTunes or iPod), then mp3gain should work as expected.

Dave

Replay Gain - HowTo exactly ?

Reply #13
1. IIRC, replaygain itself is only about calculating the gain values. Peak-info and clipping prevention is not part of replaygain itself, but was introduced by fb2k as optional additional info.

2. As a consequence of 1., replaygain itself only defines by which degree to amp a track/album - what to do about clipping is left up to the software-dev/user. I personally do not think that clipping prevention via peakinfo makes sense - it goes against the purpose of replaygain and introduces additional complexity. I think that the most efficient approach is simply to use a limiter.

3. The RG gain value does not even actually define *absolutely* by which amount a track/album should be amped. The gain value is relative to that 89dB REFERENCE. What does this mean? Well, it means that RG values only define which tracks should be played louder and which ones quieter, and how much. They do not define absolute playback volume. So, a user may choose to *generally* amp all his tracks 3dB lower than the RG-info of the tracks says.

4. What this in practice means is that the user still owns the volume knob - both digital and analogue, software and hardware. The RG values of the track only define by how many dBs a track/album is "off" the "norm"(reference). THIS is what an RG-value actually means.... an arbitrary loudness is choosen and then defined as the norm (reference, 89dB) and then for each track info is stored about its loudness relative to that "norm".

5. In conclusion, the following implementation would be valid as well: Give the user a software volume knob. If that volume knob is at lets say -3dB, and a track RG-value is at -2dB, then that track will get amped by -5dB. What is that good for? Well, remember my previous proposal to use a limiter instead of using peak-info to prevent clipping. In such a case, that volume slider would also be a dynamics slider. A user with weak speakers may want to get as much loudness as possible out of those speakers, so he sets the volume knob to +7dB. Dynamic material will get limited, thus significantly reducing its dynamic (how else do you expect to get to "eleven"?). Elsewhere on these boards, i also proposed a generic volume knob (which goes to eleven).

6. Replaygain has no clue which tracks are supposed to be quieter than others. It does not know if a track is i.e. a ballad. This can result in seemingly false loudness when trackgain is used. Albumgain is less affected by this issue.


P.S.: I am here only talking about "normal" Replaygain - not the stuff which mp3gain does.
I am arrogant and I can afford it because I deliver.

Replay Gain - HowTo exactly ?

Reply #14
Quote
If you use a player like foobar2000 that reads the mp3gain's replay gain tags, that would explain your results. mp3gain adjusts the volume, but also makes a corresponding adjustment to the tags.

I don't think so. mp3gain would adjust the individual mp3 frames, and then write replaygain tags which refer to the adjusted mp3 frames, which do not need further correction during playback (or minor correction for album gain versus track gain).

Replay Gain - HowTo exactly ?

Reply #15
Does anybody have same results with using mp3gain ?
Are you sure you clicked "apply", not just "analyse"? (sorry, had to ask!)

Are you sure you used "by track" or "by album" correctly? For example, treating your entire collection as a single album and ReplayGaining by album won't do anything useful.

Cheers,
David.



1. IIRC, replaygain itself is only about calculating the gain values. Peak-info and clipping prevention is not part of replaygain itself, but was introduced by fb2k as optional additional info.

2. As a consequence of 1., replaygain itself only defines by which degree to amp a track/album - what to do about clipping is left up to the software-dev/user. I personally do not think that clipping prevention via peakinfo makes sense - it goes against the purpose of replaygain and introduces additional complexity. I think that the most efficient approach is simply to use a limiter.
Ahem...

http://replaygain.hydrogenaudio.org/player.html

...it was all there in the original proposal.

I didn't include album peak though - Frank pointed that omission out very early on, but the ReplayGain website itself has never been updated.

Cheers,
David.

Replay Gain - HowTo exactly ?

Reply #16
Thanks for your answers.

To clarify the situation:

1. I use my own player which doesn't know anything of RP Tags
2. That's why I was attempting to get it work better with mp3gain
3. I first analysed all mp3 files by track and assigned with Apply Track Gain

 

Replay Gain - HowTo exactly ?

Reply #17
No idea ? Anyone ?