Skip to main content

video/mp4

video

The MIME type for MP4 video files. The dominant web video format. Supported by all modern browsers in HTML5 <video>. H.264 encoded MP4 has universal browser support including Safari. For modern compression, use video/webm (VP9/AV1) for Chrome/Firefox alongside video/mp4 as fallback.

Details

video/mp4 covers MPEG-4 Part 12 container files (.mp4, .m4v). Registered by RFC 4337.

Codec note: video/mp4 is the container type, not the codec. The codec affects browser support: - H.264 + video/mp4: universal browser support including Safari - H.265/HEVC + video/mp4: Safari on Apple devices, newer hardware - VP9 + video/webm: Chrome, Firefox, Edge (not Safari) - AV1 + video/mp4 or video/webm: Chrome 70+, Firefox 67+, Safari 17+

HTTP range requests: essential for video scrubbing. Always support Range requests for video/mp4 responses. Set Accept-Ranges: bytes.

Replacing GIF: video/mp4 autoplay loop is far more efficient than animated GIF: <video autoplay loop muted playsinline><source src='anim.mp4' type='video/mp4'></video>

Common use

Web video, video streaming, replacing animated GIFs

See Also