Ivo Emanuel Gonçalves
2008-May-24 13:22 UTC
[ogg-dev] How Ogg mappings translate into the codecs parameter in Ogg media types
Hello list, We have recently introduced the codecs (optional) parameter on the Ogg media types for easier identification of encapsulated codecs in conditions were it's not feasable to examine the streams directly. I received a comment from the IESG that we should have some sort of list to describe how Ogg mapping strings translate to codec parameter strings, so I went ahead and compiled a table with all known Ogg codecs, and I would like feedback in case I inserted an error somewhere. The draft is located in SVN[1], but for your convenience I'm posting it here: Codec Identifier | Codecs Parameter ----------------------------------------------------------- char[8]: '\x01vorbis' | vorbis char[8]: '\x80theora' | theora char[8]: 'Speex ' | speex char[8]: '\177FLAC' | flac char[8]: 'BBCD\0' | dirac char[8]: 'OggMIDI\0' | midi char[8]: 'CMML\0\0\0\0' | cmml char[8]: 'PCM ' | pcm char[8]: 'CELT ' | celt char[8]: 'kate\0\0\0\0' | kate Is everything correct? Did I miss a codec? -Ivo [1] https://trac.xiph.org/browser/trunk/standards/draft-goncalves-rfc3534bis.txt
Conrad Parker
2008-May-24 14:08 UTC
[ogg-dev] How Ogg mappings translate into the codecs parameter in Ogg media types
2008/5/24 Ivo Emanuel Gon?alves <justivo at gmail.com>:> > I received a comment from the IESG that we should have some sort of > list to describe how Ogg mapping strings translate to codec parameter > strings, so I went ahead and compiled a table with all known Ogg > codecs, and I would like feedback in case I inserted an error > somewhere. > > The draft is located in SVN[1], but for your convenience I'm posting it here: > > Codec Identifier | Codecs Parameter > ----------------------------------------------------------- > char[8]: '\x01vorbis' | vorbis > char[8]: '\x80theora' | theora > char[8]: 'Speex ' | speex > char[8]: '\177FLAC' | flac > char[8]: 'BBCD\0' | dirac > char[8]: 'OggMIDI\0' | midi > char[8]: 'CMML\0\0\0\0' | cmml > char[8]: 'PCM ' | pcm > char[8]: 'CELT ' | celt > char[8]: 'kate\0\0\0\0' | kate > > Is everything correct? Did I miss a codec?The magic is not always char[8] -- it's an arbitrary number of characters, and as far as I know there is no official limit. So it's 7 for Vorbis and Theora, 5 for FLAC, and so on. eg. immediately after '\177FLAC' is a version field, which is not part of the codec ident string but is within the first 8 bytes. What you've listed for CMML is correct, and I'm pretty sure the strings are correct for Vorbis, Theora, Speex, and PCM. Also I don't know if the Dirac, MIDI, CELT or Kate mappings are yet finalized? cheers, Conrad.
Ivo Emanuel Gonçalves
2008-May-24 16:26 UTC
[ogg-dev] How Ogg mappings translate into the codecs parameter in Ogg media types
On 5/24/08, Conrad Parker <conrad at metadecks.org> wrote:> The magic is not always char[8] -- it's an arbitrary number of > characters, and as far as I know there is no official limit.I was under the impression that 8 was the limit. Thus the extra white space JM adds on Speex and CELT magics. I may be wrong, though.> So it's 7 for Vorbis and Theora, 5 for FLACSo char[7]: '\x01vorbis', char[7]: '\x80theora' and char[5]: '\177FLAC'?> immediately after '\177FLAC' is a version field, which is not part of the > codec ident string but is within the first 8 bytes.I don't think that interferes with anything. We are talking about the essential part needed to be detected by applications.> What you've listed for CMML is correct, and I'm pretty sure the > strings are correct for Vorbis, Theora, Speex, and PCM.Good, good.> Also I don't know if the Dirac, MIDI, CELT or Kate mappings are yet > finalized?Kate is AFAIK finalized; that's the impression I get from talks with ogg.k.ogg.k. Nobody's touched MIDI in years, so that's probably how it will stay. Considering the similarity between the CELT and Speex strings (the extra white space thingy) I don't think JM's changing it. Dirac is the only one I'm not sure, since this one here's the recent string. The magic used to be different, and I'm not sure if whoever's working on Dirac may have a change of ideas. Anyway, the essential for the document is that no errors can be present. Changes and newer codecs may be added later on an update to the document. Thanks. -Ivo
ogg.k.ogg.k at googlemail.com
2008-May-26 10:18 UTC
[ogg-dev] How Ogg mappings translate into the codecs parameter in Ogg media types
> char[8]: 'kate\0\0\0\0' | kateThis is incorrect, should be: char[9]: '\x80kate\0\0\0\0' | kate As Theora does, each packet has a first byte for the packet type (MSB set for headers). The padding with 4 zeros rather than 3 is due to, er, historical reasons :)
ogg.k.ogg.k at googlemail.com
2008-May-26 11:11 UTC
[ogg-dev] How Ogg mappings translate into the codecs parameter in Ogg media types
> Also I don't know if the Dirac, MIDI, CELT or Kate mappings are yet > finalized?The Kate one is - while the bitstream is still evolving (keeping backward compatiblity though), the mapping is not. It helps that Kate's designed as a string of packets, so the mapping's very simple.
Ivo Emanuel Gonçalves
2008-May-26 16:11 UTC
[ogg-dev] How Ogg mappings translate into the codecs parameter in Ogg media types
On 5/26/08, ogg.k.ogg.k at googlemail.com <ogg.k.ogg.k at googlemail.com> wrote:>> char[8]: 'kate\0\0\0\0' | kate > > This is incorrect, should be: > > char[9]: '\x80kate\0\0\0\0' | kateThe last one is how it's listed on ogginfo code, but the first one (char[8]) is how it's described in the wiki page. I thought the latter would be more correct. If not, you should revise the wiki page. Thanks for the help, everyone. I'm committing changes based on this thread to the draft. -Ivo
Reasonably Related Threads
- How Ogg mappings translate into the codecs parameter in Ogg media types
- How Ogg mappings translate into the codecs parameter in Ogg media types
- How Ogg mappings translate into the codecs parameter in Ogg media types
- How Ogg mappings translate into the codecs parameter in Ogg media types
- How Ogg mappings translate into the codecs parameter in Ogg media types