VORBIS_COMMENT is block type 4, and a stream has at most one. It holds the tags, in the form the Vorbis project defined. Its lengths are little-endian, the one place in a FLAC file that is.
Layout
| Bytes | Field | Meaning |
|---|---|---|
| 4 | Vendor length | The length of the vendor string |
| n | Vendor string | UTF-8: the name of the software that wrote the tags |
| 4 | Comment count | The number of comments |
| 4 + n | Each comment | A 4-byte length, then that many bytes of UTF-8 |
Comments
Each comment is one NAME=value string. The name is printable ASCII,
20 to 7E except the equals sign, and is not case-sensitive.
A name may appear more than once: two ARTIST comments mean two artists.
| Name | Meaning |
|---|---|
TITLE | Track title |
VERSION | Version of the track, such as a remix |
ALBUM | Album |
TRACKNUMBER, TRACKTOTAL | Track number and the number of tracks |
DISCNUMBER, DISCTOTAL | Disc number and the number of discs |
ARTIST, ALBUMARTIST, PERFORMER | The artist, the album’s artist, a performer |
COMPOSER, CONDUCTOR | The composer, the conductor |
GENRE, DATE | Genre, and the date of the recording |
COPYRIGHT, LICENSE, ORGANIZATION | Rights holder, licence, label |
DESCRIPTION, COMMENT | Free-form text |
LOCATION, CONTACT, ISRC | Where it was recorded, a contact, the recording code |
REPLAYGAIN_TRACK_GAIN and friends | ReplayGain loudness adjustments |
METADATA_BLOCK_PICTURE | A PICTURE block in Base64 |
The list is by convention; applications may use other names.
Speaker mask
When channels do not follow the
standard order, the comment
WAVEFORMATEXTENSIBLE_CHANNEL_MASK says which speakers they feed. Its value
is a hexadecimal number, such as 0x3, whose set bits name the speakers. A
file with this tag is outside the streamable subset.
| Bit | Channel | Bit | Channel |
|---|---|---|---|
| 0 | Front left | 9 | Side left |
| 1 | Front right | 10 | Side right |
| 2 | Front centre | 11 | Top centre |
| 3 | LFE | 12 | Top front left |
| 4 | Back left | 13 | Top front centre |
| 5 | Back right | 14 | Top front right |
| 6 | Front left of centre | 15 | Top rear left |
| 7 | Front right of centre | 16 | Top rear centre |
| 8 | Back centre | 17 | Top rear right |
A mask of 0x0 means no channel maps to a speaker.