Back to MIME Types

audio/ogg OGG Common

Identifies Ogg-container audio, most commonly Vorbis or Opus-encoded — an open, royalty-free alternative to MP3.

What it's for

audio/ogg identifies audio in an Ogg container — most commonly holding Vorbis (an older, well-established open codec) or increasingly Opus (a newer, generally superior open codec covering both speech and music well) encoded audio. Ogg was developed specifically as a royalty-free, patent-unencumbered alternative to MP3 at a time when MP3's licensing situation was a real concern for open-source and free-software projects, and while MP3 patents have long since expired, Ogg (and Opus in particular) remain popular in open-source ecosystems and for their genuinely competitive or superior technical qualities.

Format & syntax

Content-Type: audio/ogg

No parameters, though the actual codec inside the Ogg container (Vorbis vs. Opus) matters more for real-world compatibility and quality characteristics than the container type alone — similar to how MP4's container-vs-codec distinction matters for video.

How it's used in practice

  • <audio> element fallback source alongside MP3 — commonly included as an additional <source> in HTML5 audio elements specifically to offer better compression efficiency to browsers that support it, while MP3 covers broader/legacy compatibility.
  • WebRTC and real-time voice communication (Opus specifically) — Opus, commonly delivered in an Ogg container, is the dominant codec for real-time voice/video communication (WebRTC), valued for its low latency and strong performance across both speech and music at low bitrates.
  • Open-source software and Linux ecosystem default — Ogg Vorbis has long been the traditional default audio format across much open-source software and Linux distributions, reflecting the format's royalty-free origins.
  • Podcast and streaming audio in privacy/open-source-focused platforms — some platforms specifically prioritizing open formats over patent-encumbered alternatives (historically MP3, though this is less of a concern today) use Ogg/Opus as their primary or preferred audio format.

Common mistakes & gotchas

  • Assuming Ogg has the same universal device support as MP3 — while browser support for Ogg audio is broad among modern browsers, it doesn't match MP3's near-universal support across every device, media player, and embedded/legacy context, making a fallback source important for genuinely broad compatibility.
  • Confusing Vorbis and Opus as the same thing — both are commonly delivered in Ogg containers, but they're different codecs with different characteristics; Opus is generally the more modern, technically superior choice (especially for speech and low-bitrate scenarios), while Vorbis remains common in older content and tooling.
  • Not recognizing Opus's dominant role in real-time communication separate from general audio delivery — Opus's use in WebRTC voice/video calling is a somewhat different context from general music/podcast audio delivery, and it's worth understanding this real-time-communication use case as distinct from Ogg's role as a general-purpose compressed audio format.
  • Assuming Ogg is always smaller than MP3 at a given quality — while Ogg Vorbis and especially Opus are generally competitive with or better than MP3 in compression efficiency, exact comparisons depend on bitrate settings and content type, so it's worth testing rather than assuming a universal size advantage in every case.

Comparison & FAQ

Type Purpose Key difference from audio/ogg
audio/mpeg MP3, the most universally compatible compressed audio Broader legacy/device support than Ogg, though Ogg/Opus can offer better compression efficiency
audio/wav Uncompressed production audio Much larger, uncompressed files versus Ogg's compressed approach

Should I use Ogg or MP3 for my website's audio?

For maximum compatibility, include MP3 as at least one source; Ogg (particularly with Opus) can be added as an additional source for browsers that support it, often offering better compression efficiency at similar quality.

What's the difference between Ogg Vorbis and Opus?

Both are open, royalty-free codecs commonly delivered in Ogg containers, but Opus is the newer, generally more technically capable option, especially for speech and low-bitrate audio, while Vorbis remains common in older content and continues to see use in some existing tooling and libraries.

Why is Opus used for video/voice calling specifically?

Opus was specifically designed to perform well across both speech and music at low latency and variable bitrates, making it particularly well-suited to real-time communication scenarios like WebRTC voice and video calls, distinct from its use as a general music/podcast audio codec.

Is Ogg still relevant given MP3's patents have expired?

Yes — beyond the original patent-avoidance motivation, Ogg (particularly with Opus) remains technically competitive or superior to MP3 in many scenarios, and continues to be favored in open-source ecosystems and specific real-time communication contexts.