Re: [codec] draft-ietf-codec-oggopus: R128_TRACK_GAIN units

Ron <> Thu, 11 September 2014 17:59 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id D75E11A8A73 for <>; Thu, 11 Sep 2014 10:59:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 81vVv-Wc34iJ for <>; Thu, 11 Sep 2014 10:59:02 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id C2E391A8A17 for <>; Thu, 11 Sep 2014 10:57:57 -0700 (PDT)
Received: from (HELO mailservice.shelbyville.oz) ([]) by with ESMTP; 12 Sep 2014 03:27:56 +0930
Received: from localhost (localhost []) by mailservice.shelbyville.oz (Postfix) with ESMTP id D55F3FFE1A for <>; Fri, 12 Sep 2014 03:27:43 +0930 (CST)
X-Virus-Scanned: Debian amavisd-new at mailservice.shelbyville.oz
Received: from mailservice.shelbyville.oz ([]) by localhost (mailservice.shelbyville.oz []) (amavisd-new, port 10024) with LMTP id g6b5u085QcZa for <>; Fri, 12 Sep 2014 03:27:42 +0930 (CST)
Received: from hex.shelbyville.oz (hex.shelbyville.oz []) by mailservice.shelbyville.oz (Postfix) with ESMTPS id 8C210FF8BF for <>; Fri, 12 Sep 2014 03:27:42 +0930 (CST)
Received: by hex.shelbyville.oz (Postfix, from userid 1000) id 79DD680470; Fri, 12 Sep 2014 03:27:42 +0930 (CST)
Date: Fri, 12 Sep 2014 03:27:42 +0930
From: Ron <>
Message-ID: <20140911175742.GJ32116@hex.shelbyville.oz>
References: <> <> <>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <>
User-Agent: Mutt/1.5.23 (2014-03-12)
Subject: Re: [codec] draft-ietf-codec-oggopus: R128_TRACK_GAIN units
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Codec WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 11 Sep 2014 17:59:04 -0000

On Thu, Sep 11, 2014 at 12:00:39PM -0400, Calvin Walton wrote:
> On Mon, 2014-09-08 at 13:11 -0700, Timothy B. Terriberry wrote:
> > As an individual...
> > 
> > Mark Harris wrote:
> > >  output gain field of the Ogg Opus header.  Is it expected that 
> > > these
> > >  units would be adopted by other codecs?
> > 
> > I can't speak for anyone else, but if _I_ were making a new codec, I
> > wouldn't see a need to innovate here. This design has the lessons of
> > doing this for 15+ years baked into it.
> > 
> > >  concerned that if Ogg Opus uses 1/256 LU units, and another 
> > > format or
> > >  codec uses the much more obvious LU (dB) units, then someone may 
> > > be in
> > 
> > Then they should pick a different tag name.
> > 
> Just to comment on this:
> The format of the "vorbiscomment" fields is very similar between at 
> least Ogg Vorbis, FLAC, and Ogg Opus. As a result, the tags are often 
> copied verbatim between the three formats during transcoding, and the 
> interpretation of tag meaning based on name is usually shared between 
> all three codecs in parsing code.
> As a result, without explicit code in the parser to e.g. reject or 
> interpret differently this tag between different formats, a player 
> that implements the R128_*_GAIN fields will as a side-effect add 
> support for the same tag in FLAC and Ogg Vorbis.
> (This is the same reason that some players - at least gstreamer-based 
> players, rockbox, and foobar2000 - currently accept and use 
> REPLAY_GAIN tags in Ogg Opus files)

This is of course one of the perils of people implementing 'generic'
code with no sanity checking.  I believe there are libraries which
will happily try to force almost any codec into almost any kind of
container, whether that is well defined and well behaved or not.

Code reuse is great.  Code without sanity checking gets to keep
all the pieces.  There's not much we can do about that except
continue to remind people of the damage that blind application of
the 'be liberal' principle does.

Which isn't to say that FLAC and Vorbis and other Ogg mappings
shouldn't ever recognise these tags, but that's a discussion for
somewhere other than here right now.  This group isn't responsible
for decisions relating to those, nor have we been asked to be.

> Since this tag format is defined/specified in the Ogg Opus 
> specification, it might make sense to use a prefix on the tag name - 
> e.g. OPUS_R128_TRACK_GAIN - if the intent is that this tag is to be 
> used only in the Ogg Opus format. This would reduce the likelihood of 
> conflicts in the mostly-unregulated vorbiscomment namespace.
> If the intent is that the R128 tags are intended to be used also in 
> FLAC and Ogg Vorbis then I think it would be best for it to be defined 
> outside of the Opus specification, somewhere that developers can 
> reference independently. In particular, care would be needed to 
> describe interactions with the REPLAY_GAIN tags that are still used in 
> these other formats.

I think Tim already covered this when he said:

    It's also got two years of deployment at this point, so there's
    now non-trivial costs in changing it. If we had a good reason,
    we could change it.  But "reduced confusion" is not a good
    reason. Changing now will only increase confusion (another
    lesson I've learned from letting people talk me into such
    changes in the past): people will be required to support both
    formats forever, despite the fact that one would be "standard"
    and the other wouldn't be.

There's no inherent reason these tags need to remain Opus specific,
this is just the first place they've been defined.  If nothing else
ever picks them up, that's probably not a big deal, if other things
do, they can copy or reference the definition here, just as we have
referenced the VorbisComment specification.