devkult_
tools29converters34
home/mime/.avi

.avi MIME type

AVI videovideo

video/x-msvideo

Legacy Windows video container. Browsers can't play AVI.

MIME typevideo/x-msvideo
Extensions.avi
Content-Typevideo/x-msvideo
Compress in transit?No — already compressed
File signature52 49 46 46 xx xx xx xx 41 56 49 20 (RIFF....AVI )

Good to know

  • Convert to MP4 or WebM before publishing.

Serve .avi files with the right type

The response header to send:

Content-Type: video/x-msvideo

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/x-msvideo avi;
Apache (.htaccess or server config)
AddType video/x-msvideo .avi
Express
res.set("Content-Type", "video/x-msvideo");
Python
import mimetypes

mimetypes.add_type("video/x-msvideo", ".avi")
HTML file input
<input type="file" accept=".avi,video/x-msvideo">

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.avi | grep -i '^content-type:'
file --mime-type file.avi

Frequently asked questions

What is the MIME type for .avi files?

video/x-msvideo.

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

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

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

Check its bytes rather than the extension: AVI files start with 52 49 46 46 xx xx xx xx 41 56 49 20 (RIFF....AVI ). On the command line, file --mime-type name.avi does this for you.

Related types

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