RFC 5334
Ogg Media Types
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
- Magic number(s): The first four bytes,
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
.ogxfile 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 π
- Magic number(s): The first four bytes,
- 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
.ogafile extension. The.oggand.spxfile extensions indicate a specialization that requires no Skeleton due to backward compatibility concerns with existing implementations. In particular,.oggis used for Ogg files that contain only a Vorbis bitstream, while.spxis used for Ogg files that contain only a Speex bitstream ποΈ
- Magic number(s): The first four bytes,
- 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
Full Copyright Statement π
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
- ietf: rfc5334 2008-09
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms