Opus is an open, royalty-free lossy audio codec standardized by the IETF as RFC 6716 in 2012. Among audio formats and codecs it stands out for covering both speech and music with a single format, at bitrates from 6 to 510 kbit/s and with low algorithmic delay, which makes it suitable for real-time communication as well as streaming and file storage.
Opus combines two coding technologies: SILK, a speech-oriented linear prediction codec, and CELT, a transform codec based on the modified discrete cosine transform. The encoder can switch between them or use both together, adapting to the content and the available bandwidth frame by frame.
How the Opus codec works
Opus operates in three modes. SILK mode models the human vocal tract with linear prediction and is efficient for speech at low bitrates. CELT mode splits the signal into frequency bands and codes the spectral shape and energy, which suits music and wideband content. Hybrid mode codes frequencies up to 8 kHz with SILK and higher frequencies with CELT.
Audio is processed in short frames of 2.5 to 60 ms, with 20 ms as the common default; later versions also allow packets up to 120 ms. The default algorithmic delay is 26.5 ms, and a restricted low-delay configuration can reduce it to about 5 ms, which matters for live music collaboration and interactive applications.
The table summarizes the main operating parameters.
| Parameter | Range | Notes |
|---|---|---|
| Bitrate | 6-510 kbit/s | Constant, constrained or variable bitrate |
| Audio bandwidth | Narrowband 4 kHz to fullband 20 kHz | Chosen automatically or set by the application |
| Internal sample rate | 8, 12, 16, 24 or 48 kHz | Decoding normally at 48 kHz |
| Frame duration | 2.5-60 ms per frame | 20 ms is typical for voice |
| Channels | Mono, stereo, multichannel | Multichannel through channel mapping families |
| Algorithmic delay | About 5-26.5 ms | Depends on mode and frame size |
Features for real-time communication
Opus was designed for interactive use over unreliable networks, and several features address packet loss and changing conditions directly.
- Packet loss concealment synthesizes plausible audio when a packet is missing.
- In-band forward error correction embeds a low-bitrate copy of the previous frame in SILK and hybrid modes.
- Discontinuous transmission sends almost nothing during silence, saving bandwidth.
- Seamless bitrate and bandwidth switching lets the sender adapt without interrupting playback.
- Variable frame size trades latency against efficiency at the same stream.
These properties made Opus a mandatory-to-implement codec in WebRTC, the browser real-time communication framework, and it is widely used in voice chat, video conferencing and VoIP applications.
Opus compared with other audio codecs
Opus competes with other lossy formats in its topic and complements lossless ones. Its main advantages are flexibility and efficiency at low and medium bitrates; its main disadvantage is narrower support in older hardware players and car systems.
| Codec | Type | Licensing | Latency | Typical use |
|---|---|---|---|---|
| Opus | Lossy, speech and music | Royalty-free, open | Low | Calls, streaming, web audio |
| AAC | Lossy | Patent-licensed | Moderate, low-delay variants exist | Streaming, mobile, broadcast |
| MP3 | Lossy | Patents expired | High | Legacy downloads, wide compatibility |
| Ogg Vorbis | Lossy | Royalty-free, open | High | Games, older open streaming |
| FLAC | Lossless | Royalty-free, open | Not designed for real time | Archiving, high-quality distribution |
Opus is generally considered the successor to Vorbis within the open ecosystem. In listening tests at around 96-128 kbit/s stereo, it typically performs at least as well as AAC and clearly better than MP3, although exact results depend on encoder versions and test material.
Choosing Opus settings
The reference encoder, libopus, chooses modes automatically, so most configuration is a matter of bitrate and application type. The values below are common starting points rather than fixed rules.
| Use | Typical bitrate | Recommended setting |
|---|---|---|
| Narrowband voice call | 8-12 kbit/s mono | VoIP application mode |
| Wideband voice and podcasts | 16-32 kbit/s mono | VoIP or audio mode |
| Fullband speech, high quality | 32-64 kbit/s mono | Audio mode |
| Music streaming | 96-160 kbit/s stereo | Audio mode, VBR |
| Near-transparent music | 160-256 kbit/s stereo | Audio mode, VBR |
For files, Opus is usually stored in the Ogg container with the .opus extension, or in WebM and Matroska for video; MP4 and Core Audio Format also define Opus mappings. Choosing the container that the target players support is often more decisive than the codec settings.
Limitations and common mistakes
Opus always decodes at 48 kHz internally. Material at 44.1 kHz is resampled, which is technically harmless but surprises users who expect bit-identical sample rates; Ogg Opus stores the original rate only as informational metadata.
As a lossy codec, Opus discards information. Transcoding from MP3 or AAC to Opus, or repeatedly re-encoding Opus files, compounds artifacts, so encoding should start from a lossless source such as WAV or FLAC. Another pitfall is device compatibility: older hardware players, some car systems and certain smart speakers may not decode Opus at all.
Settings copied from voice applications can also harm music. Forcing VoIP mode or a narrow bandwidth on a music stream favors speech intelligibility over tonal accuracy, and very short frames below 10 ms reduce coding efficiency noticeably. For stored music, 20 ms frames, audio mode and variable bitrate give the best quality for the size, while extremely low delay should be reserved for genuinely interactive use.
Put simply
Opus is a way of shrinking audio so it travels quickly over the internet while still sounding good. It handles both voices and music, which most older formats did not do equally well.
It is especially good for live conversations, such as video calls, because it adds very little delay and copes with a patchy connection. It is also free for anyone to use, which is why it appears quietly in many apps and web browsers.
In practice
A small online radio station also hosts a weekly call-in show. For live callers joining through a browser, the studio uses a WebRTC system that transmits audio with Opus at about 32 kbit/s mono in 20 ms frames, with in-band error correction enabled for listeners on mobile networks.
The finished program is mixed from a 24-bit WAV master and published as a podcast in Ogg Opus at 64 kbit/s stereo, alongside an AAC version for players without Opus support.
Callers on unstable connections remain understandable even with occasional packet loss, and the Opus podcast files are about half the size of the station’s previous MP3 files at comparable perceived quality.