# .avi MIME Type: video/x-msvideo

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

- MIME type: `video/x-msvideo`
- Extensions: .avi
- Content-Type header: `video/x-msvideo`
- Compress in transit: no (already compressed)
- File signature: `52 49 46 46 xx xx xx xx 41 56 49 20`

## Good to know

- Convert to MP4 or WebM before publishing.

## Server configuration

### 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">
```

## FAQ

### 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

- [.mp4 — video/mp4](https://www.devkult.com/mime/mp4.md)
- [.webm — video/webm](https://www.devkult.com/mime/webm.md)

Open the interactive page: https://www.devkult.com/mime/avi