[Matroska-devel] Opus audio codec

Steve Lhomme slhomme at matroska.org
Sat Dec 17 10:54:57 CET 2011


Le 14/12/2011 22:11, Moritz Bunkus a écrit :
> Hey,
>
> OK I've taken a look at Xiph's mapping of Opus in Ogg. The ID header
> they describe looks nearly fine to me: nothing that's too Ogg-centric
> apart from the "OpusHead" string. I'd rather skip this as a
> distinguishing feature between CodecPrivate and some other Matroska
> element is simply not necessary in Matroska (I'm referring to the part
> "The magic signature "OpusHead" allows codec identification and is
> human readable. Starting with 'Op' helps distinguish it from data
> packets, as this is an invalid TOC sequence." We also already have a
> human-readable CodecID for the first part.
>
> So what I'd propose would be your solution 2 (no new Matroska channel
> mapping element only for this codec) with a slight modification.
> CodecPrivate should consist of (copy&  paste from Xiph.org):
>
> - Version number (8 bits): zero for this spec
> - Channel count 'c' (8 bits unsigned): MUST be>  0
> - Pre-skip (16 bits unsigned)
> - Input sample rate (32 bits, little endian): informational only
> - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when decoding
> - Channel mapping family (8 bits)
>   --  0 = one stream, RTP order, 1 = channels in order as stated below,
> 2..254 reserved (treat as 255), 255 = no defined channel meaning
> If channel mapping family>  0
> - Stream count 'N' (8 bits unsigned): MUST be>  0
> - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M<= N,
> M+N<= 255
> - Channel mapping (8*c bits)
>    -- one stream index (8 bits unsigned) per channel (255 means silent
> throughout the file)

Sounds good to me.

Steve




More information about the Matroska-devel mailing list