Replay Gain: Difference between revisions

From Hydrogenaudio Knowledgebase
No edit summary
(name change)
 
(126 intermediate revisions by 42 users not shown)
Line 1: Line 1:
=Introduction=
#REDIRECT [[ReplayGain]]
Replaygain calculates the average perceived loudness of either a track (track gain) or an album (album gain) and uses this information to properly adjust the volume of tracks, that are mastered at different volume levels, during playback. This will make sure that you will have a similar volume levels on all of your tracks or albums without losing any dynamic range of your music. In the case of Album Gain, it will even make sure that more quiet tracks of an album will sound more quiet and tracks that where meant to be louder, louder.
It shouldn't be confused with algorithms that adjust playback volume dynamically within a single track.
 
=Implementations=
There are different replaygain implementations, each with its own uses and strength. Most of them use [[meta data]] 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 [[meta data]] and does not touch the audio itself.
 
Replaygain has significant advantages over normalizing. It allows the peak loudness of a song to be consistent over an entire collection of audio, much like normalizing (this is called 'Track Gain'). However, it also allows the peak loudness of an album to be consistent over a entire music collection, allowing the dynamics of album to remain (This is called 'Album Gain'). In a [[meta data]] based solution, information on both types of replaygain can be stored, and the desired playback effect can be switched back and forth in the appropriate player. However, if the audio is permanently modified, only one type of raplaygain can be chosen.
 
==MP3Gain==
[http://mp3gain.sourceforge.net/ MP3Gain]
 
 
Format: [[MP3]]
 
Method: Audio or Meta
 
* In Meta mode, the tags are written in [[APEv2]] tags.
* In Audio Data Mode, the gain is applied to each frame's gain byte, and the process can be perfectly reverted.
 
Limitations: Limited to 1.5db steps in Audio Data mode
 
==LAME==
[http://lame.sourceforge.net/ LAME]
 
 
Format: [[MP3]]
 
Method: Header ([http://gabriel.mp3-tech.org/mp3infotag.html mp3infotag])
 
Notes: Added during encoding; not supported by any player yet; Track Gain only
 
 
==Replaygain==
[http://rarewares.org/mpc.html MPC replaygain]
 
 
Format: MPC
 
Method: Header (similar to Meta data method. See "notes".)
 
Notes: Replaygain values are stored in the header and replaygain is part of the Musepack specifications; therefore any Musepack decoder that does not support replaygain can be considered broken.
 
 
==Vorbisgain==
[http://www.sjeng.org/vorbisgain.html Vorbisgain]
 
 
Format: [[Ogg Vorbis]]
 
Method: Meta (in [[Vorbis comment]])
 
 
==FLAC/metaflac==
[http://flac.sf.net FLAC]
 
 
Format: [[FLAC]]
 
Method: Meta (in [[Vorbis comment]])
 
==foobar2000 replaygain scanner==
[http://foobar2000.org Foobar2000]
 
 
Format:
* [[MP3]]: Values written to [[APEv2]] or [[ID3v2]] tags.
* [[MPC]]: Values written to header as decribed under "replaygain".
* [[Ogg Vorbis]]: In [[Vorbis comment]].
* [[AAC]]: Values written to [[APEv2]] tags.
* [[MP4]]: Uses its own itunes-compatible tagging system (though itunes does not support replaygain).
* [[FLAC]]: In [[Vorbis comment]].
* [[APE]]: Values written to [[APEv2]] tags.
* [[WAV]]: 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.
 
You can also choose to only have the replaygain values saved in the foobar2000 database and leave the files untouched.
 
All other formats are supported but the replaygain values are saved to the foobar2000 database.
 
 
==Wavegain==
[http://www.rarewares.org/files/others/wavegain.zip Wavegain]
 
 
Format: PCM Wave
 
Method: Audio
 
Limitations: Irreversible
 
 
=Players support=
Replaygain being present in the specs of flac, mpc and ape formats, any player that support those formats usually support replaygain.
 
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 replaygain in all possible aspects. (it can also calculate replaygain)
* [[Winamp]]. MP3 replaygain support with adequate plugins (e.g. [http://www3.cypress.ne.jp/otachan/in_mpg123.html Otachan's in_mpg123] - if your japanese is not that good, you can find details [http://www.hydrogenaudio.org/forums/index.php?showtopic=18530 in this thread])
 
and probably others.
 
==Linux==
* [[XMMS]]. MP3 replaygain with [http://perso.crans.org/~krempp/xmms-mad/ custom plugin] can read RG info from APEv2 tags.
 
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 replaygain tags in the near future.
 
==Portable devices==
Sadly, none that I know of. So re-encoding (or using mp3gain) to attenuate the audio-data is the only solution.
 
The iPod features ''Soundcheck'', which seems to produce roughly the same normalization gains as replaygain, but doesnt provide an Album Gain.
 
=Additional reading=
* [http://replaygain.hydrogenaudio.org Original replaygain website] (this hasn't been updated since 2001, and everything there is outdated except for the description of the algorithm - but know that the 83dB SPL reference has since then be changed to 89 dB SPL ..)
* audio engineer Bob Katz's many interesting pages (e.g. [http://www.digido.com/portal/pmodule_id=11/pmdmode=fullscreen/pageadder_page_id=93/ this one]) is the best source to understand why replaygain is useful, and understand all that digital audio stuff. This actually was in part responsible for the design of replaygain by David Robinson in the first place, IIRC.

Latest revision as of 17:17, 27 July 2011

Redirect to: