Vorbis
37c3317fd058; modified for Encode Wiki · CC BY-SA 4.0Vorbis is a free lossy audio codec from Xiph.Org, finalised in 2002 (Vorbis I) as an open alternative to MP3. It was widely used in games (Minecraft’s sounds and music are Ogg Vorbis) and in Ogg and WebM media. Opus is its successor and is more efficient, especially at low bitrates, so choose Opus for anything new. Use Vorbis when a game engine, device or existing library needs it.
Vorbis is almost always found in Ogg (.ogg, .oga), WebM or Matroska. The .ogg extension alone does not tell you the codec, since Ogg also carries Opus, FLAC and Speex.
Encoding
Section titled “Encoding”Use libvorbis through FFmpeg:
ffmpeg -i input.flac -c:a libvorbis -q:a 5 output.oggOr oggenc from vorbis-tools, which uses the same encoder:
oggenc -q 5 input.wav -o output.ogg-q is a VBR quality scale from -1 to 10 (FFmpeg’s default is 3). The nominal stereo bitrates are about 112 kbit/s at 3, 160 at 5 and 224 at 7, but the actual rate varies with the content. Quality 5 is a good starting point for music; go higher only if you can hear a difference.
Don’t use FFmpeg’s built-in vorbis encoder. It is flagged experimental and its quality is below libvorbis. Make sure your FFmpeg has --enable-libvorbis.
Other options
Section titled “Other options”| Option | Effect |
|---|---|
-b:a 128k | Managed (ABR-like) bitrate instead of quality VBR. |
-cutoff | Lowpass frequency in Hz. Off by default (0). |
-iblock | Impulse block bias, -15 to 0 (default 0). More negative keeps transients crisper at a higher bitrate. |
Compatibility
Section titled “Compatibility”Vorbis in Ogg or WebM plays in Chrome, Edge and Firefox. Safari 18.4 added Ogg Vorbis and Ogg Opus on macOS 15.4, iOS/iPadOS 18.4 and visionOS 2.4; older versions do not play Ogg. Hardware players are less consistent than for AAC or MP3.
Vorbis supports 1–255 channels. It defines channel order for up to eight, so multichannel files are portable only up to 7.1; check the order in your player for anything above that.
Pitfalls
Section titled “Pitfalls”- Don’t transcode Vorbis to Opus. Both are lossy; encode from the lossless master.
- Keep all three headers (identification, comment, setup) if you ever repack the raw packets.
- Chained Ogg streams (several files joined end to end) confuse some players and seek poorly.