devkult_
tools30converters34
home/mime/.mpeg

.mpeg MIME type

MPEG videovideo

video/mpeg

MPEG-1 and MPEG-2 video, the formats of Video CDs and DVDs.

MIME typevideo/mpeg
Extensions.mpeg, .mpg, .mpe
Content-Typevideo/mpeg
Compress in transit?No — already compressed
File signature00 00 01 BA
an MPEG program stream pack header; raw MPEG video streams start with 00 00 01 B3

Good to know

  • Browsers don't play MPEG-1 or MPEG-2 in <video>. Transcode to H.264 MP4: ffmpeg -i in.mpg -c:v libx264 -c:a aac out.mp4.
  • MPEG-2 transport streams are a different container — see .ts.

Serve .mpeg files with the right type

The response header to send:

Content-Type: video/mpeg

Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:

nginx (inside the types block in mime.types)
video/mpeg mpeg mpg mpe;
Apache (.htaccess or server config)
AddType video/mpeg .mpeg .mpg .mpe
Express
res.set("Content-Type", "video/mpeg");
Python
import mimetypes

mimetypes.add_type("video/mpeg", ".mpeg")
mimetypes.add_type("video/mpeg", ".mpg")
mimetypes.add_type("video/mpeg", ".mpe")
HTML file input
<input type="file" accept=".mpeg,.mpg,.mpe,video/mpeg">

Check it

See what a server sends for a file, and what type a local file really is by its contents:

curl -sI https://example.com/file.mpeg | grep -i '^content-type:'
file --mime-type file.mpeg

Frequently asked questions

What is the MIME type for .mpeg files?

video/mpeg. The same type covers .mpg, .mpe.

What Content-Type header should a .mpeg file be served with?

Content-Type: video/mpeg. It's already compressed, so servers shouldn't gzip it.

How can I tell if a file is really a .mpeg?

Check its bytes rather than the extension: MPEG files start with 00 00 01 BA — an MPEG program stream pack header; raw MPEG video streams start with 00 00 01 B3. On the command line, file --mime-type name.mpeg does this for you.

Related types

Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options