>The use of R128 also raises the question about "REPLAYGAIN_REFERENCE_LOUDNESS" >tag. Currently flac/metaflac writes "REPLAYGAIN_REFERENCE_LOUDNESS=89.0 dB" >but doesn't use it when decoding (it seems that nothing uses this tag). >R128 defines reference level differently, so this tag makes little sense for >it. IMHO it's better not to write this tag when (meta)flac uses R128 algorithm. >I use it :) To optionally allow adjustment of tracks containing different types of gain tag to a similar overall loudness. Admittedly this isn't common. Files using the original replaygain algorithm with a reference loudness of 83dB are now very rare, but R128 tags are starting to show up (eg. in Opus) and these play at a significantly different (quieter) level to tracks adjusted with the 89dB reference loudness tags. However the volume changes between the two different tagging systems are so dramatic that it is helpful to provide an automatic method of normalising them at least approximately. While adding the option for R128 gain into metaflac (and/or flac) would certainly be useful, I consider that scheme to be poorly suited to music playback. I certainly wouldn't want it to be imposed, or even the default. As the original, and still far more widespread, replaygain quickly discovered using a gain specification designed for movies leaves far too much headroom and hence is too quiet for music, far too quiet for standard commercial rock and pop recordings. R128 is even slightly worse in this respect, being more than 6dB (nominally 9dB, but possibly closer to 6dB in practice) quieter than replaygain. What that means is around 8 of the 16 bits in a typical music recording are unused, and I suspect most people would (rightly or wrongly) be horrified if you told them all their music was suddenly 8 bits. Turning up the volume cannot correct for that, although applying a preamp gain could. Music players that have adopted R128 or are planning it have often adjusted it by several dB to avoid the "too quiet" issue. With no standard in place concerning this and R128 itself being revised it isn't at all clear just what metaflac should do. Personally I think it would be better for players to automatically apply a preamp gain on top of R128 replay gain tags, but unless and until that is widely adopted, it would be unwise for encoders to reply on it.>The use of R128 also raises the question about "REPLAYGAIN_REFERENCE_LOUDNESS" >tag. Currently flac/metaflac writes "REPLAYGAIN_REFERENCE_LOUDNESS=89.0 dB" >but doesn't use it when decoding (it seems that nothing uses this tag). >R128 defines reference level differently, so this tag makes little sense for >it. IMHO it's better not to write this tag when (meta)flac uses R128 algorithm. > >(David Robinson, the author of ReplayGain, thinks that such tags are useless:It's useless only because nobody uses it :) To be honest there is very little need for it today. 99%+ of replaygain tags use the newer 89dB reference and 99%+ of players expect that (at least in their latest versions), so specifying the reference loudness really is useless except for a minuscule minority of situations, and almost certainly the players in those situations don't do anything with the tag anyway. So the only real purpose of the tag would be if it said something other than 89dB. I still parse it, if present, because it does no harm. --ian
Ian Nartowicz wrote:> I use it :) To optionally allow adjustment of tracks containing different > types of gain tag to a similar overall loudness. Admittedly this isn't > common. Files using the original replaygain algorithm with a reference > loudness of 83dB are now very rare, but R128 tags are starting to show up > (eg. in Opus) and these play at a significantly different (quieter) level to > tracks adjusted with the 89dB reference loudness tags.a) According to David Robinson, "ReplayGain tags should always be quoted relative to 89dB". So all files that were scanned 10 years ago with a reference level == 83dB should be fixed. And IMHO it's a good idea. b) According to http://wiki.xiph.org/OggOpus#Comment_Header there should be no REPLAYGAIN_*** tags in Opus files; Opus uses R128_TRACK_GAIN tag. If some audio player reads Opus tags then it should be aware of the difference between ReplayGain and R128. But this doesn't require REPLAYGAIN_REFERENCE_LOUDNESS tag.> While adding the option for R128 gain into metaflac (and/or flac) would > certainly be useful, I consider that scheme to be poorly suited to music > playback. I certainly wouldn't want it to be imposed, or even the default. As > the original, and still far more widespread, replaygain quickly discovered > using a gain specification designed for movies leaves far too much headroom and > hence is too quiet for music, far too quiet for standard commercial rock and pop > recordings. R128 is even slightly worse in this respect, being more than 6dB > (nominally 9dB, but possibly closer to 6dB in practice) quieter than > replaygain. What that means is around 8 of the 16 bits in a typical music > recording are unused, and I suspect most people would (rightly or wrongly) be > horrified if you told them all their music was suddenly 8 bits. Turning up the > volume cannot correct for that, although applying a preamp gain could.Are you sure? 8 unused bits require gain equal to -48 dB. Gain values for very loud over-compressed tracks are only -10...-15dB, so only 2...2.5 bits are 'unused'.> Music players that have adopted R128 or are planning it have often adjusted it > by several dB to avoid the "too quiet" issue. With no standard in place > concerning this and R128 itself being revised it isn't at all clear just what > metaflac should do. Personally I think it would be better for players to > automatically apply a preamp gain on top of R128 replay gain tags, but unless > and until that is widely adopted, it would be unwise for encoders to reply on > it.AFAICS the idea was to use R128 algorithm to calculate gain, but still write ReplayGain tags (not some new R128 tags), with the reference level that matches the reference level of the current RG algorithm. For example, foobar2000 uses the following formula: "RG_gain = -18 - loudness_by_R128" in accordance to the section 3.2.2.3 in http://www.dolby.com/uploadedFiles/Assets/US/Doc/Professional/AES128-Loudness-Normalization-Portable-Media-Players.pdf And it seems that dBpoweramp uses it too ( http://forum.dbpoweramp.com/showthread.php?34044-ReplayGain-Utility-Codec-R4 ) -- "EBU R128 used by default", "EBU R128 defaults to -18 LUFS".
>b) According to http://wiki.xiph.org/OggOpus#Comment_Header >there should be no REPLAYGAIN_*** tags in Opus files; Opus uses >R128_TRACK_GAIN tag. If some audio player reads Opus tags then it should >be aware of the difference between ReplayGain and R128. But this doesn't >require REPLAYGAIN_REFERENCE_LOUDNESS tag. > >The Opus replaygain spec is fundamentally broken, so let's ignore that for now. It is discussed ad nauseam elsewhere, but isn't going to change any time soon. I agree any replaygain reference loudness tag should only apply to other REPLAYGAIN* tags, although placing R128 gain values (adjusted by some arbitrary amount or otherwise) in REPLAYGAIN* tags raises some interesting questions. As already discussed none of this *requires* a reference loudness tag, but if there is one then it may as well be parsed. Who knows, maybe it says something useful. Lastly, and perhaps most importantly, nobody is forcing you to use it or apply it to your music, so you shouldn't prevent people who want it from having it. --ian