# Vorbis

Canonical URL: https://encode.wiki/codecs/audio/vorbis/
Content version: ca42e61ede0a24f789d7287a0001244ad22f4abf
Status: current
License: CC BY-SA 4.0
Checksum (SHA-256): f1c6354ccbbe1b367b6bf021b6adcd9be00ce055bc3cf2c598c8bcdeba7abb6e

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](/codecs/audio/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

Use libvorbis through FFmpeg:

```sh
ffmpeg -i input.flac -c:a libvorbis -q:a 5 output.ogg
```

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

```sh
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

| 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

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

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