# .weba MIME Type: audio/webm

> Audio-only WebM, usually with Opus inside. Recordings are often saved as .webm even when they have no video.

- MIME type: `audio/webm`
- Extensions: .weba
- Content-Type header: `audio/webm`
- Compress in transit: no (already compressed)
- File signature: `1A 45 DF A3` (the EBML header shared by WebM and Matroska)

## Good to know

- Chromium's MediaRecorder records audio as `audio/webm;codecs=opus` by default, while Safari has historically recorded MP4. Check `MediaRecorder.isTypeSupported()` rather than assuming a type.
- When you upload a recording, send the Blob's own `type` as the Content-Type instead of hard-coding one.

## Server configuration

### nginx (inside the types block in mime.types)

```
audio/webm weba;
```

### Apache (.htaccess or server config)

```
AddType audio/webm .weba
```

### Express

```
res.set("Content-Type", "audio/webm");
```

### Python

```
import mimetypes

mimetypes.add_type("audio/webm", ".weba")
```

### HTML file input

```
<input type="file" accept=".weba,audio/webm">
```

## FAQ

### What is the MIME type for .weba files?

`audio/webm`.

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

`Content-Type: audio/webm`. It's already compressed, so servers shouldn't gzip it.

### How can I tell if a file is really a .weba?

Check its bytes rather than the extension: WEBA files start with `1A 45 DF A3` — the EBML header shared by WebM and Matroska. On the command line, `file --mime-type name.weba` does this for you.

## Related types

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

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