video/mp4
The MIME type for MP4 video files, the most widely compatible video format on the web.
What Is This?
The video/mp4 MIME type indicates that the content is an MP4 video file using the MPEG-4 Part 14 container format. MP4 is the most universally supported video format for web delivery, compatible with all modern browsers and devices. It typically uses H.264 video codec and AAC audio codec.
Common Uses
Common Use
HTML5 video player content
Common Use
Social media video uploads
Common Use
Video streaming services
Common Use
Product videos and demos
Examples
Serve files with the video/mp4 MIME type:
# Nginx
location ~ \.mp4$ {
add_header Content-Type "video/mp4";
}
# Apache
AddType video/mp4 .mp4Use this MIME type in HTML or HTTP:
Content-Type: video/mp4 <!-- HTML reference --> <link rel="preload" href="file.mp4" as="fetch" crossorigin>
Frequently Asked Questions
Should I use MP4 or WebM for web video?
MP4 has broader compatibility (especially on Apple devices). WebM (VP9 codec) offers better compression but less native support. Use MP4 as the primary format with WebM as an enhancement for supported browsers.
What is the difference between video/mp4 and video/x-m4v?
video/mp4 is the standard MIME type for MP4 files. video/x-m4v is a non-standard type used for iTunes video files (fairplay-protected). For normal web video, always use video/mp4.