.OPUS Opus Audio
.opus

Opus Audio

Convert Opus audio to MP3, WAV, or OGG directly in your browser — no upload, no server, no data leaves your device. FileDex uses FFmpeg WebAssembly to decode the Opus bitstream from its Ogg container and re-encode to your target format locally.

Learn more ↓
Audio structure
Header format info
Meta tags · codec
Samples audio data
Open CodecIETF RFC 6716SILK + CELTWebRTC2012
By FileDex

Your files never leave your device

Common questions

Why is Opus considered the best audio codec?

Opus achieves transparent music quality at 96-128 kbps — roughly half the bitrate MP3 needs for equivalent results. It handles both speech (via SILK mode) and music (via CELT mode) in a single codec, switching seamlessly per-frame. No other codec covers the 6-510 kbps range with comparable quality.

Can I play Opus files on my iPhone?

Yes, since iOS 15. Apple added native Opus decoding in both Safari and the system media framework. Devices running iOS 14 or earlier require a third-party app like VLC. WebRTC-based apps (Discord, WhatsApp) have supported Opus on iOS independently since iOS 11.

What is the difference between .opus and .ogg files?

Both use the Ogg bitstream container. Files ending in .opus contain Opus-encoded audio, while .ogg typically contains Vorbis-encoded audio. The file extension signals which codec is inside, but the container format is identical.

Does FileDex upload my Opus file to a server?

No. FileDex converts Opus files entirely in your browser using FFmpeg compiled to WebAssembly. Audio data never leaves your device — all decoding and encoding runs locally in a sandboxed Web Worker.

Why are Discord voice recordings in Opus format?

Discord uses Opus because it is the mandatory codec for WebRTC and delivers intelligible voice quality at bitrates as low as 16 kbps. This allows Discord to maintain voice quality even on poor network connections while using minimal bandwidth per user.

What makes .OPUS special

Low-latency audio transmission demands a codec that can adapt on the fly, and Opus delivers exactly that. Standardized as RFC 6716 in 2012 by the IETF, Opus is an open, royalty-free codec designed for interactive speech and music over the internet. It operates across bitrates from 6 kbit/s to 510 kbit/s and supports sampling rates from 8 kHz narrowband to 48 kHz full band.

Continue reading — full technical deep dive

