MP4 MIME Types: MIME Type Registration for MPEG-4
Which MIME type to put on an MP4 file, depending on whether it holds video, audio or neither.
Lim, Y. and D. Singer, "MIME Type Registration for MPEG-4", RFC 4337, DOI 10.17487/RFC4337, March 2006, <https://www.rfc-editor.org/info/rfc4337>.
@misc{rfc4337,
series = {Request for Comments},
number = 4337,
howpublished = {RFC 4337},
publisher = {RFC Editor},
doi = {10.17487/RFC4337},
url = {https://www.rfc-editor.org/info/rfc4337},
author = {Y. Lim and D. Singer},
title = {{MIME Type Registration for MPEG-4}},
pagetotal = 11,
year = 2006,
month = mar,
} RFC text
Contents
Network Working Group Y. Lim
Request for Comments: 4337 net&tv Inc.
Category: Standards Track D. Singer
Apple Computer
March 2006
MIME Type Registration for MPEG-4
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2006).
Abstract
This document defines the standard MIME types associated with MP4
files. It also recommends use of registered MIME types according to
the type of contents.
Table of Contents
1. Introduction ....................................................2
2. Selection of MIME Types for MP4 Files ...........................3
3. IANA Considerations .............................................3
3.1. MP4 File ...................................................4
3.2. MP4 File with Audio but without Visual Presentation ........5
3.3. MP4 File with MPEG-4 System Stream and neither
Visual nor Audio Presentation ..............................6
3.4. Initial Object Descriptor (IOD) in Binary Format ...........7
3.5. Initial Object Descriptor (IOD) in Textual Format ..........8
4. Security Considerations .........................................9
5. Acknowledgements ................................................9
6. Normative References ............................................9
1. Introduction
This document describes a standard definition of MIME types
associated with MP4 files and the guidelines for using them.
MPEG-4 (ISO/IEC 14496) is a standard designed for the representation
and delivery of multimedia information over a variety of transport
protocols [1]. It includes interactive scene management and visual
and audio representations, as well as system functionality like
multiplexing, synchronization, and an object descriptor framework
[2].
The historical approach for MPEG data has been to declare it under
"video", and this approach is followed for ISO/IEC 14496. In
addition, some MIME types are defined under "audio" and "application"
for the streams not containing visual presentation.
Amendment 1 of the ISO/IEC 14496 standard (also known as version 2)
introduced a standard file type, called MP4 files, for encapsulating
ISO/IEC 14496 data. This is now separately specified as the MP4 file
format [4], which in turn is based on the ISO base media file format
[3]. A separate specification [5] covers the storage of Advanced
Video Coding (AVC) (also known as H.264) [6] material in files based
on the ISO base media file format. The MP4 file type can be used in
a number of ways; perhaps the most important of these is its use as
an interchange format for ISO/IEC 14496 data, as a content-download
format, and as the format read by streaming media servers.
These first two uses will be greatly facilitated if there is a
standard MIME type for serving these files (e.g., over HTTP).
The ISO/IEC 14496 standard is broad, and therefore the type of data
that may be in such a file can vary. In brief, simple compressed
video and audio (using a number of different compression algorithms)
can be included; interactive scene information; meta-data about the
presentation; references to ISO/IEC 14496 media streams outside the
file and so on. Different top-level MIME types are used to identify
the type of the contents in the file.
2. Selection of MIME Types for MP4 Files
The MIME types to be assigned to MP4 files are selected according to
the contents. Basic guidelines for selecting MIME types are as
follows:
a) if the file contains neither visual nor audio presentations, but
only, for example, MPEG-J or MPEG-7, use application/mp4;
b) for all other files, including those that have MPEG-J, etc., in
addition to video or audio streams, video/mp4 should be used;
however:
c) for files with audio but no visual aspect, including those that
have MPEG-J, etc., in addition to audio streams, audio/mp4 may be
used.
In any case, these indicate files conforming to the "MP4"
specification, ISO/IEC 14496-1:2000, systems file format.
3. IANA Considerations
This section describes the MIME types and names to be used with
various MPEG-4 contents. Sections from 4.1 to 4.5 register five new
MIME types with the IANA.
3.1. MP4 File
MIME media type name: video
MIME subtype name: mp4
Required parameters: none
Optional parameters: none
Encoding considerations: base64 IS generally preferred; files are
binary and should be transmitted without CR/LF conversion, 7-bit
stripping, etc.
Security considerations: See section 5 of RFC 4337.
Interoperability considerations: A number of interoperating
implementations exist within the ISO/IEC 14496 community, and that
community has reference software for reading and writing the file
format.
Published specification: ISO/IEC 14496-1:2001.
Applications: Multimedia
Additional information:
Magic number(s): none
File extension(s): mp4 and mpg4 are both declared at
<http://pitch.nist.gov/nics/>.
Macintosh File Type Code(s): mpg4 is registered with Apple.
Person to contact for info: David Singer, singer@apple.com
Intended usage: Common
Author/Change controller: David Singer, ISO/IEC 14496 file format
chair
3.2. MP4 File with Audio but without Visual Presentation
MIME media type name: audio
MIME subtype name: mp4
Required parameters: none
Optional parameters: none
Encoding considerations: base64 IS generally preferred; files are
binary and should be transmitted without CR/LF conversion, 7-bit
stripping, etc.
Security considerations: See section 5 of RFC 4337.
Interoperability considerations: A number of interoperating
implementations exist within the ISO/IEC 14496 community, and that
community has reference software for reading and writing the file
format.
Published specification: ISO/IEC 14496-1:2001.
Applications: Multimedia
Additional information:
Magic number(s): none
File extension(s): mp4 and mpg4 are both declared at
<http://pitch.nist.gov/nics/>.
Macintosh File Type Code(s): mpg4 is registered with Apple.
Person to contact for info: David Singer, singer@apple.com
Intended usage: Common
Author/Change controller: David Singer, ISO/IEC 14496 file format
chair.
3.3. MP4 File with MPEG-4 System Stream and neither Visual nor
Audio Presentation
MIME media type name:application
MIME subtype name: mp4
Required parameters: none
Optional parameters: none
Encoding considerations: base64 IS generally preferred; files are
binary and should be transmitted without CR/LF conversion, 7-bit
stripping, etc.
Security considerations: See section 5 of RFC 4337.
Interoperability considerations: A number of interoperating
implementations exist within the ISO/IEC 14496 community, and that
community has reference software for reading and writing the file
format.
Published specification: ISO/IEC 14496-1:2001.
Applications: Multimedia
Additional information:
Magic number(s): none
File extension(s): mp4 and mpg4 are both declared at
<http://pitch.nist.gov/nics/>.
Macintosh File Type Code(s): mpg4 is registered with Apple.
Person to contact for info: David Singer, singer@apple.com
Intended usage: Common
Author/Change controller: David Singer, ISO/IEC 14496 file format
chair
3.4. Initial Object Descriptor (IOD) in Binary Format
MIME media type name: application
MIME subtype name: mpeg4-iod
Required parameters: none
Optional parameters: none
Encoding considerations: base64 is generally preferred; files are
binary and should be transmitted without CR/LF conversion, 7-bit
stripping, etc.
Security considerations: See section 5 of RFC 4337.
Interoperability considerations: A number of interoperating
implementations exist within the ISO/IEC 14496 community, and that
community has reference software for reading and writing the file
format.
Published specification: ISO/IEC 14496-1:2001
Applications: Multimedia
Additional information:
Magic number(s): none
File extension(s): none mp4 and mpg4 are both declared at
<http://pitch.nist.gov/nics/>.
Macintosh File Type Code(s): mpg4 is registered with Apple.
Person to contact for info: David Singer, singer@apple.com
Intended usage: Common
Author/Change controller: David Singer, ISO/IEC 14496 file format
chair
3.5. Initial Object Descriptor (IOD) in Textual Format
MIME media type name: application
MIME subtype name: mpeg4-iod-xmt
Required parameters: none
Optional parameters: none
Encoding considerations: none
Security considerations: See section 5 of RFC 4337.
Interoperability considerations: A number of interoperating
implementations exist within the ISO/IEC 14496 community, and that
community has reference software for reading and writing the file
format.
Published specification: ISO/IEC 14496-1:2001 AMD2.
Applications: Multimedia
Additional information:
Magic number(s): none
File extension(s): mp4 and mpg4 are both declared at
<http://pitch.nist.gov/nics/>.
Macintosh File Type Code(s): mpg4 is registered with Apple.
Person to contact for info: David Singer, singer@apple.com
Intended usage: Common
Author/Change controller: David Singer, ISO/IEC 14496 file format
chair
4. Security Considerations
It is possible to inject non-compliant MPEG streams (Audio, Video,
and Systems) in the MP4 file to overload the receiver/decoder's
buffers. This might compromise the functionality of the receiver or
even crash it. This is especially true for end-to-end systems like
MPEG, where the buffer models are precisely defined.
An MP4 file supports the storage of stream types, including commands
that are executed on the terminal such as OD command and BIFS
commands, and programmatic content such as MPEG-J (Java(TM) Byte
Code) and ECMASCRIPT. It is possible to use one or more of the above
in a manner non-compliant to MPEG to crash the receiver or
temporarily make it unavailable.
Authentication mechanisms can be used to validate of the sender and
the data to prevent security problems due to non-compliant malignant
MP4 files.
A security model is defined in ISO/IEC 14496 Systems MP4 files
containing MPEG-J contents that comprises Java(TM) classes and
objects. MPEG-J defines a set of Java(TM) APIs and a secure
execution model. MPEG-J content can call this set of APIs and
Java(TM) methods from a set of Java packages supported in the
receiver within the defined security model. According to this
security model, downloaded byte code is forbidden to load libraries,
to define native methods, to start programs, to read or write files,
or to read system properties.
5. Acknowledgements
This document has benefited greatly by contributions from many
people, including Mike Coleman, Jean-Claude Duford, Viswanathan
Swaminathan, Peter Westerink, Carsten Herpel, Olivier Avaro, Paul
Christ, Zvi Lifshitz, and many others. Their insight, foresight, and
contribution is gratefully acknowledged. Little has been invented
here by the author; this is mostly a collation of greatness that has
gone before.
6. Normative References
[1] Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson,
"RTP: A Transport Protocol for Real-Time Applications", STD 64,
RFC 3550, July 2003.
[2] ISO/IEC 14496-1 "Information technology - Coding of audio-visual
objects - Part 1 : Systems", 3rd ed. 2004.
[3] ISO/IEC 14496-12 "Information technology - Coding of audio-
visual objects - Part 12 : ISO Base Media File Format", December
2003.
[4] ISO/IEC 14496-14 "Information technology - Coding of audio-
visual objects - Part 14 : MP4 File Format", January 2004.
[5] ISO/IEC 14496-15 "Information technology - Coding of audio-
visual objects - Part 15 : AVC File Format", 2004.
[6] ISO/IEC 14496-10:2004 "Information technology -- Coding of
audio-visual objects -- Part 10: Advanced Video Coding", 2nd
edition, 2004.
Authors' Addresses
Young-Kwon LIM
net&tv Inc.
Room 802 Hanseo Building
1582-6 Seocho-3-Dong Seocho-Gu
Seoul, 137-875, Korea
Phone: +82-2-581-2305
EMail: young@netntv.co.kr
David Singer
Apple Computer, Inc.
One Infinite Loop, MS:302-3MT
Cupertino CA 95014
USA
Phone: +1 408 974 3162
EMail: singer@apple.com
Full Copyright Statement
Copyright (C) The Internet Society (2006).
This document is subject to the rights, licenses and restrictions
contained in BCP 78, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at
ietf-ipr@ietf.org.
Acknowledgement
Funding for the RFC Editor function is provided by the IETF
Administrative Support Activity (IASA).
AI ELI5
On this page
§1Why MP4 Needs MIME Types
RFC 4337 defines the standard MIME types for MP4 files and gives guidelines for using them. A MIME type is the label a server or mail program attaches to a file so the receiver knows what kind of data it is.
The RFC says the MP4 file type is used as an interchange format for ISO/IEC 14496 data, as a content-download format and as the format read by streaming media servers. The first two uses are easier if there is one standard MIME type for serving these files, for example over HTTP.
A file has no face, so the computer reads its label to know what it is. This RFC makes sure everyone uses the same label for MP4 files.
§2MPEG-4 and the MP4 File Type
MPEG-4 (ISO/IEC 14496) is a standard for representing and delivering multimedia over many transport protocols. It covers interactive scene management, visual and audio representations, and system functions such as multiplexing, synchronization and an object descriptor framework.
Amendment 1 of the standard (also called version 2) introduced a file type for packaging this data, called the MP4 file. It is specified separately as the MP4 file format, which is based on the ISO base media file format. A further specification covers storing Advanced Video Coding (AVC, also known as H.264) in files of that kind.
What is inside an MP4 file varies a lot: compressed video and audio, interactive scene information, metadata, or references to MPEG-4 streams outside the file. The RFC notes that the historical approach for MPEG data has been to declare it under video, with some types under audio and application for streams without a visual presentation.
An MP4 is like a lunch box that can hold a movie, a song or just notes. Because the contents differ, the label on the box needs to differ too.
§3Choosing the Right Type
The type is picked according to what the file contains. The RFC gives three basic guidelines:
- If the file has neither visual nor audio presentation, only things such as MPEG-J or MPEG-7, use
application/mp4. - For all other files, including those that have MPEG-J and similar content in addition to video or audio streams,
video/mp4should be used. - For files with audio but no visual aspect, including those with MPEG-J and similar content alongside the audio,
audio/mp4may be used.
In every case the type indicates a file conforming to the MP4 specification, the ISO/IEC 14496-1:2000 systems file format. Note the wording: video/mp4 is a SHOULD for most files, while audio/mp4 is only a MAY for audio-only files.
If the box holds a movie, call it a movie. If it holds only music, you may call it music. If it holds neither, call it a plain data file.
§4The Five Registered Types
The IANA section registers five new MIME types. Each has the same registration details: no required or optional parameters, intended usage Common, application area Multimedia, no magic number, file extensions mp4 and mpg4, and the Macintosh file type code mpg4. The contact and change controller is David Singer, the ISO/IEC 14496 file format chair.
video/mp4: an MP4 file.audio/mp4: an MP4 file with audio but without visual presentation.application/mp4: an MP4 file with an MPEG-4 system stream and neither visual nor audio presentation.application/mpeg4-iod: an Initial Object Descriptor in binary format.application/mpeg4-iod-xmt: an Initial Object Descriptor in textual format.
For the binary types the encoding consideration is that base64 is generally preferred, because the files are binary and should be transmitted without CR/LF conversion or 7-bit stripping. For the textual IOD type, the encoding consideration is listed as none.
Five new labels are added to the official label list: one for movies, one for music, one for other MP4 data, and two for a small description card that goes with MPEG-4 content.
| MIME type | What it labels | Encoding consideration |
|---|---|---|
| video/mp4 THIS RFC | MP4 file | base64 generally preferred |
| audio/mp4 | MP4 file with audio but no visual presentation | base64 generally preferred |
| application/mp4 | MP4 file with system stream, no visual or audio | base64 generally preferred |
| application/mpeg4-iod | Initial Object Descriptor, binary | base64 generally preferred |
| application/mpeg4-iod-xmt | Initial Object Descriptor, textual | none |
§5Security Considerations
The main risk is that someone injects non-compliant MPEG streams (audio, video or systems) into an MP4 file to overload the receiver's or decoder's buffers. That could compromise the receiver or even crash it, especially in end-to-end systems like MPEG where buffer models are precisely defined.
An MP4 file can also store commands that the terminal executes, such as OD and BIFS commands, and programmatic content such as MPEG-J (Java byte code) and ECMAScript. Used in a non-compliant way, these could crash the receiver or make it temporarily unavailable.
The RFC says authentication mechanisms can validate the sender and the data. It also notes that ISO/IEC 14496 defines a security model for MPEG-J: downloaded byte code is forbidden to load libraries, define native methods, start programs, read or write files, or read system properties.
A sneaky person could pack a file with tricks that make a player choke or crash. The rules say to check who sent the file, and the built-in programs in it are not allowed to touch the rest of your computer.