File types · Explainer

The Opus file (.opus)

An Opus file is sound compressed with Opus, the open codec behind WebRTC calls and many voice messages, stored in an Ogg container. This guide explains what's inside one, how Opus handles both speech and music, why it always plays at 48 kHz, where it works, and how to open and convert it.

At a glance

Full name
Opus audio in an Ogg container (Ogg Opus)
Extensions
.opus. The Opus codec also turns up in .ogg, .webm, .weba, .mp4 and Apple's .caf files
MIME type
audio/ogg, optionally audio/ogg; codecs=opus. audio/opus is also registered, for Opus sent over RTP
Kind
Binary, lossy compressed audio in the Ogg container
Standard
IETF: RFC 6716 (the codec, 2012, updated by RFC 8251) and RFC 7845 (Opus in Ogg, 2016). Reference library: libopus
First released
libopus 1.0 and RFC 6716 in September 2012; Ogg encapsulation standardised in April 2016
Bit rates
6 to 510 kbps. About 16 to 20 kbps for wideband speech, 64 to 128 kbps for stereo music
Sample rate
Decoded at 48 kHz; audio bandwidth from 4 kHz (narrowband) to 20 kHz (fullband)
Opens with
Chrome, Edge, Firefox; Safari 18.4 and later; VLC, foobar2000, Audacity, Android
Magic number
4F 67 67 53 (OggS) at byte 0, then OpusHead at byte 28

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 .webm or .weba file, an .mp4, or an .ogg file. Only .opus promises 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 (hex, page by page)
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. 14F 67 67 53 00 02

    An Ogg page header

    OggS, the Ogg version (0) and the flags: 02 marks 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. 24F 70 75 73 48 65 61 64

    OpusHead

    The identification header, alone on the first page as RFC 7845 requires. Any file whose first packet starts with OpusHead is Ogg Opus, whatever its extension.

  3. 301 · 01

    Version and channels

    Version 1 and one output channel. Stereo files have 02 here.

  4. 438 01

    Pre-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. 580 BB 00 00

    Input 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. 600 00 · 00

    Output 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. 74F 70 75 73 54 61 67 73

    OpusTags

    The comment header, in the same format as Vorbis comments: a vendor string naming the library, then NAME=value pairs in UTF-8. Here FFmpeg added an encoder tag, and we added a title.

  8. 8F8 13 00 00 00 00 00 00

    The 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. 978

    The TOC byte

    Every Opus packet starts with a table-of-contents byte. 78 is binary 01111 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:

Opus modes, from RFC 6716
ModeAudio bandwidthsFrame sizesUsed for
SILK onlyNarrowband (4 kHz), medium-band (6 kHz), wideband (8 kHz)10, 20, 40, 60 msSpeech at low bit rates
HybridSuper-wideband (12 kHz), fullband (20 kHz)10, 20 msSpeech at medium bit rates: SILK codes up to 8 kHz, CELT everything above
CELT onlyNarrowband, wideband, super-wideband, fullband2.5, 5, 10, 20 msMusic, 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:

ContentChannelsBit rate
Narrowband speech (telephone quality)MonoAbout 12 kbps
Wideband speechMono16 to 20 kbps
Fullband speechMono28 to 40 kbps
MusicMono32 to 64 kbps
MusicStereo64 to 128 kbps
Music for storageStereo96 to 128 kbps
5.1 surround6128 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 44100 in 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 optional R128_TRACK_GAIN and R128_ALBUM_GAIN tags, 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 .ogg files 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

PlatformOgg Opus (.opus)Notes
Chrome, Edge, FirefoxYesOpus 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.
AndroidYesPlays Opus in Ogg natively.
Windows and macOS appsVariesVLC, 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:

VersionReleasedNotable changes
1.0September 2012The first stable release, alongside RFC 6716.
1.5March 2024The 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.6December 2025A 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.1January 2026Bug 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 Infinity from a server without range requests.
  • A .ogg file that won't play in a Vorbis-only player: it may contain Opus. Check with ffprobe and 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 .ogg extension. 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.opus shows the codec, channels and tags; opusinfo from opus-tools gives more detail about the stream.
  • Edit tags: Mp3tag, Kid3, foobar2000 and MusicBrainz Picard read and write OpusTags.
terminal
# 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.opus

Converting 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

Last reviewed 27 October 2026.