RFC 5334

Ogg Media Types

πŸ“… published September 2008, from ietf

RFC 5334: Ogg Media Types πŸŽ€

Okay bestie, the title block first πŸ’– This is RFC 5334, "Ogg Media Types," written by I. Goncalves, S. Pfeiffer, and C. Montgomery, all from Xiph πŸ¦‹ It's a Standards Track doc, which means it's an actual binding protocol spec for the internet community πŸ‘‘ It's dated September 2008, and it obsoletes RFC 3534. There's no Updates field on it, so it doesn't update any earlier RFC ✨

Status of This Memo 🌸

This document specifies an Internet standards track protocol for the Internet community, and it asks for discussion and suggestions for improvements. For the standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1) πŸ’… Distribution of this memo is unlimited 🫢

Abstract πŸ’œ

This doc describes how media types get registered for the Ogg container format, plus the conformance requirements for implementations of these types. It obsoletes RFC 3534 πŸ’…

Table of Contents 🧚

   1.     Introduction  . . . . . . . . . . . . . . . . . . . . . . .  2
   2.     Changes Since RFC 3534  . . . . . . . . . . . . . . . . . .  2
   3.     Conformance and Document Conventions  . . . . . . . . . . .  3
   4.     Deployed Media Types and Compatibility  . . . . . . . . . .  3
   5.     Relation between the Media Types  . . . . . . . . . . . . .  5
   6.     Encoding Considerations . . . . . . . . . . . . . . . . . .  5
   7.     Security Considerations . . . . . . . . . . . . . . . . . .  6
   8.     Interoperability Considerations . . . . . . . . . . . . . .  7
   9.     IANA Considerations . . . . . . . . . . . . . . . . . . . .  7
   10.    Ogg Media Types . . . . . . . . . . . . . . . . . . . . . .  7
   10.1.  application/ogg . . . . . . . . . . . . . . . . . . . . . .  7
   10.2.  video/ogg . . . . . . . . . . . . . . . . . . . . . . . . .  8
   10.3.  audio/ogg . . . . . . . . . . . . . . . . . . . . . . . . .  9
   11.    Acknowledgements  . . . . . . . . . . . . . . . . . . . . . 10
   12.    Copying Conditions  . . . . . . . . . . . . . . . . . . . . 10
   13.    References  . . . . . . . . . . . . . . . . . . . . . . . . 11
   13.1.  Normative References  . . . . . . . . . . . . . . . . . . . 11
   13.2.  Informative References  . . . . . . . . . . . . . . . . . . 11

1. Introduction ✨

Okay so this doc is all about media types for Ogg, which is a data encapsulation format that the Xiph.Org Foundation defined for public use πŸ¦‹ If you want background on this container format, check "Introduction" in [RFC3533] and "Overview" in [Ogg] πŸ’–

Binary data in Ogg, like Vorbis and Theora, has historically been swapped around using the application/ogg media type that [RFC3534] defined πŸŽ€ This doc obsoletes [RFC3534] and defines three media types for different kinds of Ogg content. The goal is to match how things are actually used in the IANA media type registry, to foster interoperability by pinning down the underspecified bits, and to give general security considerations πŸ”₯

The Ogg container is known to carry [Theora] or [Dirac] video, [Speex] speech (narrow-band and wide-band), [Vorbis] or [FLAC] audio, and [CMML] timed text and metadata. Since Ogg wraps binary data, it can hold any other kind of video, audio, image, or text, or generally any time-continuously sampled data 🌈

Raw packets from these sources can be used directly by transports that bring their own framing and packet separation, like UDP datagrams or RTP 🧚 But Ogg is the move for stream-based storage (like files) and transport (like TCP streams or pipes) πŸ’… The media types in this doc are needed to correctly identify this content when it's served over HTTP, included in multi-part documents, or used anywhere else media types [RFC2045] show up 🫢

2. Changes Since RFC 3534 πŸ“

  • The type "application/ogg" is redefined. πŸ’œ
  • The types "video/ogg" and "audio/ogg" are defined. πŸ¦‹
  • New file extensions are defined. πŸŽ€
  • New Macintosh file type codes are defined. 🌸
  • The codecs parameter is defined for optional use. ✨
  • The Ogg Skeleton extension becomes a recommended addition for content served under the new types. πŸ‘‘

3. Conformance and Document Conventions πŸ’…

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, [RFC2119], and they indicate requirement levels for compliant implementations πŸ”₯ Requirements apply to all implementations unless otherwise stated πŸ’–

An implementation is a software module that supports one of the media types defined here 🧚 A software module can support multiple media types, but conformance is checked individually for each type πŸ¦‹

Implementations that fail to satisfy one or more "MUST" requirements are considered non-compliant πŸ’€ Implementations that satisfy all "MUST" requirements but fail to satisfy one or more "SHOULD" requirements are said to be "conditionally compliant" 🌈 Everything else is "unconditionally compliant" ✨

4. Deployed Media Types and Compatibility πŸŽ€

The application/ogg media type has been used in an ad hoc fashion to label and exchange multimedia content in Ogg containers 🌸

Using the "application" top-level type for this kind of content is known to be problematic, mainly because it obfuscates video and audio content πŸ™ˆ So this doc defines these media types:

  • video/ogg
  • audio/ogg

They're meant for common use, and they SHOULD be used when dealing with video or audio content, respectively πŸ‘‘ This doc also obsoletes the [RFC3534] definition of application/ogg and marks it for complex data (for example multitrack visual, audio, textual, and other time-continuously sampled data). That data isn't clearly video or audio, so it doesn't fit video/ogg or audio/ogg. Check the next section for more details πŸ’…

An Ogg bitstream generally consists of one or more logical bitstreams, and each one is a series of header and data pages packetising time-continuous binary data [RFC3533] πŸ¦‹ You can figure out the content types of the logical bitstreams without decoding their header pages by using a [Skeleton] bitstream 🧚 Using Ogg Skeleton is REQUIRED for content served under the application/ogg type, and it's RECOMMENDED for video/ogg and audio/ogg, because Skeleton has identifiers that describe the different encapsulated data πŸ”₯

Also, it is RECOMMENDED that implementations which identify a logical bitstream they can't decode SHOULD ignore it, while still decoding the ones they can πŸ’– This precaution keeps things backward and forward compatible with existing and future data 🌈

These media types can optionally use the "codecs" parameter described in [RFC4281] πŸŽ€ Codecs encapsulated in Ogg need a text identifier at the beginning of the first header page, so a machine-readable way to identify the encapsulated codecs is this header 🫢 The table below shows how those header values map to the strings used in the "codecs" parameter with Ogg media types πŸ’œ

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

An up-to-date version of this table lives at Xiph.org (see [Codecs]) πŸ¦‹

Possible examples include:

  • application/ogg; codecs="theora, cmml, ecmascript" 🌸
  • video/ogg; codecs="theora, vorbis" ✨
  • audio/ogg; codecs=speex πŸŽ€

5. Relation between the Media Types πŸ‘‘

Like the last section said, this doc describes three media types that target different data encapsulated in Ogg πŸ’… Since Ogg can encapsulate any kind of data, the multiple usage scenarios have revealed interoperability issues between implementations when content is served only under the application/ogg type πŸ™ˆ

Even though this doc redefines application/ogg, it's still meant to embrace the widest net of content, with video/ogg and audio/ogg being smaller subsets of it 🌈 The video/ogg and audio/ogg types take precedence in some usages, specifically when serving multimedia content that isn't complex enough to need application/ogg πŸ’– Following that logic, audio/ogg is an even smaller subset within video/ogg, since it isn't meant to refer to visual content 🧚

So application/ogg is the recommended choice for content aimed at scientific and other applications that need various multiplexed signals or streams of continuous data, with or without scriptable control of content πŸ”₯ For bitstreams containing visual content, timed text, and any other material that needs a visual interface but isn't complex enough to warrant application/ogg, the video/ogg type is recommended πŸŽ€ When the Ogg bitstream mostly contains audio (lyrics, metadata, and cover art don't count), it is recommended to use audio/ogg 🫢

6. Encoding Considerations 🌸

Binary: The content consists of an unrestricted sequence of octets. πŸ’œ

Note:

  • Ogg encapsulated content is binary data and should be transmitted in a suitable encoding without CR/LF conversion, 7-bit stripping, etc. Base64 [RFC4648] is generally preferred for binary-to-text encoding πŸ¦‹
  • Media types described in this document are used for stream-based storage (like files) and transport (like TCP streams or pipes). Separate types identify codecs used in real-time applications, like the RTP payload formats for Theora [ThRTP] video, Vorbis [RFC5215], or Speex [SpRTP] audio. They're also used to identify data encapsulated within Ogg through Skeleton 🧚✨

