[flac-dev] R128gain & metaflac

lvqcl lvqcl.mail at gmail.com
Sun Jun 15 15:19:48 PDT 2014

Olav Sunde wrote:

> has anyone looked at adding R128gain code to metaflac so we can select
> to use this calculation for RP tags rather than replay gain?

Why metaflac only? flac is also able to calculate RG values.

And, as far as I can see R128GAIN (http://r128gain.sourceforge.net/)
is a standalone app, not a library. So probably it would be difficult
to reuse its code in flac/metaflac.

There is also libebur128 (https://github.com/jiixyj/libebur128/) -
"libebur128 is a library that implements the EBU R 128 standard for
loudness normalisation. All source code is licensed under the MIT license";
foobar2000 uses it to calculate ReplayGain values.

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:

More information about the flac-dev mailing list