Replay Gain works by first performing a psychoacoustic analysis scan of the entire audio file to measure the perceived loudness and peak levels. The difference between the loudness and the target loudness (usually 89 dB SPL) is calculated; this is the gain value. Typically, the gain value and the peak value are then stored in the audio file as metadata, allowing Replay Gain–compliant audio players to automatically attenuate (or in some cases amplify) the output so that such files will play back at similar loudness to one another. This avoids the common problem of having to manually adjust volume levels when playing audio files from different albums that have been mastered at different levels. With lossy files, another benefit of Replay Gain scanning is that the peak information can also be used to prevent loud songs from clipping. Finally, should the audio at its original levels be desired (i.e. for burning back to hard copy), the metadata can simply be ignored.
Replay Gain implementations usually involve adding metadata to the audio without altering the original audio data. While the Replay Gain standard specifies an 8-byte field in the header of any file, many popular audio formats use tags for Replay Gain information. FLAC and Ogg Vorbis use the
REPLAYGAIN_* comment fields. MP3 files usually use ID3v2 or APEv2 tags.
CD players and other legacy audio players do not support Replay Gain metadata. Nevertheless, some lossy audio formats, such as MP3, are structured in a way that they encode the volume of each compressed frame in a stream, and tools such as MP3Gain take advantage of this to change the volume of all frames in a stream, in a reversible way, without adding noise. Otherwise, a tool can amplify a PCM audio file and save the result to another PCM audio file; this is not perfectly reversible in most cases.
Replay Gain analysis can be performed on individual tracks so that all tracks will be of equal volume on playback. Analysis can also be performed on a per-album basis. In album gain analysis an additional peak value and gain value, which will be shared by the whole album, will be calculated. Using the album gain values will preserve the volume differences within an album.
On playback, assuming the metadata method is used, listeners may decide if they want all tracks to sound equally loud (track gain, formerly called radio gain) or if they want all albums to sound equally loud with different tracks having different loudness (album gain, formerly called audiophile gain). In album gain mode, when album gain data is missing, players should use track gain data instead.
--apply-replaygain-which-is-not-losslessas of version 1.1.1
iTunNORMmetadata tag value (optionally on a per-album basis), which is used by iTunes software and iPod music players for Sound Check volume normalization.