Opus seamlessly switches between two internal codecs in real-time: SILK (speech-optimized, derived from Skype's proprietary codec) below 8 kHz and CELT (Constrained Energy Lapped Transform, music-optimized) for full-band content. Mode changes happen every 2.5 ms frame without audible artifacts — a hybrid approach unique among audio codecs. The encoder decides which mode to engage based on signal characteristics, and the decoder handles transitions transparently.

Frame structure and latency

Opus supports frame sizes of 2.5, 5, 10, 20, 40, or 60 ms. The default 20 ms frame balances latency and compression efficiency. At 20 ms frames, algorithmic latency sits at 26.5 ms — roughly half what AAC-LC introduces. For real-time communication, 10 ms frames push total glass-to-glass latency under 50 ms on local networks.

The codec uses a range coder for entropy coding rather than Huffman tables. This gives finer granularity in bit allocation across frequency bands. Each frame is self-contained — the decoder can start from any frame boundary without needing prior state, which makes Opus resilient to dropped packets in RTP streams.

Bitrate performance

Use case Recommended bitrate Quality
VoIP speech 16–24 kbit/s Transparent speech
Wideband speech 24–32 kbit/s Exceeds AMR-WB
Music mono 64 kbit/s Near-transparent
Music stereo 96–128 kbit/s Transparent
Archival stereo 160–256 kbit/s Indistinguishable from source

At 64 kbit/s mono, Opus matches or beats AAC-LC at the same bitrate in MUSHRA listening tests conducted by the codec's working group. At 96 kbit/s stereo, most listeners cannot distinguish Opus from the uncompressed original. Opus also supports constant bitrate (CBR), variable bitrate (VBR), and constrained VBR modes — VBR is the default and recommended setting for nearly all use cases.

Container and streaming

Opus frames are carried in Ogg containers for files (.opus extension) or in WebM/Matroska for video muxing. WebRTC mandates Opus support in all compliant browsers — Chrome, Firefox, Safari, and Edge all decode it natively. Discord, Zoom, and Google Meet use Opus as their primary voice codec. Spotify uses Opus for its web player streams at 128 kbit/s (free tier) and 256 kbit/s (premium).

The codec includes built-in forward error correction (FEC). When packet loss is detected, the encoder embeds a low-bitrate copy of the previous frame inside the current packet. At 20% packet loss, FEC recovery keeps speech intelligible without retransmission. Discontinuous Transmission (DTX) is another built-in feature — during silence, the encoder sends tiny comfort-noise frames at roughly 1 kbit/s, saving substantial bandwidth in voice calls where only one person speaks at a time.

When to choose Opus

Use Opus for any streaming, VoIP, or web-based audio workflow. It outperforms Vorbis, MP3, and AAC at equivalent bitrates, especially below 96 kbit/s. The main limitation is ecosystem support in legacy hardware: older car stereos, standalone MP3 players, and some smart speakers still lack Opus decoding. For those targets, AAC or MP3 remains the safer choice. Apple devices gained native Opus playback only in iOS 17 and macOS Sonoma.

FileDex converts to and from Opus entirely in the browser — no upload required.

.OPUS compared to alternatives

.OPUS compared to alternative formats
Formats Criteria Winner
.OPUS vs .MP3
Audio quality at 64 kbps
Opus achieves listenable music quality at 64 kbps where MP3 produces severe artifacts. Opus's CELT mode uses wider transform windows and superior psychoacoustic modeling at low bitrates.
OPUS wins
.OPUS vs .AAC
Compression efficiency at 96 kbps
Opus at 96 kbps is widely considered transparent for music — indistinguishable from the original in listening tests. AAC requires approximately 128-160 kbps to achieve equivalent perceived quality.
OPUS wins
.OPUS vs .OGG VORBIS
Voice content at 32 kbps
Opus's SILK mode is purpose-built for speech at ultra-low bitrates. Vorbis was designed for music and degrades rapidly below 64 kbps on voice content.
OPUS wins
.OPUS vs .MP3
Hardware device support
MP3 plays on every audio device manufactured since 1998. Opus support is limited to software players, WebRTC-capable browsers, and modern streaming platforms.
MP3 wins

Technical reference

MIME Type
audio/opus
Magic Bytes
4F 67 67 53 OggS container. Opus header identified within Ogg stream.
Developer
Xiph.Org / IETF
Year Introduced
2012
Open Standard
Yes — View specification
000000004F676753 OggS

OggS container. Opus header identified within Ogg stream.

Binary Structure

Opus audio is carried within an Ogg container. Each Ogg page starts with the 'OggS' capture pattern (4F 67 67 53) followed by a 27-byte page header. The first audio page contains the OpusHead identification header: the magic string 'OpusHead' (4F 70 75 73 48 65 61 64), a version byte (0x01), channel count, pre-skip sample count (16-bit LE), input sample rate (32-bit LE — informational only, Opus always decodes at 48 kHz internally), output gain (16-bit LE), and channel mapping family. The second page contains the OpusTags comment header with the magic string 'OpusTags' followed by a vendor string and Vorbis-style key=value metadata pairs. Subsequent pages carry Opus audio packets. Each Opus frame encodes 2.5 to 60 ms of audio. The codec operates in three modes: SILK (speech, 8-16 kHz bandwidth), CELT (music, full bandwidth), or hybrid (SILK + CELT for transition content). Mode selection happens per-frame, allowing seamless switching between voice and music within a single stream.

OffsetLengthFieldExampleDescription
0x00 4 bytes Ogg Capture Pattern 4F 67 67 53 (OggS) Sync pattern identifying the start of an Ogg page. All Opus-in-Ogg files begin with this.
0x1C 8 bytes OpusHead Magic 4F 70 75 73 48 65 61 64 (OpusHead) Magic string in the first Ogg page payload identifying this stream as Opus audio.
0x24 1 byte Version 01 OpusHead version. Must be 0x01 for current Opus specification. Decoders reject other values.
0x25 1 byte Channel Count 02 Number of output channels. 1 = mono, 2 = stereo. Opus supports up to 255 channels.
0x26 2 bytes Pre-skip 38 01 Number of samples (at 48 kHz) to discard from decoder output at the start. Accounts for encoder delay. Little-endian.
0x28 4 bytes Input Sample Rate 80 BB 00 00 (48000) Original input sample rate in Hz (little-endian). Informational only — Opus always operates at 48 kHz internally.
0x2C 2 bytes Output Gain 00 00 Gain to apply to decoder output in Q7.8 fixed-point dB. Used for ReplayGain-style normalization.
2007Skype develops SILK codec for low-latency voice; Xiph.Org develops CELT for low-delay music2010IETF codec working group formed to create a single codec merging SILK and CELT approaches2012Opus standardized as IETF RFC 6716 — the first codec designed for both speech and music in a single bitstream2013WebRTC mandates Opus as its required audio codec; Chrome and Firefox implement native Opus support2014Opus achieves transparent quality at 128 kbps in multiple listening tests, outperforming AAC, Vorbis, and MP32017WhatsApp, Signal, and Discord adopt Opus for all voice and video calls2020Opus becomes the default audio codec in YouTube for adaptive bitrate audio streaming
Convert Opus to MP3 (high-quality VBR) ffmpeg
ffmpeg -i input.opus -c:a libmp3lame -q:a 2 output.mp3

-c:a libmp3lame selects the LAME MP3 encoder. -q:a 2 targets approximately 190 kbps VBR output. Suitable for converting Discord or WebRTC recordings to a universally compatible format.

Convert Opus to WAV (48 kHz PCM) ffmpeg
ffmpeg -i input.opus -c:a pcm_s16le -ar 48000 output.wav

-ar 48000 preserves Opus's native 48 kHz sample rate. Opus always operates at 48 kHz internally regardless of the original input sample rate stored in OpusHead.

Inspect Opus stream details ffprobe
ffprobe -v error -show_entries format=format_name,duration,bit_rate -show_entries stream=codec_name,sample_rate,channels -of json input.opus

Displays container format, duration, bitrate, and stream-level codec details in JSON. Opus will always report 48000 Hz as the decoder output sample rate.

Re-encode Opus at lower bitrate ffmpeg
ffmpeg -i input.opus -c:a libopus -b:a 64k output.opus

-c:a libopus -b:a 64k re-encodes the audio at 64 kbps. Opus maintains intelligible speech quality down to 6 kbps and usable music quality at 64 kbps.

OPUS MP3 transcode MP3 provides universal playback on all devices including legacy hardware and car stereos that lack Opus support.
OPUS WAV transcode WAV provides lossless uncompressed audio for editing in DAWs and audio production tools.
OPUS FLAC transcode FLAC provides lossless compression — smaller than WAV while preserving full quality for archival.
LOW

Attack Vectors

  • Crafted OpusHead header with invalid channel mapping family can trigger undefined behavior in decoders that do not validate mapping table bounds
  • Malformed Ogg page segment tables can cause buffer over-reads in parsers that trust declared lacing values without size validation
  • Opus frames with extreme bandwidth or mode flags can trigger edge cases in the SILK/CELT decoder state machine

Mitigation: FileDex processes Opus files entirely in-browser using FFmpeg WebAssembly sandboxed in a Web Worker. No file data leaves the device. FFmpeg's libopus integration handles malformed frames gracefully with error concealment.

libopus library
Reference Opus encoder and decoder library maintained by the Xiph.Org Foundation and IETF
FFmpeg tool
Universal media framework with libopus encoding and native Opus decoding in Ogg and WebM
opusenc / opusdec tool
Command-line Opus encoder and decoder from the opus-tools package by Xiph.Org
VLC Media Player tool
Cross-platform media player with native Opus playback in Ogg and WebM containers
WebRTC spec
W3C/IETF standard for real-time browser communication — mandates Opus as the required audio codec
Discord service
Voice and video platform using Opus at 64-128 kbps for all voice channel audio transmission