ReplayGain is a proposed
technical standard
A technical standard is an established Social norm, norm or requirement for a repeatable technical task which is applied to a common and repeated use of rules, conditions, guidelines or characteristics for products or related processes and producti ...
published by David Robinson in 2001 to measure and
normalize the perceived
loudness
In acoustics, loudness is the subjectivity, subjective perception of sound pressure. More formally, it is defined as the "attribute of auditory sensation in terms of which sounds can be ordered on a scale extending from quiet to loud". The relat ...
of audio in computer
audio formats such as
MP3 and
Ogg Vorbis
Vorbis is a free and open-source software project headed by the Xiph.Org Foundation. The project produces an audio coding format and software reference encoder/decoder (codec) for lossy audio compression, libvorbis. Vorbis is most common ...
. 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
A ''de facto'' standard is a custom or convention that is commonly used even though its use is not required.
is a Latin phrase (literally " of fact"), here meaning "in practice but not necessarily ordained by law" or "in practice or actuality, ...
is now formally known as ReplayGain, 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 contour
An equal-loudness contour is a measure of sound pressure level, over the frequency spectrum, for which a listener perceives a constant loudness when presented with pure steady tones. The unit of measurement for loudness levels is the phon an ...
s 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
Metadata (or metainformation) is "data that provides information about other data", but not the content of the data itself, such as the text of a message or the image itself. There are many distinct types of metadata, including:
* Descriptive ...
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.
Metadata
The original ReplayGain proposal specified an 8-
byte
The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
field in the header of any file. Most implementations now use
tags for ReplayGain information.
FLAC
FLAC (; Free Lossless Audio Codec) is an audio coding format for lossless compression of digital audio, developed by the Xiph.Org Foundation, and is also the name of the free software project producing the FLAC tools, the reference software ...
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 is specified as the loudness of a stereo
pink noise
Pink noise, noise, fractional noise or fractal noise is a signal (information theory), signal or process with a frequency spectrum such that the power spectral density (power per frequency interval) is inversely proportional to the frequenc ...
signal played back at 89 dB
sound pressure level
Sound pressure or acoustic pressure is the local pressure deviation from the ambient (average or equilibrium) atmospheric pressure, caused by a sound wave. In air, sound pressure can be measured using a microphone, and in water with a hydrophone ...
or −14 dB
relative to full scale. This is based on
SMPTE
The Society of Motion Picture and Television Engineers (SMPTE) (, rarely ), founded by Charles Francis Jenkins in 1916 as the Society of Motion Picture Engineers or SMPE, is a global professional association of engineers, technologists, and e ...
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).
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 more accurate but does not take into account psychoacoustic aspects of loudness perception.
* With
dynamic range compression
Dynamic range compression (DRC) or simply compression is an audio signal processing operation that reduces the volume of loud sounds or amplifies quiet sounds, thus reducing or ''compressing'' an audio signal's dynamic range. Compression is c ...
, 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.
Apple Inc. is an American multinational corporation and technology company headquartered in Cupertino, California, in Silicon Valley. It is best known for its consumer electronics, software, and services. Founded in 1976 as Apple Comput ...
technology similar in function to ReplayGain. It is available in
iTunes
iTunes is a media player, media library, and mobile device management (MDM) utility developed by Apple. It is used to purchase, play, download and organize digital multimedia on personal computers running the macOS and Windows operating s ...
and on the
iPod
The iPod is a series of portable media players and multi-purpose mobile devices that were designed and marketed by Apple Inc. from 2001 to 2022. The iPod Classic#1st generation, first version was released on November 10, 2001, about mon ...
.
* Standard measurement algorithms for broadcast
loudness monitoring applications have recently been developed by the
International Telecommunication Union
The International Telecommunication Union (ITU)In the other common languages of the ITU:
*
* is a list of specialized agencies of the United Nations, specialized agency of the United Nations responsible for many matters related to information ...
(
ITU-R BS.1770) and the
European Broadcasting Union
The European Broadcasting Union (EBU; , UER) is an alliance of Public broadcasting, public service media organisations in countries within the European Broadcasting Area (EBA) or who are member states of the Council of Europe, members of the ...
(
EBU R128).
This new method has been used to measure loudness in newer ReplayGain utilities such as
foobar2000 (since 1.1.6)
and loudgain.
[
]
Implementations
Streaming
* Spotify
Spotify (; ) is a List of companies of Sweden, Swedish Music streaming service, audio streaming and media service provider founded on 23 April 2006 by Daniel Ek and Martin Lorentzon. , it is one of the largest providers of music streaming services ...
See also
* Alignment level
* Dialnorm
* EBU R 128
EBU R 128 is a recommendation for loudness normalisation and maximum level of audio signals. It is primarily followed during audio mixing of television and radio programmes and adopted by broadcasters to measure and control programme loudness. ...
* Loudness war
Notes
References
Media player features pages
{{reflist, group=lower-alpha
External links
ReplayGain specification
ReplayGain
at Hydrogenaudio wiki
A wiki ( ) is a form of hypertext publication on the internet which is collaboratively edited and managed by its audience directly through a web browser. A typical wiki contains multiple pages that can either be edited by the public or l ...
Replay Gain – A Proposed Standard
the original proposal, now out of date with respect to current practice
— guide to using graphical and command line ReplayGain tools in Linux.
Computer standards
Digital audio