Vorbis, Vorbis Comment, and Ogg Vorbis Explained
7,481 Total views across this article’s versions; includes the historical baseline where available.
This article explains the differences between Vorbis, Vorbis Comment, and Ogg Vorbis.
Vorbis
Ogg. Vorbis. Comment. Same or different? What’s the deal?
Vorbis confuses a lot of people. When someone says “Vorbis,” are they talking about the audio codec, the metadata, or an Ogg Vorbis file? The names often appear together, and it’s easy to assume they describe the same thing. On balance, the confusion isn’t surprising. Similar names are doing duty for different functions.
Why Vorbis Is Confusing
Let’s separate those functions before we get into the details:
- Vorbis is an audio codec.
- Vorbis comments are metadata entries. In a Vorbis stream, they reside in its comment header. Other formats reuse this comment format in their own structures.
- Ogg is a container format.
- Ogg Vorbis is the name for Vorbis audio carried inside an Ogg container.
The codec and its metadata have different jobs, but the comments inside a Vorbis stream aren’t an unrelated system that happens to share the name Vorbis Comment. That is where the terminology can lead us astray.
Vorbis: The Codec
Vorbis is an audio codec whose bitstream can also carry descriptive metadata. The codec handles the audio. The comments help identify what we’re listening to: a title, an artist, an album and so forth.
Here, metadata means information describing the content for a listener or someone managing a library. The stream also carries technical information needed to decode the audio. Those are different uses of information, as discussed in Multimedia Metadata Deep Dive.
Vorbis Codec Headers
A Vorbis bitstream begins with three header packets, in this order:
- Identification — identifies the stream and gives basic audio information.
- Comment — holds a vendor string and a list of user comments.
- Setup — supplies the decoder configuration.
Audio packets follow. These are three headers at the beginning of the stream, not three sections accounting for all the data in a file. The Vorbis specification requires all three for a conforming stream.1
The comment header can contain no song tags. It still has a defined structure, including length/count fields and a framing flag. “No tags” does not mean “no header,” or a packet containing no data. A damaged comment header also does not automatically make the audio undecodable; the specification distinguishes that case from damage to the other headers.1
The Vorbis Comment Header
Each user comment is a field name and a value, separated by an equal sign. For example:
TITLE=Evening Walk
ARTIST=Example Ensemble
ALBUM=First Sessions
These entries are called comment vectors. In ARTIST=Example Ensemble, ARTIST identifies the field and Example Ensemble supplies its value. The first = separates them; the value may itself contain an equal sign.
The comment specification sets a few rules:
- Field names are case-insensitive:
ARTISTandartistidentify the same field. - In Vorbis, field names use ASCII characters from
0x20through0x7D, excluding=. That range includes letters, numbers, spaces and some punctuation; it does not include every printable ASCII character. - Values use UTF-8. They are not restricted to the field name’s ASCII range.
- Field names may be repeated. Two performers can have two separate
ARTISTentries.
The specification suggests the following field names. None is mandatory:
- ALBUM
- ARTIST
- CONTACT
- COPYRIGHT
- DATE
- DESCRIPTION
- GENRE
- ISRC
- LICENSE
- LOCATION
- ORGANIZATION
- PERFORMER
- TITLE
- TRACKNUMBER
- VERSION
The format has room for a virtually unlimited number of comments from the perspective of an ordinary music library, but it is not literally unlimited. The count and each comment’s byte length have 32-bit limits.2
Vorbis Comment: The Metadata
Why do we encounter Vorbis Comment when the audio isn’t Vorbis?
Because other formats reuse the comment format. FLAC stores it in a Vorbis comment metadata block; Ogg Opus uses a comment header beginning with OpusTags. The audio remains FLAC or Opus. Seeing “Vorbis Comment” in a tagging tool identifies the tagging convention, not necessarily the audio codec. See FLAC’s earlier format description, the later RFC 9639, section 8.6, and RFC 7845, section 5.2.
I consider it a useful, flexible metadata format. Flexible does not mean structureless: fields follow the NAME=value syntax and the stored strings have explicit lengths. The original specification intends short, descriptive text rather than an unrestricted store for arbitrary metadata. Other conventions extend its uses; artwork is discussed in Metadata Deep Dive’s Vorbis Comments section.
Vorbis Codec vs. Vorbis Comment Metadata
The useful distinction is between format and location. In Vorbis audio, the comments reside in the stream’s comment header. In FLAC, they reside in a FLAC metadata block. Ogg Opus defines its own header around the shared comment format. These are not separate “Vorbis Comment files” that must be added alongside a Vorbis audio stream.
The surrounding rules can differ. For example, the original Vorbis field-name range ends at 0x7D, while the 2024 FLAC specification permits printable ASCII through 0x7E, still excluding =. Storage limits and packet framing also depend on the format.2 Reusing a tagging convention does not make all of its host formats identical.
To describe several artists, repeat the field:
ARTIST=First Performer
ARTIST=Second Performer
That is two comment entries with the same field name. It does not require inventing a delimiter inside one artist name. Whether a particular library application displays or uses every entry is a separate matter; the format permits them.
Having Your Cake and Eating It Too
Can Vorbis audio and its comments reside in the same file? Certainly. In an ordinary Ogg Vorbis file, the comment header is already part of the Vorbis stream carried by Ogg. You do not need to add a second, independent metadata object to make the comments coexist with the audio.3
That does not mean the stream’s own tags are the only possible descriptive information. The surrounding container or another associated stream can carry additional metadata according to its own format. The location of metadata and the codec used for the audio are separate questions.
Ogg Vorbis: Ogg Container + Vorbis Codec
Ogg Vorbis refers to a Vorbis-encoded audio stream wrapped in an Ogg container. The combined name is useful: Ogg identifies the container; Vorbis identifies the audio codec.
What the Combined Name Tells You
The Xiph.Org Foundation develops the Vorbis and Ogg specifications, including the Vorbis comment header. That shared origin helps explain why the names so often appear together.
Ogg is not limited to Vorbis audio or to audio alone. It packages logical streams and can interleave audio and video. Its structure supplies packet framing, error detection and timing information; the format carried inside it determines how its audio or video is encoded. Xiph’s Ogg overview explains those container functions.
When you encounter “Vorbis,” consider what the discussion is actually about: the sound, its descriptive tags, or the container carrying them. Keeping those roles distinct makes the names much easier to follow. This is a high-level explanation, not an implementation guide.
Technical Notes
1 The existing Vorbis I specification, February 27, 2015, section 4.2, p. 26, requires the identification, comment and setup header packets in that order. It explicitly makes an end-of-packet error while decoding the identification or setup header fatal, but an end-of-packet error in the comment header nonfatal. That distinction does not make the comment header optional. Chapter 5, pp. 38–40, defines its contents.
2 In the Vorbis comment format, the maximum encoded length of one complete NAME=value string is 232−1 bytes; the maximum encoded number of user-comment entries is also 232−1. These are representation limits, not a promise that a player or tag editor will accept enormous tags. A host format can impose a lower limit: FLAC metadata-block lengths use 24 bits. Its comment block also omits Vorbis’s terminating framing bit; Ogg Opus does likewise, within its own header. See FLAC’s earlier specification, RFC 9639, sections 8.1 and 8.6, and RFC 7845, section 5.2.
3 Appendix A of the Vorbis specification defines its Ogg mapping. In that mapping, the comment header is the second Vorbis header packet, not a separate logical stream. The broader comment specification discusses a separate logical stream for more elaborate metadata; that is a different arrangement.
Bibliography
- Xiph.Org Foundation. Vorbis I specification, February 27, 2015. The edition already supplied with this article; sections 4.2 and 5, and Appendix A. The online edition is dated July 4, 2020.
- Xiph.Org Foundation. Comment field and header specification.
- Xiph.Org Foundation. Vorbis audio compression and Ogg container overview.
- Xiph.Org Foundation. Earlier FLAC format description, retained by the project as a historical reference.
- van Beurden, M. Q., and Weaver, A. RFC 9639: Free Lossless Audio Codec (FLAC), December 2024. Later specification used here to distinguish FLAC’s storage rules; not a claim that FLAC comments began in 2024.
- Terriberry, T., Lee, R., and Giles, R. RFC 7845: Ogg Encapsulation for the Opus Audio Codec, April 2016, section 5.2.
- Vorbis Comment. Wikipedia, Wikimedia Foundation. Background reference carried over from the original article’s January 24, 2020 citation; the live page has since changed.