7. Security Considerations ✨

Okay so bestie, before we dive in, [RFC3552] is the place to check for the terminology used in this section πŸ“šπŸ«Ά

The Ogg encapsulation format is basically a container πŸ“¦ that carries content (audio, video, and displayable text data) and it has a very rigid definition. Lowkey this means the format on its own is not more vulnerable than any other content framing mechanism πŸ’…

Ogg does not provide any generic encryption or signing of itself or its contained bitstreams πŸ™ˆ BUT it wraps any kind of binary content, so it can totally hold encrypted and signed content data πŸ” You can also add an external security mechanism that encrypts or signs an Ogg bitstream, which gives you content confidentiality and authenticity ✨

Since Ogg encapsulates binary data, it's possible to include executable content in an Ogg bitstream πŸ’€ Implementations SHOULD NOT execute such content without prior validation of its origin by the end-user 🚫

Issues may come up for applications that use Ogg for streaming or file transfer over a network 🌐 In those cases, implementations that decode Ogg and its encapsulated bitstreams have to make sure they handle manipulated bitstreams, buffer overflows, and similar problems correctly πŸ›‘οΈ

It's also possible to author malicious Ogg bitstreams that try to demand an excessively large picture size, high sampling-rate audio, and so on 😭 Implementations SHOULD protect themselves against this kind of attack 🫢

Ogg has an extensible structure, so in theory, metadata fields or media formats could be defined in the future that might be used to trigger particular actions on the recipient's side, which would add extra security risks πŸ‘€ However, this type of capability is currently not supported in the referenced specification 🌸

Implementations may fail to implement a specific security model or other means of preventing possibly dangerous operations 😬 That failure might be exploited to gain unauthorized access to a system or sensitive information, but since it's an unknown factor, it's considered out of the scope of this document πŸ€·β€β™€οΈ

8. Interoperability Considerations πŸ¦‹

The Ogg container format is device-, platform-, and vendor-neutral, and it has proved to be widely implementable across different computing platforms through a wide range of encoders and decoders 🌈 A broadly portable reference implementation, [libogg], is available under the revised (3-clause) BSD license, which is a Free Software license πŸ’œ

The Xiph.Org Foundation has defined the specification, interoperability, and conformance, and it conducts regular interoperability testing 🧚

The use of the Ogg Skeleton extension has been confirmed not to cause interoperability issues with existing implementations βœ… Third parties are, however, welcome to conduct their own testing πŸŽ€

9. IANA Considerations πŸ“‹

Following the procedures in [RFC4288], this document registers two new media types and redefines the existing application/ogg, as defined in the following section πŸ“

10. Ogg Media Types πŸŽ€

10.1. application/ogg πŸ’–

  • Type name: application
  • Subtype name: ogg
  • Required parameters: none
  • Optional parameters: codecs, whose syntax is defined in RFC 4281. See section 4 of RFC 5334 for a list of allowed values.
  • Encoding considerations: See section 6 of RFC 5334.
  • Security considerations: See section 7 of RFC 5334.
  • Interoperability considerations: None, as noted in section 8 of RFC 5334.
  • Published specification: RFC 3533
  • Applications which use this media type: Scientific and otherwise that require various multiplexed signals or streams of data, with or without scriptable control of content.
  • Additional information:
    • Magic number(s): The first four bytes, 0x4f 0x67 0x67 0x53, correspond to the string "OggS".
    • File extension(s): .ogx

RFC 3534 defined the file extension .ogg for application/ogg, which RFC 5334 obsoletes in favor of .ogx due to concerns where, historically, some implementations expect .ogg files to be solely Vorbis-encoded audio 🎢

  • Macintosh File Type Code(s): OggX
  • Person & Email address to contact for further information: See "Authors' Addresses" section.
  • Intended usage: COMMON
  • Restrictions on usage: The type application/ogg SHOULD only be used in situations where it is not appropriate to serve data under the video/ogg or audio/ogg types. Data served under the application/ogg type SHOULD use the .ogx file extension and MUST contain an Ogg Skeleton logical bitstream to identify all other contained logical bitstreams 🫢
  • Author: See "Authors' Addresses" section.
  • Change controller: The Xiph.Org Foundation.

