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 and Theora comment packets only, and must be 1 for Vorbis |
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).
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 | such as image/jpeg |
| 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 | 32×32 pixels file icon (PNG only) |
| 2 | Other file icon |
| 3 | Cover (front) |
| 4 | Cover (back) |
| 5 | Leaflet page |
| 6 | Media (such as the label side of a CD) |
| 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 |
An older form used COVERART, the image in base64, with COVERARTMIME
giving its type.
Links
- Vorbis comment specification – the structure and the standard names