Jump to content

ReplayGain

From Wikipedia, the free encyclopedia

Template:Short description

Example of an APE tag with ReplayGain tags
Example of APE tags with ReplayGain tags

ReplayGain is a proposed technical standard published by David Robinson in 2001 to measure and normalize the perceived loudness of audio in computer audio formats such as MP3 and Ogg Vorbis. It allows media players to normalize loudness for individual tracks or albums. This avoids the common problem of having to manually adjust volume levels between tracks when playing audio files from albums that have been mastered at different loudness levels.

Although this de facto standard is now formally known as ReplayGain,[1] it was originally known as Replay Gain and is sometimes abbreviated RG.

ReplayGain is supported in a large number of media software and portable devices.

Operation

ReplayGain works by first performing a psychoacoustic analysis of an entire audio track or album to measure peak level and perceived loudness. Equal-loudness contours are used to compensate for frequency effects and statistical analysis is used to accommodate for effects related to time. The difference between the measured perceived loudness and the desired target loudness is calculated; this is considered the ideal replay gain value. Typically, the replay gain and peak level values are then stored as metadata in the audio file. ReplayGain-capable audio players use the replay gain metadata to automatically attenuate or amplify the signal on a per-track or per-album basis such that tracks or albums play at a similar loudness level. The peak level metadata can be used to prevent gain adjustments from inducing clipping in the playback device.[2]

Metadata

The original ReplayGain proposal specified an 8-byte field in the header of any file. Most implementations now use tags for ReplayGain information. FLAC and Ogg use the REPLAYGAIN_* Vorbis comment fields. Monkey's Audio and WavPack use APE tag while MP3 files usually use ID3v2. Other formats such as MP4 and WMA use their native tag formats with a specially formatted tag entry listing the track's replay gain and peak loudness.

ReplayGain utilities usually add metadata to the audio files without altering the original audio data. Alternatively, a tool can amplify or attenuate the data itself and save the result to another, gain-adjusted audio file; this is not perfectly reversible in most cases. 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 for directly applying the gain adjustment to MP3 files, adding undo information so that the process is reversible.

Target loudness

The target loudness is specified as the loudness of a stereo pink noise signal played back at 89 dB sound pressure level or −14 dB relative to full scale.[3] This is based on SMPTE recommendation RP 200:2002, which specifies a similar method for calibrating playback levels in movie theaters using a reference level 6 dB lower (83 dB SPL, −20 dBFS).[note 1]

Track-gain and album-gain

ReplayGain 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 Template:Dfni and Template:Dfni, which will be shared by the whole album, are calculated. Using the album-gain values during playback will preserve the volume differences among tracks on an album.

On playback, listeners may decide if they want all tracks to sound equally loud or if they want all albums to sound equally loud with different tracks having different loudness. In album-gain mode, when album-gain data is missing, players should use track-gain data instead.

Alternatives

  • Peak amplitude is not a reliable indicator of loudness, so consequently peak normalization does not offer reliable normalization of perceived loudness. RMS normalization is more accurate but does not take into account psychoacoustic aspects of loudness perception.
  • With dynamic range compression, volume may be altered on the fly on playback, producing a variable-gain normalization, as opposed to the constant gain as rendered by ReplayGain. While dynamic range compression is beneficial in keeping volume constant, it changes the artistic intent of the recording.
  • Sound Check is a proprietary Apple Inc. technology similar in function to ReplayGain. It is available in iTunes and on the iPod.[5]
  • Standard measurement algorithms for broadcast loudness monitoring applications were developed and released by the International Telecommunication Union (ITU-R BS.1770) and the European Broadcasting Union (EBU R128) in 2010 as part of the LUFS specification for units of loudness.[6][7] This new method has been used to measure loudness in newer ReplayGain utilities such as foobar2000 (since 1.1.6)[lower-alpha 1] and loudgain.[lower-alpha 2]

Implementations

Name Platforms Can write Template:Abbr
AIMP Template:Csl Template:Yes Template:Refn
Amarok Template:Csl Template:Yes [lower-alpha 3]
Amberol Linux Template:No [lower-alpha 4]
Audacious Template:Csl Template:No
Banshee Template:Csl Template:Yes [lower-alpha 5]
beaTunes Template:Csl Template:Yes [lower-alpha 6]
BTR Amp Template:Csl Template:No [lower-alpha 7]
Clementine Template:Csl Template:No
cmus Unix-like Template:Yes
DeaDBeeF Template:Csl Template:Yes [lower-alpha 8]
Exaile Template:Csl Template:No
Ex Falso/Quod Libet Template:Csl Template:Yes [lower-alpha 9]
foobar2000 Template:Csl Template:Yes [lower-alpha 1]
JRiver Media Center Template:Csl Template:Yes [lower-alpha 10]
JavaTunes Template:Csl Template:No
Kodi (software) Template:Csl Template:No
Lightweight Music Server Template:Csl Template:Yes [lower-alpha 11]
Lyrion Music Server Template:Csl Template:No
Loudgain Template:Csl Template:Yes [lower-alpha 2]
MAD/madplay Template:Csl Template:Yes
MediaMonkey Template:Csl Template:Yes
Mixxx[note 2] Template:Csl Template:Yes [lower-alpha 12]
mp3gain Template:Csl Template:Yes [lower-alpha 13]
mpg123 Template:Csl Template:No
MPD Template:Csl Template:Yes
mpv Template:Csl Template:No
Muine Template:Csl Template:No [lower-alpha 14]
MusicBee Template:Csl Template:Yes [lower-alpha 15]
Nightingale Template:Csl Template:No [lower-alpha 16]
PowerAMP Template:Csl Template:No
ProppFrexx ONAIR Template:Csl Template:Yes [lower-alpha 17]
RadioBOSS Template:Csl Template:Yes
Rockbox Template:Csl Template:Yes
SoX Template:Csl Template:Yes
Vanilla Music Template:Csl Template:No
Vinyl Music Player Template:Csl Template:No
VLC media player Template:Csl Template:No
Winamp Template:Csl Template:Yes
XMPlay Template:Csl Template:Yes
Zortam Mp3 Media Studio Template:Csl Template:Maybe[note 3]

See also

Notes

Template:Reflist

References

Template:Reflist

Media player features pages

Template:Reflist


Cite error: <ref> tags exist for a group named "note", but no corresponding <references group="note"/> tag was found
Cite error: <ref> tags exist for a group named "lower-alpha", but no corresponding <references group="lower-alpha"/> tag was found