10.2. video/ogg 🎬

  • Type name: video
  • Subtype name: ogg
  • Required parameters: none
  • Optional parameters: codecs, whose syntax is defined in RFC 4281. See section 4 of RFC 5334 for a list of allowed values.
  • Encoding considerations: See section 6 of RFC 5334.
  • Security considerations: See section 7 of RFC 5334.
  • Interoperability considerations: None, as noted in section 8 of RFC 5334.
  • Published specification: RFC 3533
  • Applications which use this media type: Multimedia applications, including embedded, streaming, and conferencing tools.
  • Additional information:
    • Magic number(s): The first four bytes, 0x4f 0x67 0x67 0x53, correspond to the string "OggS".
    • File extension(s): .ogv
    • Macintosh File Type Code(s): OggV
    • Person & Email address to contact for further information: See "Authors' Addresses" section.
    • Intended usage: COMMON
    • Restrictions on usage: The type "video/ogg" SHOULD be used for Ogg bitstreams containing visual, audio, timed text, or any other type of material that requires a visual interface. It is intended for content not complex enough to warrant serving under "application/ogg"; for example, a combination of Theora video, Vorbis audio, Skeleton metadata, and CMML captioning. Data served under the type "video/ogg" SHOULD contain an Ogg Skeleton logical bitstream. Implementations interacting with the type "video/ogg" SHOULD support multiplexed bitstreams 🌟
  • Author: See "Authors' Addresses" section.
  • Change controller: The Xiph.Org Foundation.

10.3. audio/ogg 🎧

  • Type name: audio
  • Subtype name: ogg
  • Required parameters: none
  • Optional parameters: codecs, whose syntax is defined in RFC 4281. See section 4 of RFC 5334 for a list of allowed values.
  • Encoding considerations: See section 6 of RFC 5334.
  • Security considerations: See section 7 of RFC 5334.
  • Interoperability considerations: None, as noted in section 8 of RFC 5334.
  • Published specification: RFC 3533
  • Applications which use this media type: Multimedia applications, including embedded, streaming, and conferencing tools.
  • Additional information:
    • Magic number(s): The first four bytes, 0x4f 0x67 0x67 0x53, correspond to the string "OggS".
    • File extension(s): .oga, .ogg, .spx
    • Macintosh File Type Code(s): OggA
    • Person & Email address to contact for further information: See "Authors' Addresses" section.
    • Intended usage: COMMON
    • Restrictions on usage: The type "audio/ogg" SHOULD be used when the Ogg bitstream predominantly contains audio data. Content served under the "audio/ogg" type SHOULD have an Ogg Skeleton logical bitstream when using the default .oga file extension. The .ogg and .spx file extensions indicate a specialization that requires no Skeleton due to backward compatibility concerns with existing implementations. In particular, .ogg is used for Ogg files that contain only a Vorbis bitstream, while .spx is used for Ogg files that contain only a Speex bitstream πŸŽ™οΈ
  • Author: See "Authors' Addresses" section.
  • Change controller: The Xiph.Org Foundation.

11. Acknowledgements πŸ’Œ

The authors gratefully acknowledge the contributions of Magnus Westerlund, Alfred Hoenes, and Peter Saint-Andre πŸ™Œ

12. Copying Conditions πŸ“œ

The authors agree to grant third parties the irrevocable right to copy, use and distribute the work, with or without modification, in any medium, without royalty, provided that, unless separate permission is granted, redistributed modified works do not contain misleading author, version, name of work, or endorsement information πŸ’œ

13. References πŸ“š

13.1. Normative References

[RFC2045]   Freed, N. and N. Borenstein, "Multipurpose Internet Mail
            Extensions (MIME) Part One: Format of Internet Message
            Bodies", RFC 2045, November 1996.

[RFC2119]   Bradner, S., "Key words for use in RFCs to Indicate
            Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC3533]   Pfeiffer, S., "The Ogg Encapsulation Format Version 0",
            RFC 3533, May 2003.

[RFC4281]   Gellens, R., Singer, D., and P. Frojdh, "The Codecs
            Parameter for "Bucket" Media Types", RFC 4281,
            November 2005.

[RFC4288]   Freed, N. and J. Klensin, "Media Type Specifications and
            Registration Procedures", BCP 13, RFC 4288,
            December 2005.

13.2. Informative References

[CMML]      Pfeiffer, S., Parker, C., and A. Pang, "The Continuous
            Media Markup Language (CMML)", Work in Progress,
            March 2006.

