AudioUtils

WAV to Opus: The Web Developer's Audio Guide

Convert WAV to Opus for web delivery. Learn bitrate recommendations, browser compatibility, and how Opus compares to MP3 for web audio.

WAV is the format you record and edit in. Opus is the format you ship. Converting WAV to Opus before deploying audio to a website, web game, or PWA is one of the highest-leverage format choices you can make — a 60-second stereo WAV that ships at 10 MB lands at under 1 MB as 128 kbps Opus, and most listeners cannot pick the original out of an ABX test.

This guide covers when Opus is the right output, what bitrate to pick, the encoder modes that matter, and the exact ffmpeg invocations for speech, music, and low-latency interactive audio.

Why Opus Over MP3 for Web Delivery

Opus is younger and more efficient. Some specifics:

  • Standardized as RFC 6716 in 2012 by the IETF, royalty-free, no patent encumbrance.
  • Beats MP3 at every bitrate. At 96 kbps Opus produces audibly better quality than 128 kbps MP3. At 64 kbps the gap widens dramatically.
  • Lower latency. Opus encoder/decoder latency is 5-66 ms depending on frame size. MP3 has 100+ ms inherent latency due to its frame structure.
  • Hybrid voice + music codec. Opus combines SILK (speech-tuned) and CELT (music-tuned), automatically transitioning based on content. Single file format covers both use cases.
  • Native browser support in every modern browser (see compatibility section below).
  • VBR by default with intelligent rate control — quiet sections use fewer bits, loud passages use more.

For web audio targeting modern browsers, Opus is a clear win on every metric except legacy compatibility. If you support IE11 or 2016-era Safari, ship MP3 fallbacks.

Browser and Platform Support

Opus playback is well-supported as of 2026:

  • Chrome 33+ (since early 2014). All versions on desktop and Android.
  • Firefox 15+ (since 2012). All versions.
  • Edge since the Chromium switch in 2020. Full support.
  • Safari 17+ on macOS 14+ and iOS 17+ for .opus / .ogg playback. Earlier Safari versions support Opus only inside WebRTC and CAF containers.
  • Android 5.0+ native Opus.
  • iOS 11+ via WebRTC; iOS 17+ for file-based Opus playback in Safari.

In HTML, the standard pattern is Opus inside Ogg as primary, MP3 as fallback:

''

Modern browsers pick the first they support; legacy browsers fall through to MP3.

Bitrate Guidance by Content Type

Opus operates at 6-510 kbps. Practical recommendations:

  • Voice (narration, voice-over, single speaker): 24-32 kbps mono. Indistinguishable from source for speech at conversational volume.
  • Podcast and interview content: 48-64 kbps mono or stereo. Captures room tone and edits cleanly.
  • General music streaming: 96 kbps stereo. Transparent for most listeners on most material.
  • High-fidelity music delivery: 128 kbps stereo. Indistinguishable from lossless in ABX tests for nearly all listeners.
  • Mastering reference / archival lossy: 192-256 kbps stereo. Diminishing returns above this.

These thresholds are aggressive because Opus is genuinely that efficient. If you came from MP3, your instincts are calibrated to a less efficient codec — Opus at 96 kbps is comparable to MP3 at 192-256 kbps.

Application Modes: VOIP vs Audio vs Lowdelay

Opus has three encoder application modes that bias the codec for different use cases:

  • 'voip' — optimizes for voice. Uses SILK for low/mid frequencies, CELT only on transients. Best for telephony, podcast voice tracks, voice notes.
  • 'audio' — default. Balanced for music and mixed content. Uses SILK and CELT together.
  • 'lowdelay' — minimizes algorithmic latency for interactive audio (WebRTC, game voice chat). Disables SILK; uses CELT exclusively.

Pick 'voip' for speech, 'audio' for everything else, 'lowdelay' only if latency below 25 ms is required.

Browser Conversion via AudioUtils

The fastest path is the WAV to Opus tool. It runs in your browser via WebAssembly — files never upload, which matters for unreleased music or NDA-covered content. Step by step:

1. Open /wav-to-opus. 2. Drag in one or more .wav files. 3. Pick output bitrate. Default is 96 kbps; lower for voice, higher for high-fidelity music. 4. Click Convert. Encode runs locally at faster than real-time on modern hardware. 5. Download the .opus file.

For round-tripping back to WAV later (for further editing), use /opus-to-wav.

ffmpeg One-Liners

For scripted or batch workflows:

General music at 128 kbps stereo:

'ffmpeg -i input.wav -c:a libopus -b:a 128k output.opus'

Speech at 32 kbps mono with VOIP optimization:

'ffmpeg -i input.wav -c:a libopus -b:a 32k -ac 1 -application voip output.opus'

Low-latency game audio at 96 kbps:

'ffmpeg -i input.wav -c:a libopus -b:a 96k -application lowdelay output.opus'

Flag breakdown:

  • '-c:a libopus' — use the libopus encoder (the reference Opus implementation).
  • '-b:a' — target bitrate. Opus encodes VBR by default; this sets the average target.
  • '-application' — voip / audio / lowdelay (defaults to audio).
  • '-ac 1' — mono output. Halves the bitrate need for voice content.

For batch encoding a directory:

'for f in *.wav; do ffmpeg -i "$f" -c:a libopus -b:a 96k "${f%.wav}.opus"; done'

VBR Behavior and File Size Predictability

Opus is VBR by default. The bitrate flag sets a target average — actual instantaneous rate fluctuates by passage complexity. To force CBR (rare; useful when streaming over fixed-bandwidth channels):

'ffmpeg -i input.wav -c:a libopus -b:a 96k -vbr off output.opus'

In practice, leave VBR on. The file size variance is small (within ~10% of the target average for typical music), and the quality gain from variable allocation is real.

Game Audio Use Case

For web games and interactive audio, Opus is a near-default choice:

  • Asset loading: A 100 MB WAV asset folder typically lands at 6-12 MB Opus, which transforms initial load times on slow connections.
  • Web Audio API: decodeAudioData accepts Opus in all browsers that support it, with no special setup.
  • Mobile devices: Smaller files mean less data charge for users on cellular.
  • Latency: lowdelay mode keeps interactive audio responsive.

The trade-off: Opus decode is slightly more CPU-expensive than MP3 decode. On low-end Android devices this is detectable but not problematic for typical game audio loads.

For more on web audio strategy, the Opus vs MP3 comparison breaks down the codec choice in detail and What is Opus covers the underlying SILK+CELT design.

Decision Tree

  • Modern browser, file size matters → Opus at 96-128 kbps.
  • Voice-only content → Opus VOIP mode at 32 kbps.
  • Need to support legacy browsers (IE11, Safari < 17) → ship MP3 fallback.
  • Real-time interactive audio → Opus lowdelay at 64-96 kbps.
  • Final delivery is a download (not streamed) → Opus is still right; users get smaller files faster.

For format-level background, the Opus vs AAC comparison covers the modern alternatives, and lossless vs lossy explains why decoding from a WAV master rather than transcoding from MP3 produces materially better results.