On Mon, 2012-11-26 at 16:30 +0000, Gregory Maxwell wrote:
> Sorry for the delayed response— been tied up on other tasks.
> 
> Calvin Walton [[email protected]] wrote:
> > Hmm? Replaygain does specify a method. They go into a lot of details on
> > http://www.replaygain.org/ to describe the loudness filter used, the
> > method for calculating RMS power levels afterwards, the histogram-based
> > statistical processing, and how to calibrate the gain level to the -83dB
> > reference with a pink noise signal.
> 
> It offers one, yes— but it's not a specification. I was stridently
> corrected by the author of replaygain when I made the same claim that
> you are.
> 
> I'm also advised that most tools are now using the EBU R128 method now
> in any case. And in practice the point is fairly moot as the values
> are effectively compatible on actual audio once the reference level.

Yes... I've since looked into this a bit more. foobar2000 uses the R128
algorithm to calculate the values to store in ReplayGain comments; the
command-line tools vorbisgain and metaflac that I normally use are still
based on the older ReplayGain suggested algorithm.

The ReplayGain reference value is 5 dB louder than the EBU R128 standard
reference value, so compensating for the difference is straightforward.

> > Yes, having the standard gain header that is supported by all decoders
> > is nice - except for the case of playback of mixed file formats,
> > particularly by an application that doesn't understand the gain tags in
> > other formats. In those cases, the Opus files will be significantly
> > quieter (assuming modern pop mastering...) than the other files, making
> > them sound "worse" than files without gain applied.
> 
> I don't see how you can usefully make an argument here.  If you don't
> have gain adjustment (on the files or in the application) and you have
> files from various sources you will have various levels.

My argument is based on using a player that supports Opus playback,
supports ReplayGain tags, but does not support R128 gain tags. This is
the case with some current players (e.g. Rockbox, Rhythmbox).

All of my existing Ogg Vorbis files with ReplayGain tags will be played
back 5 dB louder than an Opus file with R128 album gain stored in the
header gain field. (A workaround for this would be to use the ReplayGain
preamp to apply a -5 dB gain after the ReplayGain adjustment.)

Alternately, if the Opus file has a R128_TRACK_GAIN comment present, but
0 in the header gain field, it will be played back unnormalized!

For the case of older versions of Rhythmbox running with a newer
Gstreamer library backend that supports decoding Opus, this situation
may be maintained for quite a while.

> > If a player blindly applies only the header output gain value, it has no
> > knowledge of whether the output is loudness normalized or not.
> 
> I'd like to say that there should be an informative tag there to
> indicate whats being done. However: I'm absolutely sure it will be
> reliably set wrong, double so because other than displaying it as
> metadata there is simply nothing most software can do with the
> information. There would be little way for careless implementers to
> discover that they've gotten it wrong... and so the information would
> likely be worse than useless as it would just add complexity without
> concrete value.

If I select to use 'Album Gain' mode for ReplayGain in the playback menu
of my iPod running Rockbox:
http://download.rockbox.org/daily/manual/rockbox-ipodvideo/rockbox-buildch7.html#x10-1270007.9
there is currently no way for the player to know whether or not the
arbitrary value in the header gain field represents R128-normalized
album gain or something completely different.

Most players fall back to using the track gain field if the album gain
is not present - but this can't work properly with the current
specification of Ogg Opus. They must either assume that the user has put
R128 album gain into the header gain field (I think foobar2000 currently
does this), or only use track gain.

My personal suggestion would be to have an R128_ALBUM_GAIN field, with
the same format and similar semantics to the R128_TRACK_GAIN field. In
the case where the album gain is stored in the header gain field, the
R128_ALBUM_GAIN field SHOULD be present and be filled with a value of
'0', indicating that no further adjustment is needed to get R128 album
normalized loudness.

-- 
Calvin Walton <[email protected]>

_______________________________________________
codec mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/codec

Reply via email to