Skip to content
Snippets Groups Projects
draft-ietf-codec-oggopus.xml 77.4 KiB
Newer Older
<?xml version="1.0" encoding="utf-8"?>
<!--
   Copyright (c) 2012-2016 Xiph.Org Foundation and contributors

   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions
   are met:

   - Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.

   - Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.

   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

   Special permission is granted to remove the above copyright notice, list of
   conditions, and disclaimer when submitting this document, with or without
   modification, to the IETF.
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd' [
<!ENTITY rfc2119 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
<!ENTITY rfc3533 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3533.xml'>
<!ENTITY rfc3629 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3629.xml'>
<!ENTITY rfc4732 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4732.xml'>
<!ENTITY rfc5226 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5226.xml'>
<!ENTITY rfc5334 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5334.xml'>
<!ENTITY rfc6381 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6381.xml'>
<!ENTITY rfc6716 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6716.xml'>
<!ENTITY rfc6982 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6982.xml'>
<!ENTITY rfc7587 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7587.xml'>
<?rfc toc="yes" symrefs="yes" ?>

<rfc ipr="trust200902" category="std" docName="draft-ietf-codec-oggopus-14"

<front>
<title abbrev="Ogg Opus">Ogg Encapsulation for the Opus Audio Codec</title>
<author initials="T.B." surname="Terriberry" fullname="Timothy B. Terriberry">
<organization>Mozilla Corporation</organization>
<address>
<postal>
<street>650 Castro Street</street>
<city>Mountain View</city>
<region>CA</region>
<code>94041</code>
<country>USA</country>
</postal>
<phone>+1 650 903-0800</phone>
<email>tterribe@xiph.org</email>
</address>
</author>

<author initials="R." surname="Lee" fullname="Ron Lee">
<organization>Voicetronix</organization>
<address>
<postal>
<street>246 Pulteney Street, Level 1</street>
<city>Adelaide</city>
<region>SA</region>
<code>5000</code>
<country>Australia</country>
</postal>
<phone>+61 8 8232 9112</phone>
<email>ron@debian.org</email>
</address>
</author>

Ralph Giles's avatar
Ralph Giles committed
<author initials="R." surname="Giles" fullname="Ralph Giles">
<organization>Mozilla Corporation</organization>
<address>
<postal>
<street>163 West Hastings Street</street>
<city>Vancouver</city>
<region>BC</region>
<code>V6B 1H5</code>
<country>Canada</country>
</postal>
<phone>+1 778 785 1540</phone>
Ralph Giles's avatar
Ralph Giles committed
<email>giles@xiph.org</email>
</address>
</author>

<date day="22" month="February" year="2016"/>
<area>RAI</area>
<workgroup>codec</workgroup>

<abstract>
<t>
This document defines the Ogg encapsulation for the Opus interactive speech and
 audio codec.
This allows data encoded in the Opus format to be stored in an Ogg logical
 bitstream.
</t>
</abstract>
</front>

<middle>
<section anchor="intro" title="Introduction">
<t>
The IETF Opus codec is a low-latency audio codec optimized for both voice and
 general-purpose audio.
See <xref target="RFC6716"/> for technical details.
This document defines the encapsulation of Opus in a continuous, logical Ogg
 bitstream&nbsp;<xref target="RFC3533"/>.
Ogg encapsulation provides Opus with a long-term storage format supporting
 all of the essential features, including metadata, fast and accurate seeking,
 corruption detection, recapture after errors, low overhead, and the ability to
 multiplex Opus with other codecs (including video) with minimal buffering.
It also provides a live streamable format, capable of delivery over a reliable
 stream-oriented transport, without requiring all the data, or even the total
 length of the data, up-front, in a form that is identical to the on-disk
 storage format.
</t>
<t>
Ogg bitstreams are made up of a series of 'pages', each of which contains data
 from one or more 'packets'.
Pages are the fundamental unit of multiplexing in an Ogg stream.
Each page is associated with a particular logical stream and contains a capture
 pattern and checksum, flags to mark the beginning and end of the logical
 stream, and a 'granule position' that represents an absolute position in the
 stream, to aid seeking.
A single page can contain up to 65,025 octets of packet data from up to 255
 different packets.
Packets can be split arbitrarily across pages, and continued from one page to
 the next (allowing packets much larger than would fit on a single page).
Each page contains 'lacing values' that indicate how the data is partitioned
 into packets, allowing a demultiplexer (demuxer) to recover the packet
 boundaries without examining the encoded data.
A packet is said to 'complete' on a page when the page contains the final
 lacing value corresponding to that packet.
</t>
<t>
This encapsulation defines the contents of the packet data, including
 the necessary headers, the organization of those packets into a logical
 stream, and the interpretation of the codec-specific granule position field.
It does not attempt to describe or specify the existing Ogg container format.
Readers unfamiliar with the basic concepts mentioned above are encouraged to
 review the details in <xref target="RFC3533"/>.
</t>

</section>

<section anchor="terminology" title="Terminology">
<t>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
 "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this
 document are to be interpreted as described in <xref target="RFC2119"/>.
</t>

</section>

<section anchor="packet_organization" title="Packet Organization">
<t>
An Ogg Opus stream is organized as follows (see
 <xref target="packet-org-example"/> for an example).

<figure anchor="packet-org-example"
 title="Example packet organization for a logical Ogg Opus stream"
 align="center">
<artwork align="center"><![CDATA[
    Page 0         Pages 1 ... n        Pages (n+1) ...
 +------------+ +---+ +---+ ... +---+ +-----------+ +---------+ +--
 |            | |   | |   |     |   | |           | |         | |
 |+----------+| |+-----------------+| |+-------------------+ +-----
 |||ID Header|| ||  Comment Header || ||Audio Data Packet 1| | ...
 |+----------+| |+-----------------+| |+-------------------+ +-----
 |            | |   | |   |     |   | |           | |         | |
 +------------+ +---+ +---+ ... +---+ +-----------+ +---------+ +--
 ^      ^                           ^
 |      |                           |
 |      |                           Mandatory Page Break
 |      |
 |      ID header is contained on a single page
 |
Ralph Giles's avatar
Ralph Giles committed
 'Beginning Of Stream'
<t>
There are two mandatory header packets.
The first packet in the logical Ogg bitstream MUST contain the identification
 (ID) header, which uniquely identifies a stream as Opus audio.
The format of this header is defined in <xref target="id_header"/>.
It is placed alone (without any other packet data) on the first page of
 the logical Ogg bitstream, and completes on that page.
This page has its 'beginning of stream' flag set.
Loading
Loading full blame...