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

Calvin Walton <> Thu, 11 September 2014 16:01 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id F2E971A8990 for <>; Thu, 11 Sep 2014 09:01:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-0.001] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 9QxObxJeLv9T for <>; Thu, 11 Sep 2014 09:01:01 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:4001:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id A312F1A0672 for <>; Thu, 11 Sep 2014 09:00:55 -0700 (PDT)
Received: by with SMTP id tr6so7521447ieb.3 for <>; Thu, 11 Sep 2014 09:00:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=google; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; bh=MkfUiP9wGzuv4O/euus1t6XtJL0oEN5fR59c9BD7+yA=; b=vg605Q8Ho+zdN8p/lKyIbUQ9ei66XT0fjn9hf78pqU5EdmWhsPxinYK/EXKWZamtJJ EOSN12lLIT5sZFd4bzoFugLWz8SRArOCVkE9/+yUdq6orobNHNK7lWcwyivbVNg64HDD 4RYrVzBQsNXAaiLSKhcYuUcA9ormR4nNk0AF8=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-type:mime-version:content-transfer-encoding; bh=MkfUiP9wGzuv4O/euus1t6XtJL0oEN5fR59c9BD7+yA=; b=XgSlyjaZu7r+ecLZlzqYvpyCBSPB6WTmDx9T3OM1VFesQpZoYFAIMlYaAhCaPjbNRk jwQlpMiBDqoTBVPH+B1Y4LE7owq5UG8lM1RhH3sHYQeZ1djpKF9ZbHnpHa+FjFvwUSnW GfOaxPVL1JbnBnZQxBEG3eFcltYWUxjUcTozpPPYkRlZKeAaC1kjR1lq8GCbd+Jumh6F JysPZzH6dryr99DJ+D5nHTdvdxLo4p49Cp7gcaMXUV1T7wXrJahNV9noUwRlvTXrgIs6 oznnBEErjrB9FLQ1rZVMpsKE4ASQJPIZsmFWUd5tna9lcO+WOXfZGcuCo0RkHJUYmviB oFKA==
X-Gm-Message-State: ALoCoQnalIwk3xAWYOXK+rFoMUzNnOwjE57X33M7FRmM46OgWOOJaeRGxYg8Nk9chPGE0CAZsdrQ
X-Received: by with SMTP id v18mr8966011igr.21.1410451254827; Thu, 11 Sep 2014 09:00:54 -0700 (PDT)
Received: from ( []) by with ESMTPSA id lp8sm5063391igb.9.2014. for <multiple recipients> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Sep 2014 09:00:53 -0700 (PDT)
Message-ID: <>
From: Calvin Walton <>
To: "Timothy B. Terriberry" <>
Date: Thu, 11 Sep 2014 12:00:39 -0400
In-Reply-To: <>
References: <> <>
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.13.5
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
Cc: "" <>
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 16:01:04 -0000

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)

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.

Calvin Walton <>