View Full Version : Replay Gain

2004-11-22, 04:40 AM
Hello all. I was wondering if I could get a layman's explanation to what it is that Replay Gain does. I would also like to know what the community's stance on it being used in recordings is. I have quite a few recordings I'd like to put into FLAC and was wondering if adding RG would hurt their value. Thanks.

2004-11-22, 08:31 AM
It depends on when and how the replaygain is applied. Let me explain what replaygain is, and then how it can be used both for good and for evil.

First, replaygain is just a method by which the amplitude of an audio track is measured and the volume adjusted either up or down to bring it to a "normal" level. This is especially useful for people who put large random playlists from different albums into their favorite media player as it prevents the volume from adjusting from track to track.

Now, replaygain can be applied to tracks in different ways. The most useful is that it adds a file tag to the track, basically just telling the track how many dB up or down it needs to adjust itself to be at a "normal" level. This is totally harmless, as it keep the original audio identical and just uses a tag to make the adjustment. Anyone can then disable replaygain on their media player or simply delete the tag from the file, and they have the original, untouched audio.

Replaygain can be used by some encoders to perform the calculations and actually edit the audio inside the file to bring it to that normal level during encoding. This is not a good idea as it permanently changes the audio. It also falls under my "quickfix" category for audio mastering, which just means that it's allowing a computer algorithm to edit your audio for you...never a good idea. If you have volume issues that you want to permanetly adjust, you should learn how to do it right and manually adjust the ENTRIE SET simultaneously with Audition, Audacity, or a similar program.

Replaygain is a very good idea, and it works quite nicely, but it's not perfect. It's better to not edit the audio, but just add the tags to the files. I do this with a lot of FLAC seeds with foobar2000, but always note that the files are "ReplayGain Tagged" so that people know.....and can erase those tags if they don't like it. Doing so will not alter the audio and not cause and md5 checksum failure.

And...one more note....there are two replaygain modes that you can use, called "by track" and "by album". The former simplies runs the volume adjustment algorithm to each file individually, potentially cause some variation between tracks when playing back a whole album. The "by album" scans the entire album and comes up with an overall adjustment, which is nice when playing back albums as a whole but doesn't get the tracks quite as close to identical amplitude for playing large shuffled lists of various songs.

I use foobar2000 for replaygain tagging, and it scans for both track and album gains, and allows you to playback using either one of, or neither of, those modes. It also has an option the use replaygain when converting a set of files to a new format, but warns that this will edit the audio and is not recommended for lossless trading.

Hope this helps...

2004-11-22, 01:58 PM
I'm assuming that the Replay Gain feature in FLACFrontend changes the audio, instead of adding tags. If this is so, there should be a caution about using this feature inserted into a FAQ somewhere.

2004-11-22, 04:07 PM
I don't use Flac Frontend (so I could be wrong) but, flac.exe and metaflac.exe add replaygain to the vorbis comments (tags) and don't change the audio. If Flac Frontend is truely a "frontend" for flac.exe & metaflac.exe (which I believe it is), then the replaygain values should be tagged similarly. You can always list the vorbis comments from the command line:
metaflac --list --block-number=2 filename.flac
(the vorbis comment block is usually the #2, but it could be different).

2004-11-29, 11:35 AM
I'm assuming that the Replay Gain feature in FLACFrontend changes the audio, instead of adding tags. If this is so, there should be a caution about using this feature inserted into a FAQ somewhere.
FLAC frontend does NOT encode the files with replaygain, it only adds the necessary tags. I just verified this with some files on my computer. This is a totally safe process if you choose to include these tags on your files....