ReplayGain

Last updated • 4 min readFrom Wikipedia, The Free Encyclopedia

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.

Contents

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 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 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 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

Implementations

NamePlatformsCan writeRef.
AIMP
  • Windows
  • Android
Yes [lower-alpha 5]
Amarok
  • Linux
  • NetBSD
  • FreeBSD
  • macOS
  • Windows
Yes [lower-alpha 6]
AmberolLinuxNo [lower-alpha 7]
Audacious
  • Linux
  • Windows
No
Banshee
  • Linux
  • macOS (beta)
  • Windows (alpha)
Yes [lower-alpha 8]
beaTunes
  • macOS
  • Windows
Yes [lower-alpha 9]
BTR Amp
  • iOS/iPadOS
No [lower-alpha 10]
Clementine
  • Linux
  • macOS
  • (32-bit) Windows
No
cmus Unix-like Yes
DeaDBeeF
  • Linux
  • macOS
  • Windows
  • Unix-like
Yes [lower-alpha 11]
Exaile
  • Linux
  • Windows
  • macOS
No
Ex Falso/Quod Libet
  • Linux
  • Windows
  • macOS
Yes [lower-alpha 12]
foobar2000
  • Windows
  • iOS/iPadOS
  • Android
  • macOS
Yes [lower-alpha 1]
JRiver Media Center
  • Windows
  • macOS
  • Linux
Yes [lower-alpha 13]
JavaTunes
  • Java
No
Kodi (software)
  • Windows
  • macOS
  • Android
  • iOS
  • tvOS
  • Linux
  • Xbox
  • *BSD
No
Lightweight Music ServerYes [lower-alpha 14]
Lyrion Music Server Yes
Loudgain
  • Source code
Yes [lower-alpha 2]
MAD/madplay
  • Source code
Yes
MediaMonkey
  • Windows
  • Android
Yes
Mixxx [note 2]
  • Windows
  • macOS
  • Linux
Yes [lower-alpha 15]
mp3gain
  • Windows
Yes [lower-alpha 16]
mpg123
  • Linux
  • Windows
No
MPD
  • Windows
  • Linux
Yes
mpv
  • Windows
  • macOS
  • Linux
No
Muine
  • Linux
  • Unix-like
No [lower-alpha 17]
MusicBee
  • Windows
Yes [lower-alpha 18]
Nightingale
  • Linux
  • Windows
  • macOS
No [lower-alpha 19]
PowerAMP
  • Android
No
ProppFrexx ONAIR
  • Windows
Yes [lower-alpha 20]
RadioBOSS
  • Windows
Yes
Rockbox Yes
SoX
  • Windows
  • Linux
  • macOS
Yes
Vanilla Music
  • Android
No
Vinyl Music Player
  • Android
No
VLC media player No
Winamp
  • Windows
Yes
XMPlay
  • Windows
Yes
Zortam Mp3 Media Studio
  • Windows
  • Android
Maybe [note 3]

Streaming

See also

Notes

  1. Although the original ReplayGain proposal used the 83 dB SPL reference level unchanged, an early departure from the proposal to 89 dB SPL was endorsed by its author. [4]
  2. Uses MAD.
  3. Exclusive to the Pro version on Windows.

Related Research Articles

<span class="mw-page-title-main">Vorbis</span> Royalty-free lossy audio encoding format

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 commonly used in conjunction with the Ogg container format and it is therefore often referred to as Ogg Vorbis.

<span class="mw-page-title-main">FLAC</span> Lossless digital audio coding format

FLAC 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 package that includes a codec implementation. Digital audio compressed by FLAC's algorithm can typically be reduced to between 50 and 70 percent of its original size and decompresses to an identical copy of the original audio data.

foobar2000 Freeware audio player

foobar2000 is a freeware audio player for Microsoft Windows, iOS, Android, macOS, and formerly Windows Phone, developed by Peter Pawłowski. It has a modular design, which provides user flexibility in configuration and customization. Standard "skin" elements can be individually augmented or replaced with different dials and buttons, as well as visualizers such as waveform, oscilloscope, spectrum, spectrogram (waterfall), peak and smoothed VU meters, which all of them are analysis-oriented, at least for built-in visualizations. foobar2000 offers third-party user interface modifications through a software development kit (SDK).

ID3 is a metadata container most often used in conjunction with the MP3 audio file format. It allows information such as the title, artist, album, track number, and other information about the file to be stored in the file itself.

APE tags comprise one extant convention used to store information (metadata) about a given digital audio file. Each APE tag constitutes a discrete element that describes a single attribute of the file's contents. Each consists of a key/value pair; the key is simply a label that names the attribute, such as Year, Title, Artist, or Track Number, etc.), and associated with it is a corresponding value, namely, some information descriptive of this file, in terms of the attribute in question. APE tags can be used with .ape-formatted recordings, as well as with sound files of other audio file formats.

<span class="mw-page-title-main">Muine</span> Open source audio player

Muine is a discontinued audio player for the GNOME desktop environment which runs on Linux, Solaris, BSD and other UNIX-like systems. Muine is written in C# using Mono and Gtk#. The default backend is GStreamer framework but Muine can also use xine libraries.

Audio normalization is the application of a constant amount of gain to an audio recording to bring the amplitude to a target level. Because the same amount of gain is applied across the entire recording, the signal-to-noise ratio and relative dynamics are unchanged. Normalization is one of the functions commonly provided by a digital audio workstation.

Gapless playback is the uninterrupted playback of consecutive audio tracks, such that relative time distances in the original audio source are preserved over track boundaries on playback. For this to be useful, other artifacts at track boundaries should not be severed either. Gapless playback is common with compact discs, gramophone records, or tapes, but is not always available with other formats that employ compressed digital audio. The absence of gapless playback is a source of annoyance to listeners of music where tracks are meant to segue into each other, such as some classical music, progressive rock, concept albums, electronic music, and live recordings with audience noise between tracks.

Music Player Daemon (MPD) is a free and open source music player server. It plays audio files, organizes playlists and maintains a music database. In order to interact with it, a client program is needed. The MPD distribution includes mpc, a simple command line client.

Dialnorm is the metadata parameter that controls playback gain within the Dolby Laboratories Dolby Digital (AC-3) audio compression system. Dialnorm stands for dialog normalization. Dialnorm is an integer value with range 1 to 31 corresponding to a playback gain of -30 to 0 dB (unity) respectively. Higher values afford more headroom and are appropriate for dynamic material such as an action film.

<span class="mw-page-title-main">MP3Gain</span> Volume normalization software

MP3Gain is an audio normalization software tool. The tool is available on multiple platforms and is free software. It analyzes the MP3 and reversibly changes its volume. The volume can be adjusted for single files or as album where all files would have the same perceived loudness. It is an implementation of ReplayGain. In 2015 Debian and Ubuntu removed it from their repositories due to a lack of an active maintainer.

mp3DirectCut Audio editor

mp3DirectCut is a lossless editor for MP3 audio files, able to provide cuts and crops, copy and paste, gain and fades to audio files without having to decode or re-encode the audio. By modifying the global gain field of each frame of MPEG audio, the volume of that frame can be modified without altering the audio data itself. This allows for rapid, lossless MP3 audio editing that does not degrade the data from re-encoding. mp3DirectCut provides audio normalization and pause (silence) detection, and can split long recordings into separate files based on cue points in the audio, such as those provided by pause detection. mp3DirectCut can also record audio directly to MP3 from the computer's sound card input.

The following comparison of audio players compares general and technical information for a number of software media player programs. For the purpose of this comparison, "audio players" are defined as any media player explicitly designed to play audio files, with limited or no support for video playback. Multi-media players designed for video playback, which can also play music, are included under comparison of video player software.

<span class="mw-page-title-main">MusicBee</span> Media player for Microsoft Windows

MusicBee is a freeware media player for playback and organization of audio files on Microsoft Windows, built using the BASS audio library.

<span class="mw-page-title-main">Nightingale (software)</span> Open source audio player

Nightingale is a discontinued free, open source audio player based on the Songbird media player source code. As such, Nightingale's engine is based on the Mozilla XULRunner with libraries such as the GStreamer media framework and libtag providing media tagging and playback support, amongst others.

<span class="mw-page-title-main">Quod Libet (software)</span> Free and open source audio player

