.opus MIME type
Opus audioaudio
audio/oggOpus audio in an Ogg container. RFC 7845 says to serve .opus files as audio/ogg.
| MIME type | audio/ogg |
|---|---|
| Extensions | .opus |
| Also seen as | audio/opus |
| Content-Type | audio/ogg |
| Compress in transit? | No — already compressed |
| File signature | 4F 67 67 53 (OggS) the Ogg container signature; an OpusHead packet follows |
Good to know
audio/opusis registered too, but for Opus over RTP (RFC 7587), not for files.- Name the codec in the
<source>type so the browser can tell before downloading:type="audio/ogg; codecs=opus". - Opus is also the usual audio codec inside WebM — see .weba.
Serve .opus files with the right type
The response header to send:
Content-Type: audio/ogg
Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:
audio/ogg opus;
AddType audio/ogg .opus
res.set("Content-Type", "audio/ogg");import mimetypes
mimetypes.add_type("audio/ogg", ".opus")<input type="file" accept=".opus,audio/ogg">
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.opus | grep -i '^content-type:' file --mime-type file.opus
Frequently asked questions
What is the MIME type for .opus files?
audio/ogg. You may also see audio/opus, but audio/ogg is the one to send.
What Content-Type header should a .opus file be served with?
Content-Type: audio/ogg. It's already compressed, so servers shouldn't gzip it.
How can I tell if a file is really a .opus?
Check its bytes rather than the extension: OPUS files start with 4F 67 67 53 (OggS) — the Ogg container signature; an OpusHead packet follows. On the command line, file --mime-type name.opus does this for you.
Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options