Standards: Part 23 - Media Types Vs MIME Types
Media Types describe the container and content format when delivering media over a network. Historically they were described as MIME Types.
This article is part of our growing series on Standards.
There is an overview of all 26 articles in Part 1 - An Introduction To Standards.
A Media Type describes a container file or stream and the payload carried in it. These object descriptions were first defined for the ARPANET. The Internet was based on ARPANET, inheriting many characteristics that are still used.
This is an important metadata item and fundamental to the delivery of media although it was originally designed to support email.
The Media Type suggests how a receiving client application should treat the incoming content. The browser or media player handles the incoming media accordingly.
Workflows depend on this when assets are delivered via the IP network. Typically, they are transferred with HTTP although other mechanisms might be used. Attaching Media Type signatures in HTTP protocol headers or supporting metadata packages facilitates proper handling at each processing node.
Media Type standards are described by the IETF in a collection of RFC documents and registered with the IANA in a publicly accessible database.
What Is The Correct Terminology?
Opinion is divided on what to call the metadata items describing the media format. There is a long history to consider. This will have influenced many ancient documents that are still relevant and might not have been updated. Every organization has a preferred nomenclature.
These terms are broadly interchangeable in a functional sense but should be used appropriately depending on the context:
- MIME Type.
- Media Type.
- Content Type.
MIME is an abbreviation of the term 'Multipart Internet Mail Extension'. Originally designed to facilitate the attachment of non-textual media objects when they are carried in an email message. Now, they are more often described as Media Types and are used in many other contexts.
Web Server response headers use the term 'Content Type' when delivering downloads.
The same fundamental technology is used within an IP based production environment. Media Type would probably be the most appropriate term for use in Broadcasting.
Organization | Terminology |
---|---|
IETF & IANA | The term MIME type was originally coined because it allows arbitrary attachments of any type to be added to email messages. The IETF and IANA have deprecated this terminology and consider it to be obsolete. They now prefer to use the Media Type terminology. |
WHATWG | The WHATWG group that develops new web standards prefers to stay with MIME Type because the Media Type terminology might be confused with the CSS @media type feature. |
HTTP | The response header between a web browser and server uses Content-type. |
W3C | The W3C org defines data types for XML and uses ContentType as an XML data-type name representing a media type. |
Linux | The XDG specifications used by the Linux desktop environment continues to use the term MIME type. |
Media Types or MIME Types (etc.) are fundamentally the same thing and do the same job in every context.
Who Manages The Media Type Definitions?
Two organizations manage the Media Types:
- The Internet Assigned Numbers Authority (IANA) manages the publicly accessible registries of protocols and types. Their database associates Media Types with file extensions so the receiving device can choose the correct parsing mechanism.
- The Internet Engineering Task Force (IETF) publishes RFC documents that describe how to deploy the IANA registered values. RFC specifications are updated or replaced when new types are registered with the IANA.
A Media Type value is more reliable than a file extension on its own for determining the content of an asset. The extended Subtype, Tree, Suffix and Parameter-set details make the description very specific when necessary.
A complete list is maintained at the IANA registry where there are over 2000 individual Media Types:
https://www.iana.org/assignments/media-types/media-types.xhtml
The RFC 4289 and 6838 documents describe the process for registering new Media Types.
Many of the RFC documents were originally written to describe an email context for using these Media Type values. It is still worth reading those parts of the specifications.
Structure & Format
Media Types identify the fundamental nature of the content. File extensions are less specific and not as reliable an indicator of what variety of media is being carried. The component parts of the Media Type cover different aspects:
- Top-Level-Type of media followed by a slash (/) character.
- Optional Tree definition followed by a full-stop character (.). This describes a namespace for the Subtype value.
- Subtype describing the format.
- Optional Suffix preceded by a plus sign (+) with a more specific description of the format.
- Optional Parameter string preceded by semi-colon characters (;). Multiple Parameters are delimited by additional semi-colons (;).
- A trailing semi-colon completes the syntax in some source documentation but is usually omitted depending on the context the Media Type is used in.
Each individual part of a Media Type is delimited with specific characters and must strictly adhere to the RFC defined rules:
{Top-level-type}/{tree}.{subtype}+{suffix};{parameters};
Additional information about the Subtype carried by the Tree, Suffix and Parameter parts allows for future extension without breaking the underlying format. These are optional and may not be present for all Media Types.
Refer to RFC 6838 for a description of the component parts of a Media Type.
Top-Level-Types
The Top-Level-Type identifies the fundamental category of media being delivered. They are most recently described in RFC 6838. There are some proprietary Top-Level-Types defined elsewhere on an informal basis:
Type | Defined in | Description |
---|---|---|
application | RFC 2046 | Arbitrary (usually) binary data. The Subtype further defines what this is. |
audio | RFC 2046 | Audio data in a format defined by the Subtype. This may be raw samples or compressed with a codec. |
example | RFC 4735 | Example Media Types for Use in Documentation. |
font | RFC 8081 | Downloadable font glyph collections. |
haptics | In progress | Force feedback. |
image | RFC 2046 | Image data in a format defined by the Subtype. |
message | RFC 2046 | An encapsulated message. This may describe a nested structure containing other objects. |
model | Various | 3D model data. |
multipart | RFC 2046 | This is a composite Top-Level-Type. It describes a container with multiple objects each of a single type. |
text | RFC 2046 | Simple textual content which includes plain and formatted versions described by the Subtype. |
video | RFC 2046 | Video data in a format defined by the Subtype. |
The Top-Level-Type values are case-insensitive but by convention are usually presented in lower-case.
Other Top-Level-Types are defined for chemical model files and the Linux desktop environment also describes some special values for use within the operating system. They are used to implement the user interface.
Refer to RFC 2046, RFC 6838 and the IANA registry for Media Types for a more detailed description.
Subtypes
The Subtype value supports a nested tree-like structure to allow for proprietary and other extensions. There are four Subtype Trees currently defined. Each requires a slightly different syntax for constructing the Subtype value:
Tree | Description |
---|---|
IETF Standard | No special prefix is required for this Subtype. |
Vendor | Always has the vnd. prefix. File types associated with publicly available products are defined in this Tree. Excel spreadsheets for example. Registrations in this Tree are managed by the owning vendor but must be registered with the IANA. |
Personal or vanity | Always has the prs. prefix and represents non-publicly available products or experimental prototypes but are still registered with the IANA to avoid namespace collisions. |
Unregistered | These Subtypes always have the x. prefix and are not visible in the public registry. They are often introduced at the experimental phase for a new Subtype. Eventually, they would expect to be superseded by a Subtype in the Standards or Vendor Tree. At that time the prefixing x. would be removed. Earlier RFC documents allowed the x- prefix to be used. This is now deprecated and x. must be used for new registrations. There are a few Subtypes whose name begins with x- that have become de-facto standards and are retained in the registry. |
The Top-Level-Type and Subtype are separated by a slash character (/). Here are some common useful Top-Level-Types and Subtype combinations:
Media Type | Tree description |
---|---|
text/javascript | IETF Standard Tree. |
image/png | IETF Standard Tree. |
audio/flac | IETF Standards Tree. |
application/vnd.ms-excel | Vendor Tree - Microsoft. |
audio/prs.sid | Personal Tree. |
audio/x-flac | Unregistered Tree - Deprecated prefix. |
model/x.stl-ascii | Unregistered Tree - New prefix |
Refer to RFC 4289 and 6838 for details of how the member Subtypes in these Trees should be defined and registered. The IETF may create additional Trees and register them with the IANA if they are called for.
Subtype values are case-insensitive but by convention they are presented in lower case.
Suffixes
The Suffix value extends the Media Type definition to provide a more specific hint about the media content. This could select generic processors that understand format specific syntax while ignoring the internal semantics of the data which is parsed separately afterwards.
The Suffix is separated from the main part of the Subtype with a plus sign character (+). They are always presented in lower-case although they are a case-insensitive value. Here are some example Suffixes:
Suffix | See RFC | Description |
---|---|---|
+ber | RFC 6839 | Describes the Basic Encoding Rules defined by the ITU. |
+cbor | RFC 8949 | A Concise Binary Object Representation. |
+cbor-seq | RFC 8742 | Concise Binary Object Representation (CBOR) Sequences. |
+cose | RFC 9052 | CBOR Object Signing and Encryption (COSE) object. |
+cwt | RFC 8392 | Binary CBOR Web Token (CWT). |
+der | RFC 6839 | Describes the Distinguished Encoding Rules defined by the ITU. |
+fastinfoset | RFC 6839 | A structured binary representation of XML data defined by the ITU. |
+gzip | RFC 1952 & 6713 | GZIP file format specification version 4.3. |
+json | RFC 6839 & 8259 | Describes a JavaScript Object Notation for serialized object structures. |
+json-seq | RFC 7464 & 8091 | JavaScript Object Notation (JSON) Text Sequences. |
+jwt | RFC 7519 & 8417 | JSON Web Token. |
+sqlite3 | SQLite | SQLite version 3 database file. |
+tlv |
OMA-TS LightweightM2M V1.0.2 |
A lightweight binary Type, Length, Value format for machine-to-machine communications. Designed by the Open Mobile Alliance. |
+wbxml | RFC 6839 | A structured binary representation of XML defined by the Wireless Application Protocol (WAP) Forum. |
+xml | RFC 7303 & 6839 | A generic XML format. |
+yaml | RFC 9512 | YAML Ain't Markup Language (YAML). |
+zip | RFC 6839 | A ZIP compressed archive format. Uses Zip version 6.3.2 (2007). |
+zstd | RFC 8878 | Zstandard Compression and the 'application/zstd' Media Type. |
These Suffix values should be registered with the IANA. The use of unregistered Suffix values is discouraged.
The current registry is listed here:
https://www.iana.org/assignments/media-type-structured-suffix/media-type-structured-suffix.xhtml
Parameters
Parameters are separated from the preceding Subtype and Suffix definition by a semicolon and space. Multiple Parameters can be appended, each one separated by a semi-colon (;) and space character. Each Parameter name can only appear once in the Media Type definition.
Each Parameter consists of a name-value pair separated by an equal sign (=).
Here are some examples:
text/html; charset=UTF-8
This describes a text object containing HTML web page content. It uses characters from the Unicode characters and is rendered using the 8-bit UTF-8 syntax.
video/vnd.avi; codec=XXX
This is a video object in an AVI container using placeholder codec XXX. Substitute one of the alternatives from the AVI registry of available codecs.
audio/vnd.wave; codec=YYY
An audio object in a WAV file container using a placeholder codec. Substitute one of the codecs permitted by the WAV specification.
The Parameter names are case-insensitive and are normally presented in lower-case. The values associated with them may be in upper or lower-case which should be correctly observed on a case-by-case basis. In some contexts, the upper/lower case of the Parameter value will be important but ignored in others.
Important Standards
MIME and its antecedents have been around for a long time. The earliest RFCs relating to this topic were published in 1977 (RFC 724) when email was introduced to ARPANET. Long before the Internet was created and 20 years prior to the World Wide Web.
For modern purposes, RFC 2045 is the starting point. The email architecture was overhauled in 1996 to support the more advanced attachments that facilitated HTML formatted messages. The new specifications allowed for a massive increase in the number and diversity of Media Types.
These RFC documents currently relevant to the Media Type specifications. Some of these describe aspects of the mail protocol but also contain useful insights.
Standard | Version | Description |
---|---|---|
RFC 1952 | 1996 | GZIP file format specification version 4.3 |
RFC 2045 | 1996 | Multipurpose Internet Mail Extensions (MIME) Part One- Format of Internet Message Bodies. Extends the original functionality from RFC 822 to support larger character sets. |
RFC 2046 | 1996 | Multipurpose Internet Mail Extensions (MIME) Part Two- Media Types. |
RFC 2047 | 1996 | MIME (Multipurpose Internet Mail Extensions) Part Three- Message Header Extensions for Non-ASCII Text. Describes character encoding for large character sets with more glyphs than the original ASCII character set. |
RFC 4289 | 2005 | Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures. Describes how new Media Types can be registered. |
RFC 2049 | 1996 | Multipurpose Internet Mail Extensions (MIME) Part Five- Conformance Criteria and Examples to facilitate and improve interoperability. |
RFC 2231 | 1997 | MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations. Updates the specifications in RFC 2045 and 2047. This facilitates localization and internationalization by supporting non-English languages. It improves the handling of long header lines that would have been folded in the earlier RFC 822 specification. |
RFC 2361 | 1998 | An informal document describing the WAVE and AVI Codec Registries and how to represent them as a Media Type. |
RFC 3676 | 2004 | The text/plain format and DelSp parameters. Helps to cure incorrect line wrapping when displaying plain text documents. |
RFC 4735 | 2006 | Example Media Types for Use in Documentation. |
RFC 6657 | 2012 | Update to MIME regarding the default "charset" Parameter Handling in Textual Media Types. Updates the specifications in RFC 2046. |
RFC 6713 | 2012 | The 'application/zlib' and 'application/gzip' Media Types. |
RFC 6838 | 2013 | Media Type Specifications and Registration Procedures. Describes additional important aspects of the Top-Level-Type specifier and registration process. |
RFC 6839 | 2013 | Additional Media Type Structured Syntax Suffixes. |
RFC 7303 | 2014 | XML Media Types. |
RFC 7519 | 2015 | JSON Web Token. |
RFC 7464 | 2015 | JavaScript Object Notation (JSON) Text Sequences. |
RFC 8091 | 2017 | A Media Type Structured Syntax Suffix for JSON Text Sequences. |
RFC 8081 | 2017 | The "font" Top-Level-Type. |
RFC 8392 | 2018 | CBOR Web Token (CWT). |
RFC 8742 | 2020 | Concise Binary Object Representation (CBOR) Sequences. |
RFC 9052 | 2022 | CBOR Object Signing and Encryption (COSE): Structures and Process. |
RFC 8949 | 2020 | A description of the Concise Binary Object Representation format. |
RFC 8878 | 2021 | Zstandard Compression and the 'application/zstd' Media Type. |
RFC 9512 | 2024 | YAML Media Type. |
RFC 8417 | 2018 | Security Event Token. |
The descriptive RFC documents have been continuously updated and replaced by more recent versions that extend and improve the capabilities. Search the IETF RFC repository for the older versions of the documents if you need them.
Conclusion
Media Types are important in the context of an IP studio workflow. Without them, the incoming content must be inspected carefully to determine the type and format. Any misinterpretation will cause serious problems downstream.
The IANA maintains many registries which are useful when constructing workflows. Access the top-level index to the IANA registry here:
https://www.iana.org/protocols
Likewise, the IETF maintains a collection of RFC documents. Their Datatracker web site clearly indicates the provenance and relationships between them. It is very easy to walk through the RFC pages by clicking on the links to updated specifications. The front page of the IETF Datatracker is here:
https://datatracker.ietf.org
Enter an RFC number to call up the corresponding page. RFC documents are all free to access in a variety of formats. I find the PDF version is the most convenient.
These Appendix articles contain additional information you may find useful:
Part of a series supported by
You might also like...
HDR & WCG For Broadcast: Part 3 - Achieving Simultaneous HDR-SDR Workflows
Welcome to Part 3 of ‘HDR & WCG For Broadcast’ - a major 10 article exploration of the science and practical applications of all aspects of High Dynamic Range and Wide Color Gamut for broadcast production. Part 3 discusses the creative challenges of HDR…
IP Security For Broadcasters: Part 4 - MACsec Explained
IPsec and VPN provide much improved security over untrusted networks such as the internet. However, security may need to improve within a local area network, and to achieve this we have MACsec in our arsenal of security solutions.
Six Considerations For Transitioning To Cloud Based Video Distribution
There are many reasons why companies are transitioning from legacy video distribution workflows to ones hosted entirely in the public cloud, but it’s not a simple process and takes an enormous amount of planning. Many potential pitfalls can be a…
IP Security For Broadcasters: Part 3 - IPsec Explained
One of the great advantages of the internet is that it relies on open standards that promote routing of IP packets between multiple networks. But this provides many challenges when considering security. The good news is that we have solutions…
The Resolution Revolution
We can now capture video in much higher resolutions than we can transmit, distribute and display. But should we?