Quod Libet is a cross-platform free and open-source audio player, tag editor and library organizer. The main design philosophy is that the user knows how they want to organize their music best; the software is therefore built to be fully customizable and extensible using regular expressions and boolean logic. Quod Libet is based on GTK and written in Python, and uses the Mutagen tagging library.

<span class="mw-page-title-main">AIMP</span> Audio player software developed by Artem Izmaylov

AIMP is a freeware audio player for Windows and Android, originally developed by Russian developer Artem Izmaylov. It supports a variety of audio codecs, and includes tools to convert audio files and edit their metadata. It also has the capability of installing user-made skins and plugins. After its release, it has been well received by different parties.

<span class="mw-page-title-main">Puddletag</span> Tag editor for Unix-like operating systems

Puddletag is a graphical audio file metadata editor ("tagger") for Unix-like operating systems.

qmmp Open source audio player

Qmmp is a free and open-source cross-platform audio player that is similar to Winamp. It is written in C++ using the Qt widget toolkit for the user interface. It officially supports the operating systems Linux, FreeBSD and Microsoft Windows. In most Linux distributions, it is available through the standard package repositories. Until Audacious switched to Qt in version 4.0, qmmp was the only audio player to use Qt and not feature a database.

References

  1. David Robinson (2010-12-17), ReplayGain Specification discussion, Hydrogenaudio, retrieved 2011-07-12
  2. ReplayGain specification , retrieved 2011-04-15
  3. "ReplayGain 1.0 specification", Hydrogenaudio Knowledgebase, retrieved 2023-09-17
  4. Does Replay gain work differtly [sic] in Media monkey, Hydrogenaudio, 2010-10-07, retrieved 2010-12-30
  5. Sam Costello, Using Sound Check with iPod, About.com, retrieved 2010-05-11
  6. EBU (August 2011), Loudness normalisation and permitted maximum level of audio signals (PDF)
  7. Ian Stewart (October 24, 2019), Mastering for Streaming Platforms: 3 Myths Demystified, iZotope, retrieved 2020-10-28

Media player features pages

  1. 1 2 "Foobar2000:Preferences:ReplayGain Scanner – Hydrogenaudio Knowledgebase", wiki.hydrogenaud.io
  2. 1 2 Hormann, Matthias C. (2024-01-04), loudgain , retrieved 2024-01-21
  3. "Main features and Functions", AIMP for Windows, retrieved 2023-02-25
  4. "Main features and functionality", AIMP for Android
  5. [lower-alpha 3] [lower-alpha 4]
  6. Amarok 2.1 – back to the future, Padoca, 2009-02-15, retrieved 2010-12-30
  7. "ReplayGain support (!100) · Merge requests · World / amberol · GitLab". GitLab. 2022-07-25. Retrieved 2024-03-15.
  8. "YeOldeChangeLog", GitLab
  9. beaTunes , retrieved 2023-08-29, beaTunes allows you to perform the ReplayGain analysis and adjust the standardized, track-specific id3 tags
  10. "BTR AMP v13.0 – Volume Normalization – ReplayGain and Sound Check", BTR Labs, 2022-04-07, retrieved 2023-04-06
  11. "DeaDBeeF – The Ultimate Music Player", SourceForge , retrieved 2023-04-06
  12. "Replay Gain", Quod Libet, retrieved 2023-04-06
  13. "Replay Gain Adjustment", JRiverWiki, retrieved 2023-04-06
  14. Poupon, Emeric, "Web player: Replaygain support", lms issues, no. 38, retrieved 2024-01-21
  15. "Features", Mixxx, retrieved 2023-04-07, Mixxx reads existing ReplayGain tags and analyzes songs that don't have them.
  16. "MP3Gain", Sourceforge, retrieved 2023-04-07, MP3Gain analyzes and adjusts mp3 files so that they have the same volume.
  17. "updated TODO again, making the direction we're heading a bit clearer", GitLab, 2004-02-13
  18. MusicBee 2.3, 2014-02-17
  19. Giger, Martin, "Normalization?", Nightingale Forum, archived from the original on 2023-05-08, retrieved 2023-05-31, there is no reference of it being loaded or written to the file
  20. "Features", Qmmp, retrieved 2023-06-01, ReplayGain scanner