Difference between revisions of "OggOpus"

From XiphWiki
Jump to navigation Jump to search
(→‎Ogg mapping for Opus: Sketch what I understand so far about requirements)
(→‎Draft spec: Lowercase the non-initial bytes of the magic)
Line 18: Line 18:
 
Id header:
 
Id header:
  
  - 8 byte magic signature 'OPUS\0\0\0\0'
+
  - 8 byte magic signature 'Opus\0\0\0\0'
 
  - <custom mode flags>
 
  - <custom mode flags>
  
Line 24: Line 24:
  
 
  - follows the vorbis-comment header design used in OggVorbis, OggTheora, and Speex.
 
  - follows the vorbis-comment header design used in OggVorbis, OggTheora, and Speex.
  - Magic is 'OPUS\0\0\001'
+
  - Magic is 'Opus\0\0\001'

Revision as of 14:00, 22 July 2011

Ogg mapping for Opus

The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See [tools.ietf.org/html/draft-ietf-codec-opus the spec] for technical details.

Almost everything about this codec is either fixed or dynamically switchable, so the usual id and setup header parameters in a the header packets of an Ogg encapsulation aren't useful. In particular, bitrate, frame size, mono/stereo, and coding modes are all dynamically switchable from packet to packet. A one-byte header on each data packet defines the parameters for that particular packet.

Remaining parameters we need to signal are:

  • magic number for stream identification
  • comment/metadata tags

Additionally there's been a desire to support some kind of channel bonding for surround, and some kind of option signalling for "Opus Custom", in particular the granulerate.

Draft spec

Two headers: id, comment

Id header:

- 8 byte magic signature 'Opus\0\0\0\0'
- <custom mode flags>

Comment header:

- follows the vorbis-comment header design used in OggVorbis, OggTheora, and Speex.
- Magic is 'Opus\0\0\001'