MIME Types

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

1

Common Use

HTML5 video player content

2

Common Use

Social media video uploads

3

Common Use

Video streaming services

4

Common Use

Product videos and demos

Examples

Server Configuration

Serve files with the video/mp4 MIME type:

# Nginx
location ~ \.mp4$ {
  add_header Content-Type "video/mp4";
}

# Apache
AddType video/mp4 .mp4
HTML Usage

Use 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.