MIMETypesCodecs

From XiphWiki
Revision as of 20:25, 5 June 2008 by Silvia (talk | contribs)
Jump to navigation Jump to search

Specification of MIME Types and of codecs parameters

MIME Types

The following MIME types are now officially registered with IANA (well, almost, see [[1]]):

  • application/ogg - for complex, multitrack, multiplexed files encapsulated in Ogg
    • requires a Skeleton logical bitstream
  • video/ogg - for video encapsulated in Ogg
    • recommends a Skeleton logical bitstrem
  • audio/ogg - for audio encapsulated in Ogg
    • recommends a Skeleton logical bitstrem


Other MIME types are still in the process.


Codecs Parameter

http://www.rfc-editor.org/rfc/rfc4281.txt, MIME types of media encapsulation formats use the optional "codecs" parameter to specify which codes are being used in a particular file.

Codecs encapsulated in Ogg require a text identifier at the beginning of the first header page to identify the encapsulated codecs. The following table contains the identifiers for existing Xiph codecs and the codecs parameter names used for */ogg MIME types:

Codecs Parameter Name Codec Identifier (decimal) Codec Identifier (hex) Codec Identifier (octal) Version Field (if available)
dirac char[0,5]: 'BBCD\0' '0x42 0x42 0x43 0x44 00' '0102 0102 0103 0104 0000' ??
flac char[0,5]: '\177FLAC' '0x7F 0x46 0x4C 0x41 0x43' '0177 0106 0114 0101 0103' char[5,1]: binary major versin number,

char[6,1]: binary minor version number of mapping

theora char[0,7]: '\x80theora' '0x80 0x74 0x68 0x65 0x6f 0x72 0x61' '0180 0164 0150 0145 0157 0162 0141'


       Codec Identifier             | Codecs Parameter
      -----------------------------------------------------------
       char[7]: '\x80theora'        | theora
       char[7]: '\x01vorbis'        | vorbis
       char[8]: 'Speex   '          | speex
       char[8]: 'OggMIDI\0'         | midi
       char[8]: 'CMML\0\0\0\0'      | cmml
       char[8]: '\211PNG\r\n\032\n' | png
       char[8]: '\212MNG\r\n\032\n' | mng
       char[8]: '\213JNG\r\n\032\n' | jng
       char[8]: 'CELT    '          | celt
       char[8]: 'PCM     '          | pcm
       char[9]: '\x80kate\0\0\0\0'  | kate
       char[9]: 'YUV4MPEG2'         | yuv4mpeg