Replay Gain: Difference between revisions
m (Replaygain moved to Replay Gain: official spelling) |
(adapted official spelling (replaygain -> Replay Gain)) |
||
Line 1: | Line 1: | ||
''' | '''Replay Gain''' is the name of a technique invented to achieve the same playback volume of audio files. It specifies the reference level of 89dB and an algorithm to measure the '''perceived''' loudness of audio data. | ||
Replay Gain is different from [[Normalization|peak normalization]]. In peak normalization, you merely ensure that the peak amplitude reaches a certain level. This does not ensure equal loudness. The Replay Gain technique measures the ''effective power'' (i.e. taking RMS after an ''Equal Loudness contour'') of the waveform, and amplifies the waveform accordingly. The result is that Replay Gained waveforms are usually more uniformly amplified that peak-normalized waveforms. | |||
== Implementations == | |||
There are different Replay Gain implementations, each with its own uses and strength. Most of them use [[metadata]] to indicate the level of the volume change (Volume is adjusted on playback; needs player/decoder support) others modify the audio data itself. Generally it is recommended to use an implementation which uses the metadata and does not touch the audio itself. | |||
In a metadata based solution, information on both types of Replay Gain can be stored, and the desired playback effect can be switched back and forth in the appropriate player. However, if the audio data is permanently modified, only one type of Replay Gain can be chosen. Furthermore, if the audio data is modified, you may not be able to restore the original data, especially if the Replay Gain technique produces a negative amplification. | |||
Replay Gain has significant advantages over normalizing. It allows the loudness of a song to be consistant over an entire collection of audio, similar to (but more accurate than) RMS normalizing (this is called 'Track Gain', or 'Radio Gain' in earlier parlance). However, it also allows the loudness of an album to be consistant over a entire music collection, allowing the dynamics of album to remain (This is called 'Album Gain', or 'Audiophile Gain' in earlier parlance). This is usually very important in classical CDs, as there may be quiet segments and loud segments written into different tracks. | |||
=== MP3Gain === | |||
[[MP3Gain]] is an implementation of Replay Gain. It either modifies target data reversibly, or attaches metadata. | |||
===MP3Gain=== | |||
[[MP3Gain]] is an implementation of | |||
* Format: [[MP3]] | * Format: [[MP3]] | ||
Line 21: | Line 18: | ||
* http://mp3gain.sourceforge.net/ | * http://mp3gain.sourceforge.net/ | ||
=== [[LAME]] === | |||
===[[LAME]]=== | |||
* Method: Header ([http://gabriel.mp3-tech.org/mp3infotag.html mp3infotag]) | * Method: Header ([http://gabriel.mp3-tech.org/mp3infotag.html mp3infotag]) | ||
* Notes: | * Notes: | ||
** Tags added during encoding; not supported by any player yet; Track Gain only | ** Tags added during encoding; not supported by any player yet; Track Gain only | ||
** | ** Replay Gaining MP3's are usually done using MP3Gain (see [[Replay Gain#MP3Gain|above]]) or [[Replay Gain#foobar2000 Replay Gain scanner|foobar2000]] | ||
* http://lame.sourceforge.net/ | * http://lame.sourceforge.net/ | ||
=== [[Musepack]] Replay Gain === | |||
===[[ | |||
* Method: Header (similar to Meta data method) | * Method: Header (similar to Meta data method) | ||
* Notes: | * Notes: Replay Gain values are stored in the header and Replay Gain is part of the Musepack specifications; therefore any Musepack decoder that does not support Replay Gain can be considered broken. | ||
* http://rarewares.org/mpc.html | * http://rarewares.org/mpc.html | ||
=== VorbisGain === | |||
===VorbisGain=== | * Format: (Ogg) [[Vorbis]] | ||
* Format: [[ | |||
* Method: Meta (in [[Vorbis comment]]) | * Method: Meta (in [[Vorbis comment]]) | ||
* http://www.sjeng.org/vorbisgain.html | * http://www.sjeng.org/vorbisgain.html | ||
** new compiles of VorbisGain at [http://www.rarewares.org/ogg.html www.rarewares.org] | ** new compiles of VorbisGain at [http://www.rarewares.org/ogg.html www.rarewares.org] | ||
:'''''Note:''' Andavari has provided a very useful script to integrate VorbisGain, which is a CLI tool, into Windows Explorer. Please [[ | :'''''Note:''' Andavari has provided a very useful script to integrate VorbisGain, which is a CLI tool, into Windows Explorer. Please (Ogg) [[Vorbis#Replay Gain|check this section]]. | ||
=== FLAC / METAFLAC === | |||
* Format: [[FLAC]] | * Format: [[FLAC]] | ||
* Method: Meta (in [[Vorbis comment]]) | * Method: Meta (in [[Vorbis comment]]) | ||
* http://flac.sf.net | * http://flac.sf.net | ||
=== WavPack / WVGAIN === | |||
===WavPack / WVGAIN=== | |||
* Format: [[WavPack]] | * Format: [[WavPack]] | ||
* Method: Meta (in [[APEv2]] tag) | * Method: Meta (in [[APEv2]] tag) | ||
* http://www.wavpack.com | * http://www.wavpack.com | ||
=== Wavegain === | |||
===Wavegain=== | |||
* Format: waveform | * Format: waveform | ||
* Method: Audio | * Method: Audio | ||
Line 67: | Line 53: | ||
* http://www.rarewares.org/files/others/wavegain.zip | * http://www.rarewares.org/files/others/wavegain.zip | ||
=== [[foobar2000]] Replay Gain scanner === | |||
===[[foobar2000]] | |||
* Format: | * Format: | ||
** [[MP3]]: Values written to [[APEv2]] or [[ID3v2]] tags. | ** [[MP3]]: Values written to [[APEv2]] or [[ID3v2]] tags. | ||
** [[ | ** [[Musepack]]: Values written to header. | ||
** [[ | ** (Ogg) [[Vorbis]]: Values written to [[Vorbis comment]]. | ||
** [[WavPack]]: Values written to [[APEv2]] tags. | ** [[WavPack]]: Values written to [[APEv2]] tags. | ||
** [[AAC]]: Values written to [[APEv2]] tags. | ** [[AAC]]: Values written to [[APEv2]] tags. | ||
** [[MP4]]: Uses its own | ** [[MP4]]: Uses its own iTunes-compatible tagging system (though iTunes does not support Replay Gain). | ||
** [[FLAC]]: Values written to [[Vorbis comment]]. | ** [[FLAC]]: Values written to [[Vorbis comment]]. | ||
** [[APE]]: Values written to [[APEv2]] tags. | ** [[APE]]: Values written to [[APEv2]] tags. | ||
** Modules ([[MOD]] etc.): Optionally saved into [[APEv2]] tags; otherwise the foobar2000 database is used. | ** Modules ([[MOD]] etc.): Optionally saved into [[APEv2]] tags; otherwise the foobar2000 database is used. | ||
** All other formats are supported but the | ** All other formats are supported but the Replay Gain values are saved to the foobar2000 database. | ||
* You can also choose to only have the | * You can also choose to only have the Replay Gain values saved in the foobar2000 database and leave the files untouched. | ||
* http://foobar2000.org | * http://foobar2000.org | ||
===[[MediaMonkey]]=== | === [[MediaMonkey]] === | ||
* Format: | * Format: | ||
** [[MP3]]: Values written to [[APEv2]] or [[ID3v2]] tags. | ** [[MP3]]: Values written to [[APEv2]] or [[ID3v2]] tags. | ||
** [[ | ** (Ogg) [[Vorbis]]: Values written to [[Vorbis comment]]. | ||
** [[WMA]]: Values stored in MediaMonkey's MDB database. | ** [[WMA]]: Values stored in MediaMonkey's MDB database. | ||
** [[FLAC]]: Values written to [[Vorbis comment]]. | ** [[FLAC]]: Values written to [[Vorbis comment]]. | ||
** [[APE]]: Values written to [[APEv2]] tags. | ** [[APE]]: Values written to [[APEv2]] tags. | ||
** [[WAV]]: Values stored in MediaMonkey's MDB database. | ** [[WAV]]: Values stored in MediaMonkey's MDB database. | ||
* In addition to tags, all | * In addition to tags, all Replay Gain values are also stored in MediaMonkey's MDB database | ||
* Does not support Album/Audiophile | * Does not support Album/Audiophile Replay Gain | ||
* Also capable of (irreversibly) changing the volume of MP3 tracks, similar to [[MP3Gain]] | * Also capable of (irreversibly) changing the volume of MP3 tracks, similar to [[MP3Gain]] | ||
* http://www.mediamonkey.com | * http://www.mediamonkey.com | ||
==Players support== | == Players support == | ||
Replay Gain being present in the specs of FLAC, Musepack, and APE formats, any player that support those formats usually support Replay Gain. | |||
The situation with MP3 is rather different, as it was not part of the MP3 specs. The APEv2 tags metadata implementation is somewhat becoming the de-facto standard. | The situation with MP3 is rather different, as it was not part of the MP3 specs. The APEv2 tags metadata implementation is somewhat becoming the de-facto standard. | ||
=== Windows === | |||
===Windows=== | * [[Foobar2000]] supports Replay Gain in all possible aspects. | ||
* [[Foobar2000]] supports | |||
* [[Winamp]] | * [[Winamp]] | ||
** MP3 | ** MP3 Replay Gain support with adequate plugins (e.g. [http://otachan.com/in_!mpg123.html Otachan's in_!mpg123] - if you can't read japanese, you can find details [http://www.hydrogenaudio.org/forums/index.php?showtopic=18530 in this thread]) | ||
** [[ | ** (Ogg) [[Vorbis]] Replay Gain support | ||
* [[MediaMonkey]] supports track | * [[MediaMonkey]] supports track Replay Gain only | ||
* [[XMPlay]] recently implemented | * [[XMPlay]] recently implemented Replay Gain | ||
''...and probably others.'' | ''...and probably others.'' | ||
=== Linux === | |||
===Linux=== | * [[XMMS]]. Reads Replay Gain from [[FLAC]], [[Musepack]], (Ogg) [[Vorbis]] .. | ||
:For [[MP3]], use the CVS version of the [http://xmms-mad.sourceforge.net/ xmms-mad] mp3 plugin (it's not yet released as binary, furthermore not available in distribs' versions for now. Meanwhile binaries are available here: [http://perso.crans.org/~krempp/xmms-mad/ custom binaries]) | |||
* [[XMMS]]. Reads | * [[amarok]]. By using the amarok-script [http://kde-apps.org/content/show.php?content=26073 Replay Gain] | ||
:For [[MP3]], use the CVS version of the [http://xmms-mad.sourceforge.net/ xmms-mad] | :And possibly others, since [http://developer.kde.org/~wheeler/taglib.html TagLib] added support for [[APEv2]] tags in [[MP3]] files, players using this library (like [[amaroK]] and [[JuK]]) might support that kind of Replay Gain tags in the near future. | ||
* [[amarok]]. By using the amarok-script [http://kde-apps.org/content/show.php?content=26073 | * [http://www.sacredchao.net/quodlibet Quod Libet] reads Replay Gain from (Ogg) [[Vorbis]], [[MP3]], [[FLAC]], and [[Musepack]]. | ||
:And possibly others, since [http://developer.kde.org/~wheeler/taglib.html TagLib] added support for [[APEv2]] tags in [[MP3]] files, players using this library (like [[amaroK]] and [[JuK]]) might support that kind of | :Requires support to be enabled (via the appropriate python bindings and libraries) for the above formats. Does not support Replay Gain values stored in [[APEv2]] tags in [[MP3]]s. Replay Gain values are stored in RVA2 id3v2.4 frames. See the [http://www.sacredchao.net/quodlibet/wiki/Development/ID3Notes Quod Libet RVA2 / Replay Gain notes]. | ||
* [http://www.sacredchao.net/quodlibet Quod Libet] reads | * [http://www.musicpd.org/ Music Player Daemon] (MPD) reads Replay Gain from (Ogg) [[Vorbis]], [[FLAC]], and [[Musepack]]. | ||
:Requires support to be enabled (via the appropriate python bindings and libraries) for the above formats. Does not support | |||
* [http://www.musicpd.org/ Music Player Daemon] (MPD) reads | |||
:Foobar2000 style TXXX frames in [[MP3]]s are also supported in the latest development releases. | :Foobar2000 style TXXX frames in [[MP3]]s are also supported in the latest development releases. | ||
===Portable devices=== | === Portable devices === | ||
Current development builds of [http://www.rockbox.org/ Rockbox] for the iRiver H100 and H300 series players support Replay Gain for some encoder formats. This is a rapidly evolving feature. There are no other portable players known to support Replay Gain. | |||
Current development builds of [http://www.rockbox.org/ Rockbox] for the iRiver H100 and H300 series players support | |||
The iPod features ''Soundcheck'', which seems to produce roughly the same normalization gains as Replay Gain, but doesn't provide an Album Gain. | |||
Slim Devices a company owened by Logitech Inc, supports | === Hi-Fi === | ||
Slim Devices a company owened by Logitech Inc, supports Replay Gain on both of their hi-end audiophile players, known as the [[Slim Devices Transporter|Transporter]] and the [[Slim Devices Squeezebox|Squeezebox]]. | |||
==External links== | == External links == | ||
* [http://replaygain.hydrogenaudio.org Original Replay Gain website] | * [http://replaygain.hydrogenaudio.org Original Replay Gain website] | ||
* [http://en.wikipedia.org/wiki/Replay_Gain Replay Gain] at Wikipedia | * [http://en.wikipedia.org/wiki/Replay_Gain Replay Gain] at Wikipedia |
Revision as of 14:38, 13 June 2007
Replay Gain is the name of a technique invented to achieve the same playback volume of audio files. It specifies the reference level of 89dB and an algorithm to measure the perceived loudness of audio data.
Replay Gain is different from peak normalization. In peak normalization, you merely ensure that the peak amplitude reaches a certain level. This does not ensure equal loudness. The Replay Gain technique measures the effective power (i.e. taking RMS after an Equal Loudness contour) of the waveform, and amplifies the waveform accordingly. The result is that Replay Gained waveforms are usually more uniformly amplified that peak-normalized waveforms.
Implementations
There are different Replay Gain implementations, each with its own uses and strength. Most of them use metadata to indicate the level of the volume change (Volume is adjusted on playback; needs player/decoder support) others modify the audio data itself. Generally it is recommended to use an implementation which uses the metadata and does not touch the audio itself.
In a metadata based solution, information on both types of Replay Gain can be stored, and the desired playback effect can be switched back and forth in the appropriate player. However, if the audio data is permanently modified, only one type of Replay Gain can be chosen. Furthermore, if the audio data is modified, you may not be able to restore the original data, especially if the Replay Gain technique produces a negative amplification.
Replay Gain has significant advantages over normalizing. It allows the loudness of a song to be consistant over an entire collection of audio, similar to (but more accurate than) RMS normalizing (this is called 'Track Gain', or 'Radio Gain' in earlier parlance). However, it also allows the loudness of an album to be consistant over a entire music collection, allowing the dynamics of album to remain (This is called 'Album Gain', or 'Audiophile Gain' in earlier parlance). This is usually very important in classical CDs, as there may be quiet segments and loud segments written into different tracks.
MP3Gain
MP3Gain is an implementation of Replay Gain. It either modifies target data reversibly, or attaches metadata.
- Format: MP3
- Method: Audio / Meta
- Limitations: Limited to 1.5dB steps mode, may become irreversible
- http://mp3gain.sourceforge.net/
LAME
- Method: Header (mp3infotag)
- Notes:
- Tags added during encoding; not supported by any player yet; Track Gain only
- Replay Gaining MP3's are usually done using MP3Gain (see above) or foobar2000
- http://lame.sourceforge.net/
Musepack Replay Gain
- Method: Header (similar to Meta data method)
- Notes: Replay Gain values are stored in the header and Replay Gain is part of the Musepack specifications; therefore any Musepack decoder that does not support Replay Gain can be considered broken.
- http://rarewares.org/mpc.html
VorbisGain
- Format: (Ogg) Vorbis
- Method: Meta (in Vorbis comment)
- http://www.sjeng.org/vorbisgain.html
- new compiles of VorbisGain at www.rarewares.org
- Note: Andavari has provided a very useful script to integrate VorbisGain, which is a CLI tool, into Windows Explorer. Please (Ogg) check this section.
FLAC / METAFLAC
- Format: FLAC
- Method: Meta (in Vorbis comment)
- http://flac.sf.net
WavPack / WVGAIN
- Format: WavPack
- Method: Meta (in APEv2 tag)
- http://www.wavpack.com
Wavegain
- Format: waveform
- Method: Audio
- Limitations: Irreversible
- http://www.rarewares.org/files/others/wavegain.zip
foobar2000 Replay Gain scanner
- Format:
- MP3: Values written to APEv2 or ID3v2 tags.
- Musepack: Values written to header.
- (Ogg) Vorbis: Values written to Vorbis comment.
- WavPack: Values written to APEv2 tags.
- AAC: Values written to APEv2 tags.
- MP4: Uses its own iTunes-compatible tagging system (though iTunes does not support Replay Gain).
- FLAC: Values written to Vorbis comment.
- APE: Values written to APEv2 tags.
- Modules (MOD etc.): Optionally saved into APEv2 tags; otherwise the foobar2000 database is used.
- All other formats are supported but the Replay Gain values are saved to the foobar2000 database.
- You can also choose to only have the Replay Gain values saved in the foobar2000 database and leave the files untouched.
MediaMonkey
- Format:
- In addition to tags, all Replay Gain values are also stored in MediaMonkey's MDB database
- Does not support Album/Audiophile Replay Gain
- Also capable of (irreversibly) changing the volume of MP3 tracks, similar to MP3Gain
- http://www.mediamonkey.com
Players support
Replay Gain being present in the specs of FLAC, Musepack, and APE formats, any player that support those formats usually support Replay Gain.
The situation with MP3 is rather different, as it was not part of the MP3 specs. The APEv2 tags metadata implementation is somewhat becoming the de-facto standard.
Windows
- Foobar2000 supports Replay Gain in all possible aspects.
- Winamp
- MP3 Replay Gain support with adequate plugins (e.g. Otachan's in_!mpg123 - if you can't read japanese, you can find details in this thread)
- (Ogg) Vorbis Replay Gain support
- MediaMonkey supports track Replay Gain only
- XMPlay recently implemented Replay Gain
...and probably others.
Linux
- For MP3, use the CVS version of the xmms-mad mp3 plugin (it's not yet released as binary, furthermore not available in distribs' versions for now. Meanwhile binaries are available here: custom binaries)
- amarok. By using the amarok-script Replay Gain
- And possibly others, since TagLib added support for APEv2 tags in MP3 files, players using this library (like amaroK and JuK) might support that kind of Replay Gain tags in the near future.
- Quod Libet reads Replay Gain from (Ogg) Vorbis, MP3, FLAC, and Musepack.
- Requires support to be enabled (via the appropriate python bindings and libraries) for the above formats. Does not support Replay Gain values stored in APEv2 tags in MP3s. Replay Gain values are stored in RVA2 id3v2.4 frames. See the Quod Libet RVA2 / Replay Gain notes.
- Music Player Daemon (MPD) reads Replay Gain from (Ogg) Vorbis, FLAC, and Musepack.
- Foobar2000 style TXXX frames in MP3s are also supported in the latest development releases.
Portable devices
Current development builds of Rockbox for the iRiver H100 and H300 series players support Replay Gain for some encoder formats. This is a rapidly evolving feature. There are no other portable players known to support Replay Gain.
The iPod features Soundcheck, which seems to produce roughly the same normalization gains as Replay Gain, but doesn't provide an Album Gain.
Hi-Fi
Slim Devices a company owened by Logitech Inc, supports Replay Gain on both of their hi-end audiophile players, known as the Transporter and the Squeezebox.
External links
- Original Replay Gain website
- Replay Gain at Wikipedia
- Replay Gain using Foobar 2000 (how-to).