Media type · video/mp4
video/mp4
video/mp4 is the media type for MP4 video files.
Key facts
| Type | video/mp4 |
|---|---|
| Extensions | .mp4, .m4v |
| Standard | ISO/IEC 14496-12; 14496-14 |
| Text or binary | Binary |
| Browser behavior | Plays in the video element |
What video/mp4 is
MP4 is a container, not a codec. The same .mp4 file can hold H.264, H.265 or AV1 video and AAC audio. Browsers support specific codec combinations, so a file that downloads correctly can still fail to play if the codec is unsupported. The optional codecs parameter describes the tracks, which lets a client choose a compatible source.
Serving video
Video needs range requests for seeking and progressive playback. If the server ignores Range, users may wait for the full download. Do not set a short cache lifetime on large media without a content hash; a changed file at the same URL is hard to invalidate. For web delivery, H.264/AAC in MP4 is the most compatible pair.
Frequently asked questions
Is every .mp4 file playable in a browser?
No. The container is supported, but the codecs inside may not be. H.264 video with AAC audio is the safest combination.
Why does video seek poorly on my server?
The server probably does not support HTTP range requests. Enable them so the player can fetch the needed byte range.