Vorbis comments hold a file’s tags. The same structure is used inside Vorbis, Opus
(OpusTags), Speex, FLAC (as its VORBIS_COMMENT block) and Theora.
Numbers are little-endian, and the text is UTF-8.
Structure
| Size | Name | Description |
|---|---|---|
| 4 | vendor_length | the length of the vendor string |
| n | vendor_string | the program that wrote the file |
| 4 | user_comment_list_length | the number of comments |
| 4 | length | for each comment: its length |
| n | comment | for each comment: NAME=value |
| 1 bit | framing bit | in the Vorbis comment packet only, where it must be 1. Theora, Opus, Speex and FLAC comments have none |
A name is ASCII, from 0x20 to 0x7D, without =, and matches regardless of
case. The same name can appear many times, as a file can have several artists.
Standard names
The Vorbis comment specification suggests these names:
| Name | Meaning |
|---|---|
TITLE | name of the track or work |
VERSION | a version of the work, such as a remix |
ALBUM | the collection this work belongs to |
TRACKNUMBER | the track’s number on the album |
ARTIST | the artist responsible for the work |
PERFORMER | the performer of the work |
COPYRIGHT | copyright attribution |
LICENSE | licence information |
ORGANIZATION | the organisation producing the track |
DESCRIPTION | a short description of the contents |
GENRE | a short genre name |
DATE | the date of recording |
LOCATION | the place of recording |
CONTACT | contact details for the creators |
ISRC | the International Standard Recording Code |
Common additions include ALBUMARTIST, COMPOSER,
DISCNUMBER, ENCODER, COMMENT and
LYRICS, the REPLAYGAIN_TRACK_GAIN, _TRACK_PEAK,
_ALBUM_GAIN and _ALBUM_PEAK tags, and for Opus
R128_TRACK_GAIN and R128_ALBUM_GAIN: integers in Q7.8 dB, so
the gain in decibels is the value divided by 256 (-512 is −2 dB), added to the
header’s output gain to reach −23 LUFS. Opus files should not carry ReplayGain tags.
METADATA_BLOCK_PICTURE
A picture can be stored as the value of a METADATA_BLOCK_PICTURE comment: a
FLAC picture block, base64 encoded. Numbers inside it are big-endian.
| Size | Field | Description |
|---|---|---|
| 4 | picture type | see below |
| 4 | MIME length | |
| n | MIME type | printable ASCII, such as image/jpeg or image/png. The special value --> means the picture data is not an image but a URL of one |
| 4 | description length | |
| n | description | UTF-8 text |
| 4 each | width, height, colour depth, colours used | pixels and bits per pixel; colours used is 0 for images that are not indexed |
| 4 | data length | |
| n | picture data | the image file |
| Type | Meaning |
|---|---|
| 0 | Other |
| 1 | PNG file icon of 32x32 pixels (RFC 2083) |
| 2 | General file icon |
| 3 | Front cover |
| 4 | Back cover |
| 5 | Liner notes page |
| 6 | Media label (e.g., CD, Vinyl or Cassette label) |
| 7 | Lead artist, lead performer, or soloist |
| 8 | Artist or performer |
| 9 | Conductor |
| 10 | Band or orchestra |
| 11 | Composer |
| 12 | Lyricist or text writer |
| 13 | Recording location |
| 14 | During recording |
| 15 | During performance |
| 16 | Movie or video screen capture |
| 17 | A bright coloured fish |
| 18 | Illustration |
| 19 | Band or artist logotype |
| 20 | Publisher or studio logotype |
Types 1 and 2 may each appear only once in a file. A type 1 picture must be a PNG of
exactly 32 × 32 pixels. Width, height, depth and colours are there to help a player
choose a picture without decoding it; 0 means not given. A URL picture
(-->) is a link that a player follows only with care, and it may be
missing.
An older form used COVERART, the image in base64, with COVERARTMIME
giving its type.
Links
- Vorbis comment specification – the structure and the standard names
Source: Xiph.Org, Vorbis I specification, section 5 (comment header layout, framing bit, the 15 suggested field names); the picture block and the 21 picture types are the FLAC METADATA_BLOCK_PICTURE of RFC 9639 section 8.8 (Table 13), which Vorbis comments use after base64 coding as METADATA_BLOCK_PICTURE.