OpusExtensions: Difference between revisions

From XiphWiki
Jump to navigation Jump to search
(opus_audio_descriptor isn't a PES packet, and starts with a valid TOC, so it doesn't belong on this list.)
(Derf's braindump from IRC)
Line 7: Line 7:
* `Op` is used as a prefix for metadata headers in .opus files. [https://tools.ietf.org/html/draft-ietf-codec-oggopus RFC 7845]
* `Op` is used as a prefix for metadata headers in .opus files. [https://tools.ietf.org/html/draft-ietf-codec-oggopus RFC 7845]
* '0x3FF' in the first 11 bits marks an `opus_access_unit` in mpeg-ts. [[OpusTS]]
* '0x3FF' in the first 11 bits marks an `opus_access_unit` in mpeg-ts. [[OpusTS]]
== Constructing invalid sequences ==
  The only restriction that doesn't depend on the number of bytes
  in the packet is [R5], which is, "Code 3 packets contain at least
  one frame, but no more than 120 ms of audio total."

Revision as of 13:50, 19 April 2016

Opus audio data packets begin with a "table of contents" (TOC) sequence which defines the frame duration, audio bandwidth and coding mode of the packet, as well as describing how individual frames are packed into the data packet. [RFC 6716 Section 3.1]. Other types of data packets are used with Opus in various containers are designed to start with a sequence which is not a valid TOC. This simplifies sorting such data for muxing implementations and ensures they will be rejected by the decoder if they are accidentally passed as Opus audio data.

Below is a list of such alternate sequences, to avoid duplication.

List of invalid Opus audio data sequences

  • `Op` is used as a prefix for metadata headers in .opus files. RFC 7845
  • '0x3FF' in the first 11 bits marks an `opus_access_unit` in mpeg-ts. OpusTS

Constructing invalid sequences

 The only restriction that doesn't depend on the number of bytes 
 in the packet is [R5], which is, "Code 3 packets contain at least 
 one frame, but no more than 120 ms of audio total."