On Thu, 2012-11-08 at 14:23 +1030, Ron wrote: > A player must always apply the header gain to output the signal > level that the person who created the file intended it to have > (as if they really had scaled it by that level prior to encoding). > > A player may also optionally apply normalisation to a standard > level on top of that, either based on information in the file's > comment tags, its own analysis of the file, or some other > mechanism based on input from the user of that player. > > The former is about gain choices made by the creator, the latter > is more about gain choices made by the end user. The former > must always be applied so that players behave consistently, the > latter may be applied at the sole discretion of the user and > (how they configure) the applications that they use to play it. > > > Is there something about that which we need to explain better > in the draft?
There is one place in the draft that does conflict with this - the
rational for why an R128_ALBUM_GAIN comment was not included. It is
noted that the 'album' gain value should be stored in the header gain
field instead. However, if the header gain is supposed to be used by the
audio creator/encoder and not the end user, then this will overwrite the
creator's value.
In addition, since the header gain field has no semantic meaning, there
is no way to know that the value in this field corresponds to the R128
album gain as opposed to an arbitrary creator-provided value, meaning
that a player cannot reliably give the user the ability to select
'album' vs. 'track' gain during playback by their preference.
(I admit that for the time being, most opus files will be encoded by the
same person as the end user who will be listening to them, of course...)
Anyways, this is getting a bit far afield from my original topic...
I want to play back Ogg Opus files at the same loudness level as my
existing Replaygained Ogg Vorbis/FLAC/MP3/AAC/etc. files. Currently I
have 3 choices:
1. Add Vorbis-style REPLAYGAIN_{TRACK,ALBUM}_GAIN comments with
adjustments relative to the header gain (usually 0). This works
correctly in all players that I have tried, even though the spec says
that these tags should not be used. Since players generally share
comment parsing code between vorbis and opus, these comments are likely
to continue working for the foreseeable future.
2. Store either the track or album replaygain values in the header gain
field. This works correctly in all players, but does not allow me to
choose between album and track gain at playback time. (e.g. for
continuous playback versus random/shuffle playback)
3. Store an arbitrary value (usually 0) in the header gain field, and
use the R128_TRACK_GAIN comment with an R128 adjustment. Have the player
add an additional adjustment to adjust the reference level to match
replaygain. foobar2000 gets this almost right, except that it assumes
that the header gain field corresponds to the album gain, which may not
be correct. No other player currently supports this. (On the other hand,
since comment parsing code is generally shared, this means that the
R128_TRACK_GAIN comment will likely start working in Ogg Vorbis files
soon.)
At this point, I see the replaygain comments as the most compatible /
interoperable way of reaching my goal, but it does mean that I'm relying
on behaviour that the spec says I SHOULD NOT do. I'm wondering if it
would make sense to specify the behaviour for when these tags are
present.
--
Calvin Walton <[email protected]>
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ codec mailing list [email protected] https://www.ietf.org/mailman/listinfo/codec
