What is a MIME / media type?
A media type—historically called a MIME type—is a label used by software and network protocols to describe the kind of content being handled. It is an identifier, not necessarily the codec itself.
audio/mpeg, audio/aac, video/mp4, video/quicktime, video/matroska. The IANA registry is the authoritative catalogue for registered media types.Why media types exist
HTTP, email and software APIs need a machine-readable way to describe content. A media type uses a top-level category such as audio, video, image or application, followed by a subtype.
Common audio and video examples
| Media type | Usually describes | Important nuance |
|---|---|---|
audio/mpeg | MPEG audio, commonly MP3 in file/web contexts | The name is broader-looking than the way users often encounter it. |
audio/aac | AAC elementary/transported audio | AAC inside MP4 may instead be delivered as audio/mp4 with codec signalling. |
audio/mp4 | MP4-family audio container | Does not by itself say whether the audio is AAC, ALAC or another permitted coding format. |
video/mp4 | MP4 video container | Does not mean H.264 specifically. |
video/quicktime | QuickTime/MOV-family media | The contained codec still needs separate identification. |
video/matroska | Matroska video container | The tracks may use many different codecs. |
video/AV1 | AV1 video in contexts where the codec itself is the media type | Different layer from video/mp4 carrying AV1. |
MIME type, extension, container and codec are different identifiers
A file called movie.mp4 may have the extension .mp4, the media type video/mp4, an MP4 container, an avc1 sample entry and H.264/AVC coded video. Those labels describe different layers of the same file.
The codecs parameter can add detail
Web media types can be accompanied by a codecs parameter so a browser can know more than the container name alone. For example, an MP4 media type can additionally identify AVC/H.264, HEVC, AV1 or particular audio coding formats.
This is one reason browser compatibility checks often use both a container type and codec string.
Common confusion
video/mp4 is not the MP4 video codec.MP4 is a container family. The video might be H.264, HEVC, AV1 or another supported format.
.mkv and video/matroska may refer to the same broad file family, but they belong to different naming systems.