OGG Vorbis
An open-source, royalty-free lossy audio codec in the Ogg container, offering quality comparable to or better than MP3 without patent restrictions.
You are a file format specialist with deep expertise in Ogg Vorbis, including the Ogg container structure, Vorbis MDCT-based compression, quality-scale encoding with oggenc and FFmpeg, Vorbis comment metadata, and game audio integration. ## Key Points 1. **Floor curves** — model the spectral envelope shape 2. **Residue vectors** — encode the remaining detail via vector quantization with codebooks 3. **Channel coupling** — exploits interchannel redundancy (similar to joint stereo) - **Desktop**: VLC, foobar2000, MusicBee, Winamp, Audacious, Clementine - **macOS**: VLC (not natively supported by QuickTime/Music) - **Mobile**: VLC, Poweramp, most Android players (native support) - **Web**: Supported in all modern browsers - **oggenc** (reference encoder): `oggenc -q 6 input.wav -o output.ogg` - **FFmpeg**: `ffmpeg -i input.wav -codec:a libvorbis -qscale:a 6 output.ogg` - **Audacity**: Export > OGG Vorbis - **SoX**: `sox input.wav output.ogg` - **To WAV**: `ffmpeg -i input.ogg output.wav`
skilldb get file-formats-skills/OGG VorbisFull skill: 157 linesYou are a file format specialist with deep expertise in Ogg Vorbis, including the Ogg container structure, Vorbis MDCT-based compression, quality-scale encoding with oggenc and FFmpeg, Vorbis comment metadata, and game audio integration.
OGG Vorbis — Open Audio Format
Overview
Ogg Vorbis is a free, open-source lossy audio codec developed by the Xiph.Org Foundation. "Ogg" refers to the container format, while "Vorbis" is the audio codec itself. The project was started in 1998 by Christopher "Monty" Montgomery as a response to Fraunhofer IIS's announcement of licensing fees for MP3. The first stable release (1.0) shipped in 2002.
Vorbis was designed from the ground up to be patent-free and technically superior to MP3. It achieves quality comparable to or better than MP3 at equivalent bitrates, particularly excelling in the 64-192 kbps range. The format uses a modified discrete cosine transform (MDCT) with flexible block sizes, floor/residue coding, and vector quantization.
While Vorbis never displaced MP3 in mainstream consumer use, it found strong adoption in gaming (Unreal Engine, Unity, many game engines default to it), open-source software, and as the audio codec in WebM video. It has been largely superseded by Opus (also from Xiph.Org) for new applications, but remains widely deployed.
Core Philosophy
Ogg is a container format, not a codec. This distinction matters: Ogg Vorbis (lossy audio), Ogg FLAC (lossless audio), Ogg Opus (modern lossy/lossless), and Ogg Theora (video) are all different codecs wrapped in the same Ogg container. When people say "Ogg," they usually mean Ogg Vorbis, but precision about container versus codec prevents confusion and incorrect tooling choices.
The Ogg ecosystem is built on the principle that media formats should be free and open. Developed by the Xiph.Org Foundation, Ogg and its associated codecs (Vorbis, FLAC, Opus) are completely royalty-free and patent-free. This philosophical commitment to openness made Ogg Vorbis the audio format of choice for open-source projects, game engines, and platforms that wanted to avoid patent licensing.
For new projects, Ogg Vorbis has been largely superseded by Opus, which offers better quality at all bitrates and is also royalty-free. Ogg Vorbis remains relevant for compatibility with existing content libraries and platforms that standardized on it (many game engines, Wikipedia, older web applications). Use Opus for new work; use Vorbis when you need to match an existing ecosystem.
Technical Specifications
| Property | Details |
|---|---|
| File Extension | .ogg, .oga |
| MIME Type | audio/ogg, audio/vorbis |
| Container | Ogg |
| Codec | Vorbis |
| Compression | Lossy |
| Bitrate | ~45 kbps to ~500 kbps (VBR only; no true CBR mode) |
| Sample Rates | 1 Hz to 200 kHz (common: 44.1, 48 kHz) |
| Channels | 1 to 255 (with defined channel mappings for up to 7.1 surround) |
| Bit Depth | Not directly applicable (uses floating-point MDCT internally) |
| Metadata | Vorbis comments (flexible UTF-8 key=value pairs) |
Quality Settings
Vorbis uses a quality scale from -1 to 10:
| Quality | Approximate Bitrate | Comparable MP3 |
|---|---|---|
| -1 | ~45 kbps | — |
| 0 | ~64 kbps | 80 kbps |
| 3 | ~112 kbps | 128 kbps |
| 5 | ~160 kbps | 192 kbps |
| 6 | ~192 kbps | 224 kbps |
| 7 | ~224 kbps | 256 kbps |
| 8 | ~256 kbps | 288 kbps |
| 10 | ~500 kbps | 320 kbps |
How It Works
Vorbis divides audio into overlapping windows of 64 to 8192 samples, applies MDCT, then encodes the spectral data using:
- Floor curves — model the spectral envelope shape
- Residue vectors — encode the remaining detail via vector quantization with codebooks
- Channel coupling — exploits interchannel redundancy (similar to joint stereo)
All bitrate management is inherently VBR; bits are allocated where the audio demands them.
How to Work With It
Opening / Playing
- Desktop: VLC, foobar2000, MusicBee, Winamp, Audacious, Clementine
- macOS: VLC (not natively supported by QuickTime/Music)
- Mobile: VLC, Poweramp, most Android players (native support)
- Web: Supported in all modern browsers
Creating / Encoding
- oggenc (reference encoder):
oggenc -q 6 input.wav -o output.ogg - FFmpeg:
ffmpeg -i input.wav -codec:a libvorbis -qscale:a 6 output.ogg - Audacity: Export > OGG Vorbis
- SoX:
sox input.wav output.ogg
Converting
- To WAV:
ffmpeg -i input.ogg output.wav - To MP3:
ffmpeg -i input.ogg -codec:a libmp3lame -V 2 output.mp3 - To Opus:
ffmpeg -i input.ogg -codec:a libopus -b:a 128k output.opus
Common Use Cases
- Video game audio assets (widely adopted in game engines)
- Open-source software and Linux distributions
- WebM video audio track
- Internet radio and streaming where patent-free codecs are preferred
- Audio in Wikipedia and Wikimedia projects
- Spotify's desktop client used Vorbis at 320 kbps for Premium streams (historically)
- Embedded systems and applications avoiding patent royalties
Pros & Cons
Pros
- Completely open-source and royalty-free; no patents
- Better quality than MP3 at equivalent bitrates, especially at mid-range
- Inherently VBR; efficient bit allocation
- Flexible metadata system (Vorbis comments are key=value UTF-8, no length limits)
- Good surround sound support with defined channel mappings
- Widely supported in web browsers (all except older Safari)
- Strong adoption in gaming industry
Cons
- Not natively supported on Apple platforms (macOS, iOS) without third-party software
- Limited hardware player support compared to MP3 and AAC
- Superseded by Opus for most new applications
- No true CBR mode (problematic for some streaming infrastructure)
- Encoder development largely ceased (mature but no active improvements)
- Smaller community and ecosystem compared to MP3/AAC
- Some car stereos and portable players lack support
Compatibility
| Platform | Support |
|---|---|
| Windows | Via codecs/players (not native in older Windows) |
| macOS | Via VLC/third-party (not native) |
| Linux | Native (GStreamer, FFmpeg) |
| iOS | Via third-party apps only |
| Android | Native (since Android 1.0) |
| Web Browsers | Chrome, Firefox, Edge, Opera (Safari added in v14.1+) |
| Game Engines | Unity, Unreal, Godot, most engines |
| Hardware | Limited; some DAPs and car stereos |
Related Formats
- Opus — Xiph.Org's successor codec; better at all bitrates, recommended for new projects
- MP3 — The format Vorbis aimed to replace
- AAC — Proprietary competitor with broader hardware support
- FLAC — Xiph.Org's lossless codec, also in Ogg container
- Speex — Xiph.Org speech codec (predecessor to Opus, now deprecated)
- WebM — Google's video format using Vorbis or Opus audio
Practical Usage
- Use quality level 5-6 (
-qscale:a 5or-qscale:a 6in FFmpeg) as the default for music encoding -- this produces ~160-192 kbps output with excellent transparency for most material. - Choose Ogg Vorbis for game audio assets -- Unity, Unreal Engine, and Godot all support it natively, and it offers good quality at file sizes suitable for game distribution.
- Always encode from a lossless source (WAV, FLAC) -- transcoding from MP3 or AAC to Vorbis compounds generation loss.
- Use Vorbis comments for metadata -- the key=value tag system is more flexible than ID3 and supports arbitrary UTF-8 tags without length restrictions.
- For new projects that do not require Vorbis specifically, prefer Opus -- it is technically superior at all bitrates and is also royalty-free from Xiph.Org.
- Use
.ogaas the extension for audio-only Ogg files to distinguish from.oggwhich may also contain video (Theora).
Anti-Patterns
- Choosing Vorbis for Apple-centric distribution -- macOS and iOS have no native Vorbis playback; users will need VLC or a third-party app, creating friction.
- Transcoding Vorbis to MP3 for compatibility -- Converting between lossy formats degrades quality; keep a lossless master and encode to each target format independently.
- Using Vorbis for new low-bitrate speech applications -- Opus dramatically outperforms Vorbis below 64 kbps; use Opus for voice, podcasts, and low-bitrate streaming.
- Expecting CBR output from Vorbis -- Vorbis is inherently VBR; there is no true constant bitrate mode, which can be problematic for streaming infrastructure that requires fixed bitrate streams.
- Ignoring the Ogg container when multiplexing -- Vorbis must be in an Ogg container (not raw); using raw Vorbis frames outside Ogg breaks seeking and metadata support.
Install this skill directly: skilldb add file-formats-skills
Related Skills
3MF 3D Manufacturing Format
The 3MF file format — the modern replacement for STL in 3D printing, supporting colors, materials, multi-object assemblies, and precise manufacturing data in a single package.
7-Zip Compressed Archive
The 7z archive format — open-source high-ratio compression using LZMA2, with strong AES-256 encryption, solid archives, and multi-threading support.
AAC (Advanced Audio Coding)
A lossy audio codec standardized as part of MPEG-2 and MPEG-4, designed to supersede MP3 with better quality at equivalent or lower bitrates.
AC3 (Dolby Digital)
Dolby's surround sound audio codec used in cinema, DVD, Blu-ray, and broadcast television for multichannel 5.1 audio delivery.
AI Adobe Illustrator Format
AI is Adobe Illustrator's native vector graphics file format, used for
AIFF (Audio Interchange File Format)
Apple's uncompressed audio format storing raw PCM data, serving as the Mac equivalent of WAV for professional audio production.