The basics
What is an Opus file?
Opus is a lossy audio codec, standardised by the IETF in 2012 as RFC 6716. It was designed to work for everything from a phone call at a few kilobits per second to high-quality stereo music, with very low delay, and to be free to use. It's one of the two mandatory audio codecs of WebRTC, the technology behind video calls in the browser, and it's what many voice and chat apps send over the network.
An .opus file is Opus audio saved in an Ogg container, the same container as Ogg Vorbis files, following RFC 7845. In practice you meet them as voice messages, podcast and audiobook downloads, recordings from browser-based tools, and audio ripped from web videos.
A few things worth knowing up front:
- Opus is the codec, Ogg the container. The same Opus sound can sit in a
.webmor .weba file, an.mp4, or an.oggfile. Only.opuspromises Ogg with Opus inside and nothing else. - It's lossy. Like MP3 or AAC, it throws away detail you're unlikely to hear. At about 128 kbps, stereo music is close to indistinguishable from the original for most listeners.
- It's always 48 kHz. Whatever the original sample rate, an Opus file plays back at 48,000 samples per second. More on that below.
Anatomy
What's inside an Opus file
An .opus file is an Ogg stream: pages that start with OggS, carrying Opus packets. The first packet, OpusHead, describes the stream; the second, OpusTags, holds the tags; everything after that is audio. Below is the whole of a 681-byte file we made for this page with FFmpeg and libopus: 0.1 seconds of a 440 Hz tone, mono, at 32 kbps. It isn't offered for download. Multi-byte numbers are little-endian, so 38 01 means 0x0138, which is 312.
tiny.opus: 0.1 s of a 440 Hz tone, mono, 32 kbps, 681 bytes
offset bytes part
page 0: BOS, granule position 0
0 4F 67 67 53 00 02 "OggS", version 0, BOS flag
6 00 00 00 00 00 00 00 00 granule position 0
14 63 3B 1A F9 · 00 00 00 00 serial number · page 0
22 A8 C8 EB CE · 01 13 CRC-32 · 1 segment, 19 bytes
28 4F 70 75 73 48 65 61 64 "OpusHead"
36 01 version 1
37 01 1 channel
38 38 01 pre-skip: 312 samples
40 80 BB 00 00 input sample rate: 48,000
44 00 00 output gain: 0 dB
46 00 channel mapping family 0
page 1: granule position 0
47 4F 67 67 53 00 00 … 01 54 page header, 1 segment, 84 bytes
75 4F 70 75 73 54 61 67 73 "OpusTags"
83 0D 00 00 00 Lavf60.16.100 vendor string, 13 bytes
100 02 00 00 00 2 comments
104 1D 00 00 00 encoder=Lavc60.31.102 libopus
137 12 00 00 00 title=Tiny example
page 2: EOS, granule position 5,112
159 4F 67 67 53 00 04 F8 13 00 00 00 00 00 00 EOS flag, granule 5,112
185 06 · 73 49 4D 4F 51 40 6 packets: 115, 73, 77, 79, 81, 64 bytes
192 78 81 7B C6 11 76 … packet 1, TOC byte 78
307 78 … packets 2 to 6, same TOC byte
681 end of file- 1
4F 67 67 53 00 02An Ogg page header
OggS, the Ogg version (0) and the flags:02marks the first page of the stream. Every page starts this way, with a granule position, a serial number, a page counter and a checksum. The Ogg explainer covers page headers in detail. - 2
4F 70 75 73 48 65 61 64OpusHead
The identification header, alone on the first page as RFC 7845 requires. Any file whose first packet starts with
OpusHeadis Ogg Opus, whatever its extension. - 3
01 · 01Version and channels
Version 1 and one output channel. Stereo files have
02here. - 4
38 01Pre-skip
312 samples (6.5 ms) that the decoder must throw away at the start. They're the encoder's warm-up, not part of the sound.
- 5
80 BB 00 00Input sample rate
48,000: the sample rate of the audio before encoding, kept only as information. It doesn't change how the file is played. In our test, FFmpeg wrote 48,000 here even for a 44.1 kHz source, because it resamples before encoding; other encoders may store the original rate.
- 6
00 00 · 00Output gain and channel mapping
A volume adjustment in 1/256 dB steps that players apply when decoding, here 0. Mapping family 0 means mono or stereo; family 1 is for surround layouts of up to 8 channels and adds a channel table.
- 7
4F 70 75 73 54 61 67 73OpusTags
The comment header, in the same format as Vorbis comments: a vendor string naming the library, then
NAME=valuepairs in UTF-8. Here FFmpeg added anencodertag, and we added atitle. - 8
F8 13 00 00 00 00 00 00The last granule position
5,112, counted in 48 kHz samples. Subtract the 312-sample pre-skip and you get 4,800 samples: exactly 0.1 seconds. The six packets decode to 5,760 samples, so the player also trims 648 samples of padding at the end.
- 9
78The TOC byte
Every Opus packet starts with a table-of-contents byte.
78is binary01111 0 00: configuration 15 (hybrid mode, fullband, 20 ms), mono, one frame in the packet. The rest of each packet is compressed sound, 64 to 115 bytes for 20 ms.
Under the hood
How Opus works: SILK, CELT and hybrid mode
Opus combines two codecs that were developed separately. SILK, from Skype, models the voice the way speech codecs do, with linear prediction. CELT, from Xiph.Org, transforms short blocks of sound into frequencies (an MDCT, as in AAC and Vorbis) and suits music and anything that isn't speech. The encoder picks one, or both at once, for every packet:
| Mode | Audio bandwidths | Frame sizes | Used for |
|---|---|---|---|
| SILK only | Narrowband (4 kHz), medium-band (6 kHz), wideband (8 kHz) | 10, 20, 40, 60 ms | Speech at low bit rates |
| Hybrid | Super-wideband (12 kHz), fullband (20 kHz) | 10, 20 ms | Speech at medium bit rates: SILK codes up to 8 kHz, CELT everything above |
| CELT only | Narrowband, wideband, super-wideband, fullband | 2.5, 5, 10, 20 ms | Music, and the lowest delay |
The first byte of every packet, the TOC byte, names one of 32 configurations (mode, bandwidth and frame size), says whether the packet is mono or stereo, and how many frames it holds. A packet can carry up to 120 ms of sound. Because the mode can change from one packet to the next, a single file can switch between speech and music coding as the content changes, which is why one codec can replace several.
Opus uses 20 ms frames by default, a compromise between delay and quality. Calls can use shorter frames for less delay; recordings sometimes use longer packets. In our test, Chrome's MediaRecorder packed three 20 ms frames into each 60 ms packet.
Quality
Bit rates: from voice to music
Opus covers 6 to 510 kbps. Unlike MP3, it gives usable results at very low rates, because the encoder narrows the audio bandwidth and switches to speech coding as the budget shrinks. Xiph.Org's recommended settings:
| Content | Channels | Bit rate |
|---|---|---|
| Narrowband speech (telephone quality) | Mono | About 12 kbps |
| Wideband speech | Mono | 16 to 20 kbps |
| Fullband speech | Mono | 28 to 40 kbps |
| Music | Mono | 32 to 64 kbps |
| Music | Stereo | 64 to 128 kbps |
| Music for storage | Stereo | 96 to 128 kbps |
| 5.1 surround | 6 | 128 to 256 kbps |
Xiph.Org describes 128 kbps VBR stereo as "pretty much transparent". Opus encodes with a variable bit rate by default, so the figure is an average target: in our tiny example the first packet is the largest, as the encoder spends bits on the start of the tone. The opusenc command-line tool defaults to 64 kbps per mono stream and 96 kbps per stereo pair.
Sample rate
Why an Opus file always plays at 48 kHz
Opus doesn't store a sample rate the way WAV or MP3 do. Internally it works at 8, 12, 16, 24 or 48 kHz depending on the bandwidth, and RFC 7845 tells players to decode at 48 kHz whenever the hardware allows. Granule positions, which mark time in the Ogg pages, always count 48 kHz samples. The input sample rate in OpusHead is only a note of where the audio came from.
- A 44.1 kHz song comes back at 48 kHz. 44.1 kHz isn't one of Opus's internal rates, so encoders resample it, usually to 48 kHz. That's not a loss: Opus's fullband mode stops at 20 kHz anyway. If you need 44.1 kHz again, resample after decoding (
-ar 44100in FFmpeg). - Pre-skip and end trimming make lengths exact. The decoder drops the pre-skip samples at the start and uses the last page's granule position to cut the padding at the end, so a 10-second recording decodes to exactly 10 seconds. Tools that ignore this add a few milliseconds of silence, which matters for gapless albums and loops.
- Output gain is applied for you. The gain field in
OpusHead, and optionalR128_TRACK_GAINandR128_ALBUM_GAINtags, adjust loudness during decoding. RFC 7845 prefers these to older ReplayGain tags.
In the wild
Where Opus is used
- WebRTC: RFC 7874 makes Opus mandatory for every WebRTC endpoint, alongside G.711. Browser-based calls and meeting tools use it.
- Discord: its voice documentation requires voice data to be Opus, stereo, at 48 kHz.
- WhatsApp voice messages: Meta's WhatsApp Business Platform documentation says voice messages must be
.oggfiles encoded with Opus: Ogg Opus with a different extension. - Browser recordings: Chrome records audio with the MediaRecorder API as Opus in WebM, often saved as
.weba, and Firefox can also record Ogg Opus. - Files and streams: podcasts, audiobooks and internet radio, where Opus gives good quality at small sizes.
Compatibility
Browser and device support
| Platform | Ogg Opus (.opus) | Notes |
|---|---|---|
| Chrome, Edge, Firefox | Yes | Opus since Chrome 33, Firefox 15 and Edge 14, on desktop and Android. |
| Safari (macOS, iOS, iPadOS) | From Safari 18.4 (2025) | Safari 11 (2017) played Opus only in Apple's CAF container; Safari 15 (2021) added Opus in WebM; Safari 18.4 (macOS 15.4, iOS 18.4) added Ogg Opus and Ogg Vorbis. |
| Android | Yes | Plays Opus in Ogg natively. |
| Windows and macOS apps | Varies | VLC, foobar2000 and mpv play every Opus file. Media players built on the system's codecs may not. |
On a web page, ask the browser before relying on it: audio.canPlayType('audio/ogg; codecs=opus') returns "probably" where Ogg Opus is supported and an empty string where it isn't. For older Safari versions, offer an AAC or MP3 fallback in a second <source> element.
Versions
libopus versions and the machine-learning features
New libopus releases stay compatible with RFC 6716, so an Opus file made today plays in a decoder from 2012. Improvements come from the encoder and from optional extras in the reference library:
| Version | Released | Notable changes |
|---|---|---|
| 1.0 | September 2012 | The first stable release, alongside RFC 6716. |
| 1.5 | March 2024 | The first release to make extensive use of machine learning: Deep PLC (a neural network fills in lost packets), DRED (deep redundancy: each packet can carry up to a second of backup speech for lossy networks) and LACE / NoLACE (neural filters that improve low-bit-rate speech). All off by default; each needs a build option and a run-time setting. |
| 1.6 | December 2025 | A neural bandwidth extension that recreates 8 to 20 kHz detail for wideband speech, an improved DRED (not compatible with 1.5's), a 24-bit API, and experimental Opus HD: 96 kHz audio and up to 2 Mbps as an extension layer that ordinary decoders skip. |
| 1.6.1 | January 2026 | Bug fixes. |
These features matter mostly for calls over bad networks. The ML features stay compatible with RFC 6716: a file or stream made with them still plays in an older decoder, which just doesn't use the extra data. DRED and the HD extension are still being standardised, so their formats may change.
Troubleshooting
Common Opus problems and their causes
- Won't play on an iPhone, iPad or Mac: Safari before 18.4 (macOS 15.4, iOS 18.4) doesn't play Ogg Opus, and many other apps on Apple devices still don't. Update, use VLC, or convert to M4A (AAC).
- The file says 48 kHz but the original was 44.1 kHz: that's how Opus works. Resample after decoding if your workflow needs 44.1 kHz.
- No duration in the browser, or a duration of Infinity: like any Ogg file, the length comes from the last page. If the server doesn't support range requests, the browser can't read the end without downloading everything. In our test, Chrome showed
Infinityfrom a server without range requests. - A
.oggfile that won't play in a Vorbis-only player: it may contain Opus. Check withffprobeand rename it to.opus. - Slight silence at the start or end after converting: the tool ignored the pre-skip or end trimming. FFmpeg handles both: our 0.1-second example decodes to exactly 4,800 samples.
- A WhatsApp voice note won't open on a computer: it's Ogg Opus with a
.oggextension. VLC plays it; to share it widely, convert it to MP3 or M4A.
How to
How to open, edit and convert an Opus file
- Play it: drag it into Chrome, Edge, Firefox or Safari 18.4 and later, or use VLC, foobar2000 or mpv. Android plays it natively.
- Edit it: Audacity imports and exports Opus. Every export re-encodes, so keep a lossless master (WAV or FLAC) and export once at the end.
- Inspect it:
ffprobe file.opusshows the codec, channels and tags;opusinfofrom opus-tools gives more detail about the stream. - Edit tags: Mp3tag, Kid3, foobar2000 and MusicBrainz Picard read and write
OpusTags.
# WAV or FLAC to Opus, 96 kbps
ffmpeg -i in.wav -c:a libopus -b:a 96k out.opus
opusenc --bitrate 96 in.wav out.opus
# speech at a low bit rate
ffmpeg -i talk.wav -c:a libopus -b:a 24k -application voip talk.opus
# Opus to MP3 or M4A (AAC)
ffmpeg -i in.opus -c:a libmp3lame -q:a 2 out.mp3
ffmpeg -i in.opus -c:a aac -b:a 160k out.m4a
# Opus in WebM to .opus, without re-encoding
ffmpeg -i in.webm -vn -c:a copy out.opusConverting Opus to MP3 or AAC is lossy to lossy, so use a generous bit rate. Converting it to WAV or FLAC makes a bigger file but can't bring back what the Opus encoder removed.
Is an Opus file safe?
It's audio and can't run code. As with any compressed format, a deliberately malformed file could trigger a bug in a decoder, so keep browsers and players updated. Tags can hold any text, including names or software details; check them before publishing a recording.
Sample files
There are no sample Opus files on this page. To make one, run ffmpeg -f lavfi -i "sine=frequency=440:duration=10" -c:a libopus -b:a 64k test.opus, or opusenc in.wav test.opus from opus-tools.
Put it online
Have an Opus file? Give it a link.
Drop an .opus file on 99helpers and it gets its own address that plays in the browser: in Chrome, Edge and Firefox, and in Safari from version 18.4. Handy for sharing a voice note, a recording or a podcast episode without an attachment.
Questions
Opus files, frequently asked
What is an .opus file?
An audio file compressed with the Opus codec and stored in an Ogg container. Opus is an open, lossy codec standardised by the IETF, used for voice calls, voice messages and streaming.
How do I open an Opus file?
Drag it into Chrome, Edge, Firefox or a recent Safari (18.4 or later), or use VLC on any computer. Android phones play it natively; on older iPhones, use VLC or convert it.
Is Opus better than MP3?
At the same bit rate, Opus generally sounds better, especially below about 96 kbps and for speech. MP3 still plays on more old devices and software.
Is Opus lossless?
No. Opus is lossy. For lossless audio, use FLAC or WAV.
What's the difference between .opus and .ogg?
Both are Ogg files. .opus means the audio inside is Opus; .ogg traditionally means Vorbis, an older codec, though some programs save Opus as .ogg too.
Why does my Opus file say 48 kHz?
Opus always decodes at 48 kHz, whatever the original sample rate. The original rate is stored only as information in the file's header.
How do I convert Opus to MP3?
Use Audacity, VLC's Convert option or FFmpeg: ffmpeg -i in.opus -c:a libmp3lame -q:a 2 out.mp3.
What bit rate should I use for Opus?
About 16 to 24 kbps for speech, 64 to 128 kbps for stereo music. Around 128 kbps, music is close to transparent for most listeners.
Related formats
Other file types explained
Keep going
Related
Sources
- RFC 6716: Definition of the Opus Audio Codec
- RFC 7845: Ogg Encapsulation for the Opus Audio Codec
- RFC 7874: WebRTC Audio Codec and Processing Requirements
- Opus: news and release history (1.5, 1.6)
- Xiph.Org: Opus recommended settings
- MDN: Web audio codec guide (Opus)
Last reviewed 27 October 2026.