What Is an MP4 File? A Container, and What the Name Hides
MP4 is a container. Jump to your question below, or work through it in order.
MP4 is a container. Jump to your question below, or work through it in order.
An MP4 file is a container. Its full name is MPEG-4 Part 14. One file carries video, audio, subtitles and metadata. That box compresses nothing itself.
What sits inside decides everything. H.264 video with AAC audio is the usual pairing, and size and quality belong to those, never to a container.
Every system plays MP4 already. When one refuses, a codec inside is almost always the reason, and files that will not open at all are usually downloads that stopped early.
MP4 is short for MPEG-4 Part 14, and this container format is not a codec. MPEG-4 is a family of standards running to dozens of parts, and Part 14 describes one thing only: how to lay bytes out in a file. Part 10 (H.264/AVC) is the video codec most MP4 files carry. Part 3 covers audio.
So an MP4 is a box with labeled compartments. It is used to store video, one or more audio tracks, subtitles and still images, plus chapter marks and metadata. It records where every piece starts and how long it runs. It compresses none of it.
That distinction decides most questions people arrive with. Two files of one film can both be MP4 and 400 MB apart. One used HEVC at a low bit rate and another used H.264 at a high one.
Containers hold, codecs compress. Every claim about MP4 quality, size or speed is really about what somebody put inside.
.mp4, the only one in the specificationvideo/mp4, audio/mp4, application/mp4Wrong page? If the file holds sound alone, read MP3 files. For the container that holds more kinds of track, read the MKV format.
ISO and IEC published MP4. Its layout is Apple's, taken from QuickTime, and Apple still runs the registry for every format in that family.
This page replaced one that answered twice and disagreed with itself. Its specification table said International Organization for Standardization. Its conclusion, two screens below, said Microsoft. Not Microsoft: that company had nothing to do with it.
The real answer has three parts and all three are more interesting than either.
| When | What happened |
|---|---|
| 2001 | Apple publishes the QuickTime File Format, the structure everything here sits on |
| October 2001 | Version 1 arrives as clause 13 of ISO/IEC 14496-1:2001 |
| 24 Nov 2003 | ISO/IEC 14496-14 published. MPEG-4 Part 14 replaces that clause |
| 2004 | That shared layout becomes ISO/IEC 14496-12:2004, the ISO Base Media File Format, a general structure for time-based media files |
| Mar 2006 | RFC 4337 registers video/mp4, co-written by an Apple engineer |
| Jan 2020 | The third edition, ISO/IEC 14496-14:2020, replaces the withdrawn 2003 text |
Version 1 was a revision of the MPEG-4 Part 1: Systems specification published in 1999. The MP4 file format was generalized in 2004, and many formats now sit on that same base.
ISO's own abstract for the standard says MP4 is “derived from ISO/IEC 14496-12 and ISO/IEC 15444-12, the ISO base media file format”. That base format sits directly on QuickTime.
Part 14 is close to identical to that base file format but formally specifies support for Initial Object Descriptors (IOD) and other MPEG features on top. That is why MP4 and .mov files look almost the same in a hex editor.
One detail settles it. Apple Inc. is the registration authority for code-points in the MP4 family, named in Annex D of Part 12. Twenty-three years after MPEG published that standard, every legal codec identifier is still listed at Apple.
This is why so many guides hedge. One committee published it, one company designed it and a third gets blamed. Apple drew the layout and ISO standardized it, which is what happened to PDF and to several other formats on this site.
Containers are rarely the problem. Your player reads the boxes, meets video it cannot decode and shows a black screen. Try VLC before blaming the MP4.
MP4 support is universal, so a refusal almost never means the MP4 container. Your player opened the MP4, read its track list and met something it had no decoder for.
One codec causes most of these. H.265/HEVC, two names for the same thing, succeeded H.264 and halves the file size, and it is patent licensed, so plenty of software ships without it.
Notice that three of those four are nothing to do with MPEG-4 Part 14. This format is doing its job in every case, and every failure sits one layer down or one step earlier.
A television that refuses your MP4 is refusing the codec. Smart TVs, consoles and streaming sticks decode a short list in hardware. Re-encode to H.264 and that same file plays, which is the only case on this page where re-encoding is right.
Trouble with the computer rather than the MP4? Our Windows error guides and macOS fixes cover the file association problems behind most double-click failures.
Nothing to install. Windows, macOS, Android, iPhone and every browser play MP4 already. Free downloads below cover the jobs playback does not.
MP4 is the most widely supported container format ever published, so an honest answer to what opens one is: whatever you already own. Paid MP4 players advertised against this search sell a feature your operating system shipped with.
| Software | Runs on | Why choose it |
|---|---|---|
| Windows Media Player | Windows | Built in. Double-click and it plays |
| QuickTime Player | Mac | Built in. MP4 and QuickTime share a structure |
| Chrome, Firefox, Edge, Safari | Everywhere | Drag the MP4 into a tab. No install, no upload |
| VLC | Windows, Mac, Linux, Android, iOS | The troubleshooter. Carries its own decoders for HEVC and AV1 |
| MediaInfo | Windows, Mac, Linux | Not a player. Names the codec, the brand and the bit rate |
| HandBrake | Windows, Mac, Linux | Re-encodes when a device refuses the codec inside |
| FFmpeg | Windows, Mac, Linux | Remuxes, trims and moves the index, all without re-encoding |
MediaInfo deserves its own line. Most MP4 trouble is a question about a codec rather than a container. MediaInfo answers it in two seconds: video codec, profile, audio codec, bit rate and the brand written in the ftyp box.
Double-click. Your system plays MP4 with nothing added.
Install MediaInfo. It names what is inside, free, in seconds.
Drag the MP4 onto an open browser tab. Chrome, Firefox, Edge and Safari all decode MP4 with H.264 and AAC natively, so playback starts at once and your MP4 never leaves your computer.
That is worth knowing because page one of results for opening video is full of upload-and-convert sites. None is needed to watch an MP4 you already have.
HEVC on Windows is the one gap worth naming. Windows plays H.264 in MP4 with nothing installed and asks for a paid extension to decode HEVC. VLC decodes both free, which is why it is on every list here.
An MP4 is a tree of boxes. Every one opens with four bytes of size and four of type. Three matter: ftyp says what an MP4 claims to be, mdat holds the media and moov holds every index.
Open an MP4 in a hex editor and that pattern shows up at once. Four bytes of length, four bytes of a name you can read, then either data or more boxes. Apple called them atoms and ISO calls them boxes. They are one thing.
| Box | What it holds |
|---|---|
ftyp | First in the MP4. The brand, which says what this file claims to be |
mdat | The video and audio themselves. Nearly all the bytes |
moov | Every index: durations, timestamps, where every frame sits |
moof | A fragment header, on files built for streaming |
mfra | The random access index for those fragments |
pdin | Progressive download hints, rarely written |
meta | Metadata, including Extensible Metadata Platform |
free | Padding. Safe to ignore and safe to delete |
Inside moov sit mvhd, the movie header, plus one trak for every track. Inside a trak, down through mdia and minf, is stbl, a sample table holding stts, stsc, stsz and stco.
Those four are worth naming because a guide ranking for this term lists all four as top-level boxes. They are not. Hunt for stsz at the front of an MP4 and you will never find one, because it lives five levels down.
Eight bytes, and two special cases carry real weight. Four of those 8 bytes are the size and four are a four-character type.
A size of 1 means a 64-bit largesize follows the type, which is how an MP4 passes 4 GB. A size of 0 means this box runs to the end of the MP4, which only a last box may do. A type of uuid means sixteen bytes of private identifier follow.
Every four-byte type is readable text. Open any MP4 in a text editor and ftyp, moov, mdat and trak appear within a few screens. That is the quickest way to confirm your file really is an MP4, whatever its name says.
One extension is in the specification, .mp4. M4A, M4V, M4B, M4R, MOV and 3GP are the same structure under different names, and the brand in an ftyp box is the real label.
Rename an .m4a to .mp4 and it still plays. Rename a .mov and it usually does too. That is no trick: those files were never different formats, and the standard is explicit that the only extension it defines is .mp4.
Everything else is convention, grown out of what Apple needed iTunes to tell apart. Media players read the brand rather than the extension.
| Extension | By convention | In the standard? |
|---|---|---|
.mp4 | Video with audio | Yes, the only one |
.m4a | Audio, no video | No |
.m4b | Audiobook, with chapter marks | No |
.m4p | Audio locked with Apple FairPlay | No |
.m4r | An iPhone ringtone | No |
.m4v | Apple video, sometimes protected | No |
.mov | QuickTime, the format MP4 came from | Apple's own |
.3gp | Mobile phone video and audio | 3GPP's own |
So what does say what files are? Their major brand, four characters written into the ftyp box at the very front, with a list of compatible brands beside it. MediaInfo reads it, and so does any hex editor.
| Brand | What it declares |
|---|---|
isom | ISO Base Media v1, the broadest claim a file can make |
iso2 | ISO Base Media v2 |
mp41 | MP4 version 1, the 2001 clause 13 layout |
mp42 | MP4 version 2, ISO/IEC 14496-14 |
avc1 | ISO Base Media with the H.264 extensions |
qt | Apple QuickTime, which is what a .mov says |
M4A | Apple iTunes AAC audio |
3gp4 to 3gp6 | 3GPP mobile releases |
Read the ftyp brand. MediaInfo prints it, free, in seconds.
That changes nothing. The bytes stay legal and the brand stays put.
Those 2000s MP4 players mostly could not play MP4. Cheap video players were marketed under that name all through the decade, and plenty read AMV and nothing else. That badge meant small video, not MPEG-4 Part 14.
Working with the sound alone? An .m4a is this same container with no video track, and the MP3 format holds the codec most people reach for instead.
MP4 plays more places and MKV holds more kinds of track. Neither touches the picture, so put identical video in both and the sizes land within a few kilobytes.
All four are container formats. All four hold H.264 and AAC. What differs is what else fits and where files will play, and only one of those rows matters when you are sending something to a stranger.
| MP4 | MKV | AVI | WebM | |
|---|---|---|---|---|
| Arrived | 2003 | 2002 | 1992 | 2010 |
| Plays on phones and TVs | Almost always | Sometimes | Rarely | Sometimes |
| Plays in a browser | Directly | No | No | Directly |
| Styled ASS subtitles | No box for them | Yes | No | No |
| Attached fonts | No | Yes | No | No |
| Chapters | Yes | Yes, ordered | No | Limited |
| Streams while downloading | Yes, with faststart | Yes | No | Yes |
| File size, same content | Same size. No container compresses | |||
MP4 wins rows two and three, which is device support, and those decide most transfers. Nothing else plays everywhere the way it does. Send something to somebody whose device you cannot check and MP4 is the only answer that needs no conversation first.
Subtitles are where it loses. MP4 carries timed text and has no place for styled ASS and SSA tracks, which Matroska holds, so fan-subtitled video arrives flattened or missing after somebody converts it.
Send MP4. It plays on the phone or TV you cannot test first.
Keep the MKV. Every track, every subtitle, every font survives.
Comparing containers? The Matroska container holds what MP4 has no box for. AVI files came out of Microsoft in 1992, and FLV files carried web video before MP4 took the job.
Remux first, re-encode only when you must. Copying streams into an MP4 takes seconds and changes not one byte of picture. Re-encoding takes an hour and always costs quality.
Converting to MP4 means one of two things, and most tools will not say which they are doing. Knowing which saves hours and saves your picture.
Seconds, no quality lost. The same video and audio move into a new container untouched.
Hours, some loss. Every frame is decoded and compressed again. A transcode, properly.
-c copy. In graphical tools, look for passthrough or stream copy and turn it on.-movflags +faststart and your MP4 streams instead of waiting. See section 9.That one line is the entire job. FFmpeg reads your source, lifts the streams out, writes them into MP4 boxes, moves the index to the front and never decodes a frame. On full-length films it finishes in well under a minute.
Watch what a converter does by default. Most consumer tools re-encode whether you needed it or not, because that is their only path. Conversions taking forty minutes and handing back a softer picture were re-encoding what could have been copied.
An MP4 with its video track dropped is an .m4a, and no re-encoding is needed there either. The command ffmpeg -i film.mp4 -vn -c copy music.m4a keeps the AAC exactly as it was. Converting that to MP3 does re-encode, and it costs quality twice.
An MP4 cut short will not open at all, where MKV and MP3 play up to the cut. Its index lives in one box at the end, and truncated files lost it.
This question sends most people to a repair tool, and it has nothing to do with damage. The media is fine. The map is missing.
Encoders cannot know how long video will run until they have written it, so most write the media first and the index afterwards. That puts mdat near the front and moov at the very end of the file.
| Format | Cut at 50% | Why |
|---|---|---|
| MP4 | Will not open at all | The entire index was in one box at the end |
| MP4, faststart | Plays half | The index was written at the front instead |
| MP4, fragmented | Plays half | Every fragment carries its own small index |
| MKV | Plays half | Clusters carry their own timestamps |
| MP3 | Plays half | Every frame carries its own header |
| AVI | Plays half, no seek | The index is at the end, the chunks are not |
So “my MP4 is corrupt” is usually one missing box. Nothing is wrong with the frames that did arrive, and downloading again beats buying a repair tool.
Like most modern container formats, MP4 supports streaming over the internet. That only works when its index sits at the front.
On files you are making yourself the fix has a name: faststart. It rewrites the finished file with moov at the front, which costs one extra pass over the bytes and nothing else.
Always use faststart. It is why playback starts before the download ends.
Fetch it again. No tool can rebuild an index that was never written.
Repair tools cannot invent an index. Some rebuild a rough one by scanning for frame boundaries, and the result seeks badly and reports the wrong length. Downloading again takes less time and gives you the real file.
The container decides nothing about quality. Every claim that MP4 looks better or worse than something else is really about the codec, the bit rate and the resolution inside.
The older version of this page said MP4 video is “of very high quality as compared to DVD”. Its FAQ repeated that with a reason: “because it supports multiple bits of data”. Neither sentence means anything, and the second is not a measurement of any kind.
Containers have no quality. They record where frames sit and how long they run, and a container contains nothing that alters them. Change the container and every frame is identical.
| Setting | Effect on the picture |
|---|---|
| Bit rate | The largest single factor. Bits per second of video |
| Codec | HEVC does more with the same bits than H.264 |
| Resolution | More pixels needs more bits to stay clean |
| Frame rate | 60 frames a second needs more bits than 24 |
| Encoder preset | Slower presets look better at one bit rate |
| The container | None. It holds bytes and never touches them |
One related claim is worth correcting, from a directory ranking for this term today: that MP4 “only supports lossy video codecs”. Containers support whatever somebody registers for them, and the MP4 family carries lossless audio in Apple Lossless, in MPEG-4 ALS and in FLAC, which arrived in late 2018.
Comparing against a DVD is comparing against MPEG-2 at about 9 Mbit/s. Modern H.264 beats that at a third of the bit rate, and HEVC beats H.264. So an MP4 is not better than DVD by being an MP4. It is better because of what somebody encoded into it, and those same codecs sit happily in MKV.
Use MP4 for anything leaving your computer. Keep MKV for anything you are storing with subtitles and extra tracks. The two jobs pull in opposite directions.
For sending, nothing else comes close. MP4 plays on phones you have never seen, hotel televisions, borrowed tablets and in every browser without a plugin. That reach is the entire case for it.
For storing, MP4 costs you things you may want back. No styled subtitles, no attached fonts, no ordered chapters. And nothing opens at all if a copy is ever truncated.
Use MP4. It plays on whatever the other person owns.
Keep MKV. Nothing else holds the subtitles, fonts and chapters together.
Everything on this page in one block: names, boxes, brands, media types and the standards that define this format.
Directories file this under the MP4 file type, and the file type is what decides your answer. The MP4 file extension your file manager shows has meant one thing since 2003: MPEG-4 Part 14 describes how the bytes are laid out.
| Item | Value |
|---|---|
| Extension | .mp4. The only one the specification defines |
| Full name | MPEG-4 Part 14 |
| Kind | Multimedia container. Never a codec |
| Published by | ISO and IEC, through the MPEG committee |
| Standard | ISO/IEC 14496-14, published 24 November 2003 |
| Current edition | ISO/IEC 14496-14:2020, the third |
| Built on | ISO/IEC 14496-12, the ISO Base Media File Format |
| Which came from | Apple's QuickTime File Format, published 2001 |
| Registration authority | Apple Inc., named in Annex D of Part 12 |
| Media types | video/mp4, audio/mp4, application/mp4 |
| Mac type code | mpg4 |
| Registered by | RFC 4337, March 2006, Standards Track |
| Box header | 4 bytes size, 4 bytes type. Size 1 means a 64-bit largesize |
| Usual video | H.264, HEVC, AV1, MPEG-4 Part 2 |
| Usual audio | AAC, plus ALAC, FLAC and Opus since late 2018 |
| Subtitles | MPEG-4 Timed Text. No box for styled ASS or SSA |
| Family | .m4a, .m4b, .m4p, .m4r, .m4v, .mov, .3gp |
Not an open format, in the sense people usually mean. The specification is an ISO standard, which means ISO sells the document rather than publishing it free, and the codecs most MP4 files carry are patent licensed. Free to play everywhere, and not free the way FLAC and Opus are.
The standard number, the publication date and the derivation come from ISO's own record for ISO/IEC 14496-14. The media types and their rules come from RFC 4337, published by the IETF in March 2006. The box header syntax and the box list come from the ISO Base Media File Format.
The brand codes come from the MP4 registration authority. The QuickTime lineage and the Annex D registration authority come from the MPEG-4 Part 12 documentation.
Install VLC. It carries its own decoders. See section 4.
Check the download. Section 9 explains why.
Comparing video containers? MKV files hold what MP4 cannot, the AVI format came out of Microsoft in 1992 and Flash video files carried the web before MP4 won it.
Working with sound alone? MP3 audio holds the codec most people reach for, and WMA files were Microsoft's answer to it.
Stuck on your computer rather than your MP4? Our Windows fixes and macOS guides cover the system side, including file associations.
New to all of this? What a file format is covers the ground under it, and our file format guides list the rest.
Found an MP4 file that behaves in a way nothing here explains? Send us what MediaInfo reports and we will tell you which track is the problem.