Suvarna Garge (Editor)

ReplayGain

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

ReplayGain is a proposed standard published by David Robinson in 2001 to measure 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.

Contents

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

ReplayGain is now 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 levels and perceived loudness. The difference between the measured perceived loudness and the desired target loudness is calculated; this is considered the ideal replay gain value. Typically, the gain and peaks values are then stored as metadata in the audio file, allowing ReplayGain-capable audio players 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 information can be used to prevent gain adjustments from inducing clipping in the playback device.

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 Vorbis use the REPLAYGAIN_* Vorbis comment fields. MP3 files usually use ID3v2. Other formats such as AAC 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 of ReplayGain utilities is 89 dB sound pressure level. The SPL reference comes from a SMPTE recommendation used to calibrate playback levels in movie theaters.

A more common means of specifying a reference level is relative to a full-scale signal. ReplayGain nominally plays at -14 dB relative to full-scale leaving 14 dB of headroom for reproduction of dynamic material. In contrast, the SMPTE RP 200:2002, on which the ReplayGain reference was originally based, recommends 20 dB of headroom. The more recent EBU Recommendation R 128 suggests 23 dB.

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 peak-value and gain-value, which will be shared by the whole album, is 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 a little more accurate, but care must be taken not to introduce clipping, either by guaranteeing appropriate headroom or by using hard or soft limiting. (ReplayGain itself is an elaboration on RMS normalization.)
  • With audio level compression, volume may be altered on-the-fly on playback (meaning "variable gain", as opposed to the "constant gain" as rendered by ReplayGain), but the dynamic range will be compressed. Although this is beneficial in keeping volume constant at all times, it is not always desirable.
  • Sound Check is a proprietary Apple Inc. technology similar in function to ReplayGain. It is available in iTunes and on the iPod.
  • Standard measurement algorithms for broadcast loudness monitoring applications have recently been developed by the International Telecommunication Union (ITU-R BS.1770) and the European Broadcasting Union (EBU R128).
  • Portable media players

  • All devices with a working Rockbox port
  • Sandisk Sansa Fuze and Sansa Clip+
  • iPod through other programs that convert ReplayGain data to the Apple proprietary Sound Check format (e.g. iPod Manager for foobar2000, other alternatives elsewhere on this page)
  • Typical CD players and other legacy audio players do not support ReplayGain.

    Android compatible players

  • DeaDBeeF
  • foobar2000 for Android
  • GoneMAD Music Player
  • Neutron Music Player
  • MyTunes
  • PowerAMP
  • Vanilla Music
  • Winamp PRO for Android
  • XenoAmp Music Player
  • Scanners

  • beaTunes: Writes the standard replaygain_track_gain/replaygain_track_peak tags and replaces the iTunNORM metadata tag value, which is used by iTunes software and iPod music players for Sound Check volume normalization.
  • Ex Falso: Included plugin scans files on a per-album base, writes the standard tags into metadata.
  • EZ CD Converter: CD ripper and metadata converter.
  • FLAC and metaflac: Encoder can optionally generate metadata. Tagger generates metadata.
  • foobar2000: Generates metadata through included plugin using EBU R128 (but at old 89dB levels) for all supported tag formats.
  • iVolume: Replaces the iTunNORM metadata tag value (optionally on a per-album basis), which is used by iTunes software and iPod music players for Sound Check volume normalization.
  • LAME: Encoder writes metadata to LAME tag
  • MediaMonkey: Analyze Volume calculates RG values and writes them into the files as tags and into its library database
  • MP3Gain: (open source) generates metadata. Can directly modify original file and write undo information as metadata.
  • QuuxPlayer for Windows: calculates gain values and saves them in its library database; optionally writes ReplayGain tags to files with ID3v2 tags.
  • Quod Libet: Based on Ex Falso. Generates metadata through included plugin to analyze and write ReplayGain information
  • Rapid Evolution: Generates metadata
  • soundKonverter: frontend for various audio conversion tools. Is built using KDE Development Platform and has a ReplayGain tool.
  • Winamp: Generates metadata
  • rgain: Generates metadata
  • Sound Normalizer
  • References

    ReplayGain Wikipedia