Opus Codec Explained: Opus vs AAC and MP3, Playback and Conversion
What Is the Opus Codec? The Short Answer
The Opus codec is an open, royalty-free audio codec designed for both speech and music over the internet. The IETF standardized it as RFC 6716 in September 2012. It merges two older codecs, Skype's SILK for voice and Xiph.Org's CELT for music, and covers everything from 6 kbps phone-quality speech to 510 kbps stereo music.
If you've received a WhatsApp or Telegram voice note, used Discord voice chat, joined a browser video call or watched a WebM video, you've almost certainly heard Opus. It sounds better than MP3 and Vorbis at the same bitrate, it holds its own against AAC, and it does it with very low delay, which is what makes it suited to live calls.
This guide covers how Opus works, which bitrate to use, how it compares with AAC and MP3, the containers it comes in, whether your Mac can play it, and how to convert Opus to MP3 or M4A, or encode your own Opus files. Every command below was run on a Mac with FFmpeg 9 and libopus 1.6.1.
How the Opus Codec Works
Most audio codecs are built for one job. Speech codecs like the ones in mobile phones are efficient at low bitrates but make music sound terrible. Music codecs like MP3 and AAC sound good but add too much delay for a two-way conversation. Opus combines both approaches in one bitstream and switches between them on the fly.
According to the RFC, an Opus encoder runs in one of three modes:
| Mode | Based on | Used for |
|---|---|---|
| SILK-only | Linear prediction (from Skype's SILK) | Low-bitrate speech, up to wideband |
| Hybrid | SILK for low frequencies + CELT for high | Super-wideband or fullband speech at medium bitrates |
| CELT-only | MDCT transform (from Xiph's CELT) | Music and very low-delay audio, any bandwidth |
The encoder can change mode, bitrate, bandwidth and even mono or stereo from one packet to the next without renegotiating a call. That's why a voice call can dip in quality on a bad connection and recover without dropping.
Other key numbers from the specification:
- Bitrates: 6 kbps to 510 kbps.
- Frame sizes: 2.5 ms to 60 ms per frame (20 ms is the default in most encoders), and a packet can combine frames up to 120 ms.
- Algorithmic delay: 5 ms to 65.2 ms depending on settings. AAC-LC and MP3 are typically far higher, which is fine for a song but awkward on a call.
- Bandwidths: narrowband (4 kHz audio bandwidth) up to fullband (20 kHz, sampled at 48 kHz). Opus works internally at 48 kHz, so decoders usually output 48 kHz regardless of what was fed in.
The reference implementation, libopus, is BSD-licensed and maintained by Xiph.Org. Version 1.5 (2024) added optional machine-learning features that help speech survive packet loss, and the current release listed on opus-codec.org is 1.6.1. Newer encoders still produce standard Opus streams that any decoder can play.
Where Opus Is Used
Opus isn't something most people choose deliberately. It shows up because the apps and platforms they use picked it:
- WhatsApp voice notes. Meta's WhatsApp Business Platform documentation requires voice messages to be Ogg files encoded with Opus.
- Telegram voice messages. Telegram's Bot API says a voice message must be "an .OGG file encoded with OPUS" (MP3 and M4A are also accepted).
- Discord voice. Discord's developer documentation specifies stereo, 48 kHz Opus for voice data.
- WebRTC. RFC 7874 makes Opus mandatory to implement for every WebRTC endpoint (alongside G.711), so browser-based calls and meeting tools that run on WebRTC can always fall back to it.
- WebM video. The WebM format allows only Opus or Vorbis audio, and Opus is the usual choice today. YouTube offers Opus audio streams in WebM alongside AAC, which you can see in the format lists of download tools.
If you got an .opus or .ogg file from a chat app, it's almost certainly one of the voice notes above. Our OGG to MP3 guide explains the Ogg container itself in more detail, including how it differs from Ogg Vorbis.
Opus Bitrate Guide: Speech vs Music
Opus is efficient enough that the right bitrate is often much lower than people expect. RFC 7587, which defines how Opus travels over RTP, lists these "sweet spots" for 20 ms frames:
| Content | Bandwidth | Recommended bitrate |
|---|---|---|
| Speech, phone quality | Narrowband | 8–12 kbps |
| Speech, clear | Wideband | 16–20 kbps |
| Speech, full quality | Fullband | 28–40 kbps |
| Music, mono | Fullband | 48–64 kbps |
| Music, stereo | Fullband | 64–128 kbps |
For music you want to keep, Xiph.Org's Opus recommended settings page and the Audacity manual both describe Opus at 128 kbps VBR as "pretty much transparent", meaning most listeners can't tell it from the original. The public evidence backs that up: in Hydrogenaudio's 2014 multiformat listening test at 96 kbps (40 samples, 33 listeners), Opus ranked first, Apple AAC second, and Vorbis tied with a higher-bitrate LAME MP3 for third. The results discussion also noted that none of the codecs was reliably transparent at 96 kbps under critical listening, so 96 kbps is "very good" rather than "identical".
A practical summary:
- Voice notes and podcasts (speech only): 24–32 kbps mono.
- Mixed speech and music, like a video soundtrack: 64–96 kbps stereo.
- Music library: 128 kbps stereo, or 160 kbps if you're cautious.
- Archiving: don't use Opus at all. Keep a lossless copy; see what lossless audio is for the options.
Opus bitrates are averages. With variable bitrate (the default), quiet passages and silence use far fewer bits, so actual files vary. For background on what these kbps numbers mean, see what is audio bitrate.
Opus vs AAC vs MP3 vs Vorbis
| Opus | AAC (AAC-LC) | MP3 | Vorbis | |
|---|---|---|---|---|
| Standardized | 2012 (IETF RFC 6716) | 1997 (MPEG-2), extended in MPEG-4 | 1993 (MPEG-1) | 2002 (Xiph.Org) |
| Licensing | Royalty-free, open source | Patent-licensed (encoder/decoder makers) | Patents expired | Royalty-free |
| Quality at 64–96 kbps | Best of the four | Very good | Weakest | Good |
| Speech at very low bitrates | Excellent (SILK mode) | Poor without HE-AAC | Poor | Poor |
| Delay | 5–65 ms | High (AAC-LD/ELD variants are lower) | High | High |
| Apple apps and devices | Partial (see below) | Full | Full | Partial, recent macOS only |
| Car stereos, TVs, older players | Rare | Common | Universal | Rare |
| Typical containers | Ogg (.opus), WebM, MKV, MP4, CAF | M4A/MP4, ADTS (.aac) | .mp3 | Ogg (.ogg), WebM |
Opus vs AAC
Opus wins on efficiency at low and medium bitrates and on latency, which is why calls and voice notes use it. AAC wins on compatibility: every Apple app, every phone, nearly every car stereo and TV plays it, and it's the default for MP4 video. Above roughly 128–160 kbps both are close enough to transparent that the difference stops mattering. If you're delivering files to people or devices, choose AAC; our AAC codec explainer covers its profiles. If you control the playback (a web app, a WebRTC call, a WebM video), choose Opus.
Opus vs MP3
Opus is the better codec by a wide margin: in the 2014 test, 96 kbps Opus beat MP3 encoded at a higher bitrate. MP3's one advantage is that it plays on everything, which is the main reason to convert Opus to MP3.
Opus vs Vorbis
Both are Xiph.Org formats that live in Ogg and WebM, but Opus is better at low bitrates, far better with speech, and much lower in delay. There's little reason to encode new Vorbis files.
For the bigger picture of lossy codecs versus lossless ones like FLAC and ALAC, see lossy vs lossless compression.
Opus Files and Containers
Opus is a codec, not a file format. The compressed audio has to be wrapped in a container, and which one you get depends on where the file came from:
| Container | Extension | Where you'll see it | Notes |
|---|---|---|---|
| Ogg | .opus (sometimes .ogg) | Voice notes, standalone audio files | Defined by RFC 7845. The standard "Opus file" |
| WebM | .webm | Web video, YouTube, screen recorders | Opus or Vorbis audio only, with VP8/VP9/AV1 video |
| Matroska | .mkv, .mka | Video downloads, rips | Accepts almost any codec |
| MP4 | .mp4 | Less common | Opus in MP4 has a published mapping; FFmpeg writes it |
| CAF | .caf | Apple tools | Apple's Core Audio Format; afconvert writes Opus into it |
We checked what each tool on a current Mac can actually write:
- FFmpeg wrote Opus into
.opus,.webm,.mkvand.mp4without complaint. It refused.m4a("codec not currently supported in container") and couldn't mux Opus into.cafat all. - Apple's
afconvertwrote Opus into CAF and MP4 with-d opus, but failed when asked to write Opus into an Ogg file.
So if you need Opus in CAF, for example for an iOS or macOS app, use Apple's tool:
afconvert -f caff -d opus input.wav output.caf
If you need to know what's inside a file before converting, run:
ffprobe -v error -show_entries stream=codec_name,sample_rate,channels -of default=nw=1 input.opus
A WhatsApp voice note prints something like codec_name=opus, sample_rate=48000, channels=1.
How to Play Opus Files on a Mac
Support has improved a lot. On the current macOS build we tested (macOS 27.2):
afplay voice-note.opusplayed an Ogg Opus file from Terminal.afinforead Ogg Opus, CAF Opus and MP4 Opus files correctly.- AVFoundation, the framework behind QuickTime Player, reported
.opusand.oggvoice notes and Opus in CAF and MP4 as playable. - Opus inside WebM or MKV was not playable through AVFoundation, so QuickTime Player won't open those. Safari plays WebM, and VLC or IINA play everything.
This is recent. Apple quietly added Ogg playback around macOS 15.4; before that, Apple's support for Opus was limited mainly to its own CAF container. If you're on an older Mac, or a .opus file won't open in QuickTime, install VLC or convert the file.
We didn't test importing Opus into the Music app, which is built around MP3, AAC and ALAC. If you want the audio in your library or synced to an iPhone, converting to M4A or MP3 is the safe route.
How to Convert Opus to MP3
FFmpeg is the most reliable free tool. Install it with Homebrew (brew install ffmpeg), then:
ffmpeg -i input.opus -map 0:a:0 -map_metadata 0:s:a:0 -c:a libmp3lame -q:a 2 output.mp3
-c:a libmp3lame -q:a 2produces a variable-bitrate MP3 averaging about 190 kbps, comfortably above what Opus music files usually carry.-map_metadata 0:s:a:0copies the title and artist. Ogg stores tags on the audio stream, and without this option FFmpeg writes an MP3 with no tags. We confirmed this on a tagged test file: tags were missing without the option and present with it.
Voice notes
Speech doesn't need a music bitrate. A 64 kbps mono MP3 is plenty for a voice note:
ffmpeg -i voice-note.opus -c:a libmp3lame -b:a 64k -ac 1 voice-note.mp3
A whole folder
for f in *.opus; do
ffmpeg -n -i "$f" -map 0:a:0 -map_metadata 0:s:a:0 -c:a libmp3lame -q:a 2 "${f%.*}.mp3"
done
-n skips files that already have an MP3, and ${f%.*} keeps the original name. Change *.opus to *.ogg for voice notes saved with that extension.
Converting Opus to MP3 is lossy to lossy: the MP3 can't sound better than the Opus file, and MP3 needs more bits than Opus to stay close to it. Keep the originals if you can. The OGG to MP3 guide also covers VLC and Audacity if you'd rather not use Terminal.
How to Convert Opus to M4A (AAC)
If the file is going into Music or onto an iPhone, AAC in an M4A file is the better target: smaller than MP3 at the same quality and native to Apple's apps. With FFmpeg and Apple's AudioToolbox encoder:
ffmpeg -i input.opus -map 0:a:0 -map_metadata 0:s:a:0 -c:a aac_at -b:a 160k output.m4a
Use -c:a aac if your FFmpeg build doesn't list aac_at. On a current Mac you can also do this without installing anything, because Core Audio can read Opus:
afconvert -f m4af -d aac -b 160000 input.opus output.m4a
afconvert doesn't carry the tags over, so use FFmpeg when titles matter. For going the other way, from M4A to MP3, see M4A to MP3.
How to Encode Audio to Opus with FFmpeg
To make your own Opus files, use FFmpeg's libopus encoder. It's the reference encoder from Xiph and gives better results than FFmpeg's built-in experimental opus encoder.
For music:
ffmpeg -i input.wav -c:a libopus -b:a 128k -vbr on -application audio song.opus
For speech, such as a podcast or recorded call:
ffmpeg -i input.wav -c:a libopus -b:a 32k -ac 1 -vbr on -application voip speech.opus
What the options do:
-b:asets the target bitrate. Use the table above.-vbr onis variable bitrate (the default).constrainedcaps peaks, useful for streaming;offgives constant bitrate.-application audiofavours faithfulness to the input and suits music.voipfavours speech intelligibility.lowdelaydisables the speech modes for the lowest possible latency.-ac 1downmixes to mono, which halves the bitrate needed for speech.
WAV, FLAC and AIFF sources work the same way (our AIFF to MP3 guide explains that format). Encoding from a lossless original always beats encoding from an MP3 or AAC file, since each lossy step stacks its own artifacts.
For more ways to shrink audio files in general, see how to compress audio files.
Opus in Video: WebM and MKV
Opus is the default audio codec in WebM, so converting a video to WebM usually means converting its audio to Opus as well. Our MP4 to WebM guide covers that, and WebM vs MP4 explains when each container makes sense. The video side of a WebM file is typically VP9; see what is the VP9 codec.
To pull the Opus track out of a WebM file without re-encoding, copy the stream into an .opus file:
ffmpeg -i clip.webm -vn -c:a copy clip-audio.opus
To get an MP3 instead, see WebM to MP3.
Where Compresto Fits
Compresto is a native Mac app for compressing videos, images, GIFs and PDFs locally. It doesn't convert audio files, so it won't open .opus, .ogg, MP3 or other audio-only files. For Opus to MP3 or M4A, use FFmpeg or afconvert as shown above.
It works with Opus on the video side:
- WebM output uses VP9 video with Opus audio. If you need a WebM for the web, Compresto produces one with a standard Opus soundtrack.
- MP3 extraction from video. Compresto can pull a video's audio track out as an MP3, which is often what people want when the audio they need is inside a screen recording or downloaded clip. See extract audio from video.
- Messaging apps. WhatsApp and Telegram use Opus for voice but still have size limits for video. Compresto re-encodes with hardware-accelerated H.264 or HEVC and can target a file size; see how to compress a video for WhatsApp.
Frequently Asked Questions
What is the Opus codec?
An open, royalty-free lossy audio codec standardized as IETF RFC 6716 in 2012. It combines Skype's SILK (speech) and Xiph's CELT (music), runs from 6 to 510 kbps, and has very low delay. It's used for voice notes, VoIP, video calls and WebM video.
Is Opus better than AAC?
At low and medium bitrates, generally yes: Opus ranked first and Apple AAC second at 96 kbps in the 2014 Hydrogenaudio listening test, and Opus has much lower delay. AAC is the safer choice for compatibility with Apple apps, car stereos and TVs.
What bitrate should I use for Opus?
RFC 7587 recommends 8–12 kbps for narrowband speech, 16–20 kbps wideband speech, 28–40 kbps fullband speech, 48–64 kbps mono music and 64–128 kbps stereo music. 128 kbps VBR stereo is described by Xiph as pretty much transparent.
Can a Mac play Opus files?
Yes, on current macOS. On the macOS 27 build we tested, afplay played an Ogg Opus file and AVFoundation (used by QuickTime Player) reported .opus, CAF and MP4 Opus files as playable. Opus in WebM or MKV needs VLC, IINA or a browser.
How do I convert Opus to MP3?
Run ffmpeg -i input.opus -map 0:a:0 -map_metadata 0:s:a:0 -c:a libmp3lame -q:a 2 output.mp3. For voice notes, use -b:a 64k -ac 1 for a small mono file.
What is the difference between an .opus and an .ogg file?
Usually just the name. Both are typically Ogg containers; Xiph recommends .opus for Opus audio and .ogg for Vorbis, but chat apps often save Opus voice notes as .ogg. Check with ffprobe.
The Short Version
The Opus codec is the modern, open choice for internet audio: excellent at low bitrates, very low delay, and good enough at 96–128 kbps that most people can't tell it from the original. It's why voice notes are tiny and browser calls sound clear. Its weak spot is compatibility outside browsers and messaging apps, so convert Opus to M4A for Apple devices or MP3 for everything else, and keep the original files when you can.