[Codecs]    Pfeiffer, S. and I. Goncalves, "Specification of MIME
            types and respective codecs parameter", July 2008,
            <http://wiki.xiph.org/index.php/MIMETypesCodecs>.

[Dirac]     Dirac Group, "Dirac Specification",
            <http://diracvideo.org/specifications/>.

[FLAC]      Coalson, J., "The FLAC Format",
            <http://flac.sourceforge.net/format.html>.

[libogg]    Xiph.Org Foundation, "The libogg API", June 2000,
            <http://xiph.org/ogg/doc/libogg>.

[Ogg]       Xiph.Org Foundation, "Ogg bitstream documentation: Ogg
            logical and physical bitstream overview, Ogg logical
            bitstream framing, Ogg multi-stream multiplexing",
            <http://xiph.org/ogg/doc>.

[RFC3534]   Walleij, L., "The application/ogg Media Type", RFC 3534,
            May 2003.

[RFC3552]   Rescorla, E. and B. Korver, "Guidelines for Writing RFC
            Text on Security Considerations", BCP 72, RFC 3552,
            July 2003.

[RFC4648]   Josefsson, S., "The Base16, Base32, and Base64 Data
            Encodings", RFC 4648, October 2006.

[RFC5215]   Barbato, L., "RTP Payload Format for Vorbis Encoded
            Audio", RFC 5215, August 2008.

[Skeleton]  Pfeiffer, S. and C. Parker, "The Ogg Skeleton Metadata
            Bitstream", November 2007,
            <http://xiph.org/ogg/doc/skeleton.html>.

[Speex]     Valin, J., "The Speex Codec Manual", February 2002,
            <http://speex.org/docs/manual/speex-manual>.

[SpRTP]     Herlein, G., Valin, J., Heggestad, A., and A. Moizard,
            "RTP Payload Format for the Speex Codec", Work
            in Progress, February 2008.

[Theora]    Xiph.Org Foundation, "Theora Specification",
            October 2007, <http://theora.org/doc/Theora.pdf>.

[ThRTP]     Barbato, L., "RTP Payload Format for Theora Encoded
            Video", Work in Progress, June 2006.

[Vorbis]    Xiph.Org Foundation, "Vorbis I Specification", July 2004,
            <http://xiph.org/vorbis/doc/Vorbis_I_spec.html>.

Authors' Addresses πŸ’Œ

okay bestie, here are the three legends behind this one, all at the Xiph.Org Foundation 🧚 Ivo Emanuel Goncalves, Silvia Pfeiffer, and Christopher Montgomery. Their details are below, copied exactly πŸ’–

Ivo Emanuel Goncalves
Xiph.Org Foundation
21 College Hill Road
Somerville, MA  02144
US

EMail: justivo@gmail.com
URI:   xmpp:justivo@gmail.com


Silvia Pfeiffer
Xiph.Org Foundation

EMail: silvia@annodex.net
URI:   http://annodex.net/


Christopher Montgomery
Xiph.Org Foundation

EMail: monty@xiph.org
URI:   http://xiph.org

so the copyright part is giving legal but make it cute πŸ™ˆ the notice says Copyright (C) The IETF Trust (2008) ✨ and this document is covered by the rights, licenses and restrictions in BCP 78. Outside of whatever BCP 78 says, the authors keep all their rights 🫢

Also, the whole document is handed over "AS IS" πŸ’€ The contributor, the organization they represent or are sponsored by (if any), the Internet Society, the IETF Trust, and the Internet Engineering Task Force all say there are no warranties at all, express or implied. That covers not infringing anyone's rights and being merchantable or fit for a particular purpose. Sis, that is a whole disclaimer 😭


Intellectual Property πŸ¦‹

the IETF is not picking a side on whether any IPR or other rights that someone claims over the tech in this doc are valid, how wide they go, or whether a license is even available. It also hasn't done its own hunt for those rights πŸ‘€ If you want the procedures for rights in RFC documents, check BCP 78 and BCP 79 πŸ’œ

If you want copies of IPR disclosures sent to the IETF Secretariat, or assurances that licenses will be available, or the results of a request for a general license for implementers or users, the IETF's online IPR repository is at http://www.ietf.org/ipr 🌸

And if you know about any copyrights, patents, patent applications, or other proprietary rights that might cover technology needed to implement this standard, please tell the IETF at ietf-ipr@ietf.org ✨ That's the bestie move 🫢

πŸ“¦ where this page comes from