Opus Audio Codec: The Best All-Around Audio Format for the Web
Opus is the Swiss Army knife of audio codecs. Standardized by the IETF in RFC 6716 (2012) and developed jointly by Xiph.Org and Mozilla, Opus combines two very different audio technologies — the SILK codec (from Skype) for speech, and the CELT codec for music — into a single format that adapts dynamically to whatever it is encoding. The result is a codec that outperforms MP3, AAC, Vorbis, and WMA at nearly every bitrate while covering every use case from voice chat to high-quality music streaming.
Why Opus Beats Older Formats
At Low Bitrates (6–32 kbps): Voice and Communication
This is where Opus started — as a replacement for Speex and G.711 in VoIP applications. At 8–16 kbps, Opus produces intelligible, natural-sounding speech that sounds noticeably better than G.711 (standard telephone codec) or G.726 (ADPCM). At 32 kbps it delivers music that is indistinguishable from AM radio. No MP3 or AAC file sounds this good at 32 kbps.
At Medium Bitrates (64–128 kbps): Music Streaming
At 96 kbps, Opus achieves audio quality that is virtually transparent to most listeners for music — equivalent to MP3 at 160–192 kbps or AAC at 128–160 kbps. Streaming services that use Opus at 96 kbps are delivering noticeably better quality than FM radio (which is roughly equivalent to MP3 at 128 kbps).
At High Bitrates (128–320 kbps): Audiophile Use
Opus at 192 kbps is transparent (indistinguishable from lossless) for virtually all content under double-blind listening tests. Opus at 320 kbps is overkill for almost anything.
Technical Architecture
Opus is not a monolithic codec. It intelligently switches between two internal modes:
SILK mode (for speech ≤12 kHz bandwidth):
- Optimized for human voice characteristics
- Uses linear predictive coding (LPC) to model the vocal tract
- Very efficient for pure voice; poor for music
- Operates at 6–40 kbps
CELT mode (for music and wideband audio):
- Transform codec using modified discrete cosine transform (MDCT)
- Similar architecture to Vorbis; excellent for music and complex audio
- Operates at 32–512 kbps
- Operates at ultra-low latency (2.5–5ms frame size)
Hybrid mode: At 8–24 kHz, Opus runs both SILK and CELT simultaneously — SILK handles the low frequencies (voice fundamentals), CELT handles the highs (harmonics and music overtones).
Ultra-low latency: Opus frames can be as short as 2.5ms, giving algorithmic delay of just 5ms. This makes Opus suitable for real-time applications like phone calls, gaming voice chat, and live music performance — something MP3 (at 26ms algorithmic delay) and AAC (at 20–30ms) cannot match.
Variable bitrate (VBR): Opus uses VBR by default, allocating more bits to complex passages and fewer to silence or simple tones. This maximizes efficiency at any target quality level.
Channel support: Mono, stereo, and up to 255 channels via the Ambisonics extension (used in spatial audio for VR and 360° video).
Sample rates: 8, 12, 16, 24, 48 kHz (internally always processes at 48 kHz; resamples as needed).
Where Opus Is Used
WebRTC: Opus is the mandatory audio codec for WebRTC (RFC 7874). This means every Google Meet, Zoom Web, Microsoft Teams Web, Discord, and Jitsi call uses Opus when running in a browser. Billions of voice minutes per day are transmitted in Opus.
Discord: Discord's voice chat exclusively uses Opus for all audio compression.
WhatsApp and Signal: Voice messages and calls use Opus for compression.
Spotify: Uses Opus for audio streaming on all platforms (web and mobile), typically at 160 kbps (high quality) and 96 kbps (standard).
YouTube: Uses Opus in WebM containers for audio in many streams, particularly on mobile.
Web browsers: Chrome, Firefox, Edge, Safari, and Opera all support Opus natively in the Web Audio API and HTML5 <audio>/<video> elements.
Video games: Opus is used in online multiplayer games for voice chat (Source Engine, Unity, Unreal Engine all offer Opus integration).
Opus File Containers
Opus audio is almost always stored in the Ogg container (.opus or .ogg file extension). The Ogg/Opus format is standardized in RFC 7845. The .opus extension is preferred and unambiguous.
Opus can also be encapsulated in:
- WebM/Matroska — for video content on the web (WebM requires Opus or Vorbis audio with VP8/VP9/AV1 video)
- MP4 — supported since iOS 16 and modern Android; stored with
codec=opusin the MP4 container - OGG — the original/default container
Encoding Opus with FFmpeg
# Convert MP3 to Opus at 96 kbps (web streaming quality)
ffmpeg -i input.mp3 -c:a libopus -b:a 96k output.opus
# High quality music archival at 160 kbps
ffmpeg -i input.flac -c:a libopus -b:a 160k -vbr on output.opus
# Voice call quality at 24 kbps
ffmpeg -i input.wav -c:a libopus -b:a 24k -vbr on output.opus
# Embed Opus in WebM video container
ffmpeg -i input.mp4 -c:v copy -c:a libopus -b:a 128k output.webm
# Batch convert a music library from FLAC to Opus
for f in *.flac; do
ffmpeg -i "$f" -c:a libopus -b:a 160k "${f%.flac}.opus"
done
Opus vs. AAC vs. MP3 vs. Vorbis
| Codec | Bitrate for transparency | Latency | Patent-free | Browser support |
|---|---|---|---|---|
| Opus | ~128 kbps | 5–20ms | ✅ Royalty-free | ✅ All modern browsers |
| AAC-LC | ~160 kbps | 20–30ms | ❌ Licensed | ✅ (with license) |
| MP3 | ~192 kbps | 26ms | ✅ (expired) | ✅ All browsers |
| Vorbis | ~160 kbps | 20ms | ✅ Royalty-free | ✅ Modern browsers |
| WMA | ~192 kbps | 20ms | ❌ Licensed | ❌ Limited |
Opus wins on quality-per-bit at every bitrate, has the lowest latency, and is completely royalty-free. Its only weakness is that the .opus format is not as universally supported by older hardware media players and car stereos as MP3.
Opus for Voice Recording and Podcasting
For voice content where file size matters:
- 32–48 kbps mono Opus sounds better than 128 kbps mono MP3
- A 1-hour podcast encoded at 32 kbps Opus = ~14 MB (vs. ~56 MB at 128 kbps MP3)
- Podcast hosting platforms accept MP3, but distributing internal recordings in Opus saves storage and bandwidth
For archival of voice recordings, Opus at 64 kbps stereo preserves far more nuance than MP3 at 128 kbps stereo while using half the space.
Playing Opus Files
Any modern media player supports .opus:
- VLC — all platforms, no plugins needed
- foobar2000 — with the foo_input_opus plugin (or natively in newer versions)
- Winamp — with the in_opus plugin
- mpv, mplayer — native support
- Web browsers — native via
<audio src="file.opus" controls> - Older iPods/iPhones: Not supported; convert to AAC for iOS compatibility
- Android: Native support from Android 5.0 (API 21) onwards
Related conversions
Common video conversions that pair well with this guide: