.webm MIME type
WebM videovideo
video/webmOpen video container for VP8, VP9 or AV1 video with Vorbis or Opus audio.
| MIME type | video/webm |
|---|---|
| Extensions | .webm |
| Also seen as | audio/webm |
| Content-Type | video/webm |
| Compress in transit? | No — already compressed |
| File signature | 1A 45 DF A3 the EBML header shared by WebM and Matroska |
Good to know
- Audio-only WebM files should be served as
audio/webm.
Serve .webm files with the right type
The response header to send:
Content-Type: video/webm
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/webm webm;
Apache (.htaccess or server config)
AddType video/webm .webm
Express
res.set("Content-Type", "video/webm");Python
import mimetypes
mimetypes.add_type("video/webm", ".webm")HTML file input
<input type="file" accept=".webm,video/webm">
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.webm | grep -i '^content-type:' file --mime-type file.webm
Frequently asked questions
What is the MIME type for .webm files?
video/webm. You may also see audio/webm, but video/webm is the one to send.
What Content-Type header should a .webm file be served with?
Content-Type: video/webm. It's already compressed, so servers shouldn't gzip it.
How can I tell if a file is really a .webm?
Check its bytes rather than the extension: WEBM files start with 1A 45 DF A3 — the EBML header shared by WebM and Matroska. On the command line, file --mime-type name.webm does this for you.
Related types
Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options