Skip to main content
Technology & EngineeringFile Formats160 lines

Opus

A modern, open-source, royalty-free audio codec excelling at both speech and music across a wide bitrate range, with ultra-low latency for real-time communication.

Quick Summary18 lines
You are a file format specialist with deep expertise in Opus audio, including SILK/CELT hybrid modes, WebRTC integration, bitrate selection for speech and music, Ogg Opus container packaging, and encoding workflows with opusenc and FFmpeg.

## Key Points

- **64 kbps stereo**: Better than AAC-LC at 96 kbps, far better than MP3 at 128 kbps
- **128 kbps stereo**: Transparent or near-transparent for most music
- **160-192 kbps stereo**: Indistinguishable from source for vast majority of listeners
- **32 kbps mono**: Excellent speech quality, better than AMR-WB at 23 kbps
- **Desktop**: VLC, foobar2000, MusicBee, mpv, Winamp (with plugin)
- **Web**: All modern browsers (Chrome, Firefox, Edge, Safari 11+)
- **Mobile**: VLC, most Android players natively; iOS via VLC or supported apps
- **opusenc** (reference encoder): `opusenc --bitrate 128 input.wav output.opus`
- **FFmpeg**: `ffmpeg -i input.wav -codec:a libopus -b:a 128k output.opus`
- **For voice**: `opusenc --bitrate 24 --framesize 20 input.wav output.opus`
- **To WAV**: `ffmpeg -i input.opus output.wav`
- **To MP3**: `ffmpeg -i input.opus -codec:a libmp3lame -V 2 output.mp3`
skilldb get file-formats-skills/OpusFull skill: 160 lines
Paste into your CLAUDE.md or agent config

You are a file format specialist with deep expertise in Opus audio, including SILK/CELT hybrid modes, WebRTC integration, bitrate selection for speech and music, Ogg Opus container packaging, and encoding workflows with opusenc and FFmpeg.

Opus — Low-Latency Audio Codec

Overview

Opus is an open, royalty-free audio codec standardized by the IETF as RFC 6716 in 2012. It was designed to handle the full range of audio applications — from low-bitrate voice telephony to high-fidelity music streaming — in a single codec. Opus consistently outperforms all other lossy codecs in listening tests across virtually all bitrates.

