M4V file format
Apple's MPEG-4 video variant, commonly DRM-wrapped iTunes video.
- MIME type
- video/x-m4v
- Extensions
- .m4v
- Category
- Video
Magic-number signature
| 0x00000004 | 66747970 | ftyp | ISO-BMFF 'ftyp' box |
| 0x00000008 | 4D345620 | M4V | brand 'M4V ' |
About the M4V format
M4V is MP4 as the iTunes Store shipped it. The container is the ISO base media file format, the boxes are the same boxes, the video is normally H.264 and the audio AAC — the only structural difference from a plain .mp4 is the brand string in the FileTypeBox and, on purchased content, a FairPlay encryption layer inside the sample descriptions. Apple used the separate extension so that its own software could route the file to iTunes and so that protected and unprotected media could be told apart at a glance. That is all it means: an unprotected M4V renamed to .mp4 plays in anything, and a protected one will not play anywhere regardless of what it is called, because the bytes of the video have been encrypted rather than merely labelled.
Header layout, byte by byte
| Offset | Length | Field | Meaning |
|---|---|---|---|
| 0 | 4 | ftyp box size | Big-endian length of the FileTypeBox including this field. 00 00 00 20 is 32 bytes, which fits a major brand, a minor version and three compatible brands — the shape Apple's and ffmpeg's writers both produce. |
| 4 | 4 | Box type 'ftyp' | 66 74 79 70. Required by ISO/IEC 14496-12 to be the first box in the file, which puts the only recognisable ASCII in the header at offset 4 instead of offset 0. |
| 8 | 4 | Major brand 'M4V ' | 4D 34 56 20 — capital M, digit 4, capital V, then one ASCII space that is part of the brand. Audio-only siblings from the same family use 'M4A ' and 'M4B ' in exactly this position, and each is padded to four characters the same way. |
| 12 | 4 | Minor version | A big-endian 32-bit number with no normative meaning; 00 00 02 00 is what appears in files remuxed by ffmpeg. It is not a version gate and must not be used to reject a file. |
| 16 | variable | Compatible brands | Four bytes per brand for the rest of the box, commonly 'M4V ' repeated followed by isom, iso2 and avc1. The presence of isom here is the file stating outright that a plain MP4 reader can handle it, which is why renaming so often works. |
| 32 | 8 | Second box header | Size and type of the box after ftyp — 'moov', 'mdat' or a 'free' placeholder. It lands at 32 when the ftyp box is 32 bytes; take the length from offset 0 rather than trusting the position. |
Telling it apart from its neighbours
| Easily confused with | How to tell |
|---|---|
| MP4 | Only the four bytes at offset 8 differ: 'M4V ' against isom, mp42 or avc1. Nothing else in the file has to change, and the compatible-brands list at offset 16 usually contains isom anyway. If you want to know whether a given M4V is genuinely playable, the header will not tell you — look for a 'sinf' protection box inside the sample description, since FairPlay content replaces the codec entry with a protected one. |
| M4A | The audio-only member of the family, brand 'M4A ' (4D 34 41 20) at offset 8. Byte layout is otherwise identical, so the header alone does not prove there is no video — the definitive answer is the handler type in each track's 'hdlr' box, 'vide' for video and 'soun' for audio. An .m4a with a cover image still has only a sound track. |
| QuickTime Movie | Brand 'qt ' at offset 8. Both formats are Apple's, both are ISO base media files and both routinely hold H.264 and AAC, so people move files between the two extensions freely. The difference that bites is content: QuickTime permits codecs and track types that no M4V consumer expects. |
| 3GP | Brand 3gp4, 3gp5 or 3gp6 at offset 8. Both are constrained profiles of the same container aimed at particular devices, one at handsets and one at Apple's players, and both hold H.264 and AAC in the general case — the extension records the intended destination, not a difference in structure. |
How these files break
- DRM mistaken for damage. A purchased, FairPlay-protected M4V has an entirely intact header and a perfectly walkable box tree, and it still refuses to play on anything that is not an authorised Apple device. There is nothing to repair; the sample data is encrypted, and a hex editor confirms it by showing high-entropy bytes where a recognisable H.264 start code should be.
- The moov box never written. An export or download interrupted partway leaves the mdat full and the index absent, and the result will not open in anything. As with any ISO base media file, the frames are still present and recovering them means reconstructing sample tables from a healthy file made by the same encoder.
- The brand rewritten by a remux. Passing an M4V through a tool that copies streams without preserving the FileTypeBox produces a file whose bytes at offset 8 now say isom. The video is untouched and plays fine, but iTunes and anything else keying off the brand will treat it as a different kind of file.
- Truncation. The header is at the very front and stays healthy, so file-type detection still reports M4V correctly on a file that is missing most of its content. Walking the boxes is what exposes it: the final box declares more bytes than the file actually has.
- A moov at the tail on a slow link. Not corruption, but indistinguishable from it while watching: nothing plays until the last byte arrives, because the index is at the end. Moving it to the front rewrites offsets only and leaves the encoded video exactly as it was.
Where the format stands today
M4V mattered when iTunes was how people bought films and television, and it is largely a historical artefact now that the same catalogue is streamed rather than downloaded. Files still turn up: old iTunes libraries, home videos exported from Apple software, and handbrake presets that emit the extension out of habit. There is no reason to choose it for anything new — MP4 is the same container without the ambiguity, and every player and every browser prefers the plain extension. Where an M4V is what you have, the practical question is only ever whether it is protected. Unprotected, it is an MP4 and needs nothing but a rename. Protected, no converter can help, because what is missing is a key rather than a codec, and any tool claiming otherwise is describing circumvention rather than conversion.
Open M4V files on this site
Every one of these runs in your browser — the file never leaves your machine.
Related formats
Formats that are easy to confuse with M4V — compare their leading bytes.
| Format | First bytes | Extension |
|---|---|---|
| MP4 | 66 74 79 70 | .mp4 |
| QuickTime Movie | 66 74 79 70 | .mov |
| M4A | 66 74 79 70 | .m4a |