DevKits

audio/*

audio/opus

File extensions: .opus

Modern, low-latency lossy audio codec — the best quality-per-bitrate for voice and music.

What is audio/opus?

audio/opus is the media type for the Opus codec, a royalty-free, low-latency audio format standardized in RFC 6716. Opus beats MP3 and AAC on quality at the same bitrate across the full range from low-bitrate speech to high-fidelity music, which is why it's mandatory in WebRTC and widely used by Discord, YouTube, and streaming apps. Opus data is usually carried inside an Ogg container (.opus files, served as audio/ogg) or inside WebM for video.

Typical usage

WebRTC voice/video calls, real-time streaming, voice messages, and web audio where bandwidth matters.

Common gotchas

A raw Opus stream is almost always wrapped in a container. Standalone .opus files are Ogg-encapsulated and some servers serve them as audio/ogg; inside video they ride in WebM. Don't send bare Opus packets with a container MIME type.

HTTP header example

Response header

Content-Type: audio/opus

Reference

RFC 6716 / RFC 7587

Frequently asked questions

What is the audio/opus MIME type?

audio/opus is the media type for the Opus codec, a royalty-free, low-latency audio format standardized in RFC 6716. Opus beats MP3 and AAC on quality at the same bitrate across the full range from low-bitrate speech to high-fidelity music, which is why it's mandatory in WebRTC and widely used by Discord, YouTube, and streaming apps. Opus data is usually carried inside an Ogg container (.opus files, served as audio/ogg) or inside WebM for video.

What file extension does audio/opus use?

Files served as audio/opus typically use the extension .opus. The most common is .opus.

How do I set the Content-Type for audio/opus?

Send the HTTP response header Content-Type: audio/opus. WebRTC voice/video calls, real-time streaming, voice messages, and web audio where bandwidth matters.

Is audio/opus an official MIME type?

Yes. audio/opus is officially registered with IANA (RFC 6716 / RFC 7587), so standards-conformant clients recognize it.

What are common mistakes with audio/opus?

A raw Opus stream is almost always wrapped in a container. Standalone .opus files are Ogg-encapsulated and some servers serve them as audio/ogg; inside video they ride in WebM. Don't send bare Opus packets with a container MIME type.

Related MIME types