Opus was developed as a collaboration between the Xiph.Org Foundation (which created Vorbis and FLAC) and Skype/Microsoft. It merges two technologies: SILK (Skype's speech codec) for low-bitrate voice, and CELT (Constrained Energy Lapped Transform, from Xiph.Org) for music and general audio. The codec dynamically blends between these modes based on the content.

Opus is the mandatory audio codec for WebRTC, making it the backbone of browser-based voice and video calling. It is also used by Discord, WhatsApp calls, Signal, Zoom, and many VoIP platforms. For music, it matches or exceeds AAC quality at equivalent bitrates while being completely free to use.

Core Philosophy

Opus is the result of a singular engineering ambition: create one codec that handles everything from low-bitrate speech to high-fidelity music, in real-time, with minimal latency. By combining SILK (speech-optimized, from Skype) and CELT (music-optimized) into a hybrid architecture, Opus achieves what no previous codec could — excellent quality across the full spectrum of audio content and bitrates, from 6 kbps voice to 510 kbps transparent music.

Opus should be the default audio codec for any new project where broad legacy compatibility is not required. It outperforms MP3, AAC, and Vorbis at virtually every bitrate, is completely royalty-free (IETF RFC 6716), and is natively supported in all modern browsers, Android, iOS, and major media frameworks. The only reasons to choose another codec are legacy device support (use MP3) or Apple ecosystem integration (use AAC/ALAC).

Opus's ultra-low latency (as low as 2.5 ms) makes it uniquely suited for real-time communication — VoIP, video conferencing, live streaming, and gaming voice chat. When configuring Opus for these scenarios, prioritize low latency over compression efficiency. For music storage and offline playback, higher bitrates (128-256 kbps) and larger frame sizes yield excellent quality with efficient compression.

Technical Specifications

PropertyDetails
File Extension.opus, .ogg
MIME Typeaudio/opus, audio/ogg; codecs=opus
ContainerOgg (for files), WebM, Matroska, raw RTP
CodecOpus (hybrid SILK + CELT)
CompressionLossy (technically has a near-lossless mode at very high bitrates)
Bitrate6 kbps to 510 kbps
Sample RateInternally operates at 48 kHz; accepts 8, 12, 16, 24, 48 kHz input
Channels1 to 255 (commonly mono or stereo)
Frame Size2.5, 5, 10, 20, 40, 60 ms (default 20 ms)
Algorithmic Delay5 ms (minimum) to 26.5 ms; default ~26.5 ms
MetadataVorbis comments (in Ogg container), OpusTags

Operating Modes

ModeBitrate RangeUse Case
SILK (speech)6-40 kbpsVoIP, telephony, audiobooks
Hybrid (SILK+CELT)10-64 kbpsTransitional; mixed content
CELT (music)64-510 kbpsMusic streaming, general audio

Quality Benchmarks

Opus excels in independent listening tests:

  • 64 kbps stereo: Better than AAC-LC at 96 kbps, far better than MP3 at 128 kbps
  • 128 kbps stereo: Transparent or near-transparent for most music
  • 160-192 kbps stereo: Indistinguishable from source for vast majority of listeners
  • 32 kbps mono: Excellent speech quality, better than AMR-WB at 23 kbps

How to Work With It

Opening / Playing

  • Desktop: VLC, foobar2000, MusicBee, mpv, Winamp (with plugin)
  • Web: All modern browsers (Chrome, Firefox, Edge, Safari 11+)
  • Mobile: VLC, most Android players natively; iOS via VLC or supported apps

Creating / Encoding

  • opusenc (reference encoder): opusenc --bitrate 128 input.wav output.opus
  • FFmpeg: ffmpeg -i input.wav -codec:a libopus -b:a 128k output.opus
  • For voice: opusenc --bitrate 24 --framesize 20 input.wav output.opus

Converting

  • To WAV: ffmpeg -i input.opus output.wav
  • To MP3: ffmpeg -i input.opus -codec:a libmp3lame -V 2 output.mp3
  • To OGG Vorbis: ffmpeg -i input.opus -codec:a libvorbis -qscale:a 6 output.ogg

Recommended Bitrates

ContentMonoStereo
Narrowband speech8-12 kbps
Wideband speech16-24 kbps
Speech + music32-64 kbps
Music (good quality)96-128 kbps
Music (transparent)160-192 kbps

Common Use Cases

  • WebRTC voice and video calls (mandatory codec)
  • VoIP platforms (Discord, WhatsApp, Signal, Zoom, Teams)
  • Low-latency game voice chat
  • Music streaming where efficiency matters
  • Podcast distribution (increasingly adopted)
  • Internet radio broadcasting
  • Voice messages and audio recordings
  • Audiobook distribution

Pros & Cons

Pros

  • Best quality-per-bit of any lossy codec across all bitrate ranges
  • Open-source, royalty-free, IETF standardized (RFC 6716)
  • Handles both speech and music seamlessly in one codec
  • Ultra-low latency (5 ms minimum algorithmic delay)
  • Adaptive bitrate and bandwidth; dynamically adjusts to content
  • Native in all modern web browsers via WebRTC
  • VBR, CBR, and constrained VBR modes supported
  • Frame sizes from 2.5 ms to 60 ms for different latency requirements

Cons

  • Limited support on older hardware players (car stereos, standalone MP3 players)
  • Not natively supported by Apple Music/iTunes as a distribution format
  • Relatively new; smaller existing library of Opus-encoded content
  • Ogg Opus files not widely supported by older media management software
  • No true lossless mode (use FLAC for lossless)
  • Maximum sample rate is 48 kHz (not suitable for hi-res audio above 48 kHz)
  • Some metadata/tagging tools lack full Opus support

Compatibility

PlatformSupport
WindowsWindows 10+ (limited native); VLC, foobar2000
macOSVia VLC/third-party; no native Finder preview
LinuxNative (GStreamer, FFmpeg, PipeWire)
iOSSafari 11+; VLC app
AndroidNative since Android 5.0
Web BrowsersAll modern browsers (Chrome, Firefox, Edge, Safari 11+)
WebRTCMandatory codec; universal support
HardwareGrowing support in modern receivers and DAPs

Related Formats

  • OGG Vorbis — Predecessor from Xiph.Org; Opus is better at all bitrates
  • AAC — Widely deployed competitor; Opus outperforms it per-bit
  • MP3 — Legacy format; significantly inferior to Opus
  • Speex — Xiph.Org's earlier speech codec, now deprecated in favor of Opus
  • AMR — Mobile telephony codec; Opus offers better quality
  • FLAC — Lossless complement to Opus for archival

Practical Usage

  • Use 128 kbps stereo as the default for music encoding -- it produces near-transparent quality for the vast majority of listeners at a fraction of the file size of MP3 at 320 kbps.
  • For voice-only content (podcasts, audiobooks, VoIP), use 24-48 kbps mono -- Opus excels at low-bitrate speech thanks to its SILK mode.
  • Always encode from a lossless source (WAV, FLAC) to avoid compounding generational quality loss from lossy-to-lossy transcoding.
  • Use the Ogg container (.opus extension) for file storage and distribution; use raw RTP packets for real-time communication (WebRTC handles this automatically).
  • Prefer opusenc (the reference encoder) for highest quality output; FFmpeg's libopus is also excellent and integrates into media processing pipelines.
  • For WebRTC applications, Opus is mandatory and handled by the browser -- no manual codec selection is needed.

Anti-Patterns

  • Using MP3 or AAC when Opus is supported by all target platforms -- Opus outperforms both at every bitrate; choose legacy codecs only when device compatibility forces it.
  • Setting bitrates above 192 kbps for music -- Opus reaches transparency well below 192 kbps for nearly all material; higher bitrates waste space with no perceptible quality improvement.
  • Transcoding from MP3 to Opus expecting quality improvement -- Converting between lossy formats cannot recover lost data; always encode from a lossless master.
  • Ignoring frame size configuration for latency-sensitive applications -- The default 20 ms frame size is good for most uses, but real-time communication benefits from 10 ms or lower for reduced latency.
  • Expecting Opus files to play on older hardware players -- Most standalone MP3 players, car stereos, and older devices lack Opus support; verify target device compatibility before distributing.

Install this skill directly: skilldb add file-formats-skills

Get CLI access →