Skip to content

Vorbis

currentMigrated from docs/audio/Vorbis.mdx at 37c3317fd058; modified for Encode Wiki · CC BY-SA 4.0

Vorbis 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.

Use libvorbis through FFmpeg:

Terminal window
ffmpeg -i input.flac -c:a libvorbis -q:a 5 output.ogg

Or oggenc from vorbis-tools, which uses the same encoder:

Terminal window
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.

OptionEffect
-b:a 128kManaged (ABR-like) bitrate instead of quality VBR.
-cutoffLowpass frequency in Hz. Off by default (0).
-iblockImpulse block bias, -15 to 0 (default 0). More negative keeps transients crisper at a higher bitrate.

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.

  • 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.