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 among FLAC’s own structures that is. Unlike a comment header in Ogg Vorbis, it has no framing bit at the end. A block is at most 16 MiB (its length is 24 bits), which limits the tags, and any picture stored in them, to that.
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.
RFC 9639 allows 20 to 7E; the Vorbis I specification
(section 5.2.2) stops at 7D, so a tilde (7E) in a name is
valid in FLAC but not in Ogg Vorbis. The RFC defines one standard name only, the
speaker mask below, says that most software recognises at least title, artist and album,
and suggests the MusicBrainz tag list for further names. The names in the table are
the minimal list of standard field names of the Vorbis comment specification
(xiph.org, “Ogg Vorbis I format specification: comment field and header
specification”), which says that no field name is mandatory and that vendors may use
others; the ReplayGain and picture names are explained below the table.
| Name | Meaning |
|---|---|
TITLE | Track or work name |
VERSION | Tells apart several versions of the same track title in one collection, such as remix information |
ALBUM | The collection name the track belongs to |
TRACKNUMBER | The track number, if the piece is part of a larger collection or album |
ARTIST | The artist generally considered responsible for the work: the performing band or singer in popular music, the composer in classical music, the author of the original text for an audio book |
PERFORMER | The artists who performed the work (in classical music the conductor, orchestra and soloists); in popular music usually the same as ARTIST and left out |
GENRE, DATE | A short text indication of the genre, and the date the track was recorded |
COPYRIGHT, LICENSE, ORGANIZATION | Copyright attribution; licence information (for example “All Rights Reserved”, or a URL of a Creative Commons licence); the name of the organisation producing the track (the record label) |
DESCRIPTION | A short text description of the contents |
LOCATION, CONTACT, ISRC | Where the track was recorded; contact information for the creators or distributors (a URL, an email address or a postal address); the ISRC of the track |
REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, REPLAYGAIN_ALBUM_PEAK, REPLAYGAIN_REFERENCE_LOUDNESS | ReplayGain loudness adjustments. Not defined by RFC 9639; see below |
METADATA_BLOCK_PICTURE | A PICTURE block in Base64. An Ogg Vorbis convention, not part of FLAC or RFC 9639, where a picture has its own block |
Field names are not unique within a comment block: the Vorbis comment specification’s own example is three ARTIST comments for a track recorded by three artists. Applications use other names as well (the RFC points to the MusicBrainz list); the viewer shows any name.
ReplayGain
ReplayGain stores how much a player should raise or lower a track so that tracks play
at the same loudness. RFC 9639 does not define these comments. The names and formats
below are those of the revised ReplayGain specification on the Hydrogenaudio wiki
(“ReplayGain 2.0”, a proposed update to the original specification of 2001, marked
there as under construction; last edited 23 January 2026), which says that for
Vorbis comments “the four ReplayGain metadata items are stored as separate comments”
with the same keys and value formats as ID3v2. The FLAC reference code
(grabbag/replaygain.c, which writes and reads them), vorbisgain, loudgain
and FFmpeg (libavformat/replaygain.c) agree with it, and the Opus tags
are from RFC 7845.
| Name | Value | Example |
|---|---|---|
REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_ALBUM_GAIN | The change to apply, in decibels, in the form [-]a.bb dB. The specification: gains are written as text; a negative gain is prefixed with - and a positive one has no prefix; the integral part a is one or two digits (0 if there is none); the decimal part bb is two digits; the gain is followed by a space and dB. The gain is the reference level (-18 LUFS in the revised specification) minus the measured loudness, so it is positive for a track quieter than the reference. The FLAC reference code writes two decimals and always a sign | -3.45 dB |
REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_PEAK | The largest sample of the track or album before the change, a positive decimal with no suffix, where 1.000000 is digital full scale: the integer part c is typically 1 or 0, and six decimals (c.dddddd) are enough for 16-bit audio. It may be above 1.0 for audio that was coded with a psychoacoustic codec. The FLAC reference code writes eight decimals | 0.987654 |
REPLAYGAIN_REFERENCE_LOUDNESS | Not part of the revised specification, which names it among the de-facto extensions (those that MusicBrainz Picard and loudgain write, as [-]a.bb LUFS) and strikes it out with the remark that it “is harmful and deviates from the standard, which has only one reference target”. The older convention is dB SPL (89 dB; the FLAC reference code writes one decimal with dB); loudgain writes LUFS (for example -18 LUFS, which its README says was estimated to equal the old 89 dB) | -18.00 LUFS or 89.0 dB |
REPLAYGAIN_TRACK_RANGE, REPLAYGAIN_ALBUM_RANGE | De-facto extensions listed in the revised specification (written by MusicBrainz Picard and loudgain): the loudness range, [-]a.bb dB, which indicates dynamics and may guide pre-amplification. The same specification proposes REPLAYGAIN_ALGORITHM (value ITU-R BS.1770) for the method that produced the values | 8.20 dB |
R128_TRACK_GAIN, R128_ALBUM_GAIN | The Opus convention (RFC 7845 section 5.2.1): an integer, in the Q7.8 fixed-point format (units of 1/256 dB), of at most 6 characters, with no unit, from -32768 to 32767, relative to the EBU R128 standard (RFC 7845 says only that). The revised ReplayGain specification lists them for Opus as “standard” comment keys, “MUST adjust for -23 LUFS”, which loudgain uses. Written by Opus tools; whether a FLAC player reads them is up to the player | -573 is -2.238 dB |
Names are read without regard to case, like every Vorbis comment name (RFC 9639 section 8.6);
the writers named above write them in capitals. The decimal separator is always a full
stop: the FLAC reference code reads values with the locale set to C so that
a comma never appears, and a value like -3,45 dB is malformed. A reader
takes the number and ignores a trailing dB (the FLAC reference code and FFmpeg
both stop at the first character that is not part of the number). The R128 tags are
different: RFC 7845 section 5.2.1 gives each as a Q7.8 fixed-point number in dB, and
requires its value to be an integer from -32768 to 32767, written in ASCII as a base 10
number with no whitespace, in no more than 6 characters, with no non-digit character
other than a leading + or -. So an R128 value never has a
decimal separator, and the question of which one does not arise.
The revised specification asks a robust player to accept these variations in a gain or
peak value: a positive gain with a leading +, more or fewer significant
digits than specified, leading zeros or spaces in the integer part, a missing or
malformed dB suffix (no space, other capitalisation) and other
capitalisation of the key. It adds that other formatting errors “indicate more severe
problems and should result in player ignoring data as if the frame did not exist”.
It does not require the four items to come together. A player that finds only one of the
two gains uses it for the other kind of normalisation; with neither it picks a default
(unity gain or an average of other tracks are its examples); and “if peak level
metadata is unavailable, the player should assume a peak level of 1.0”. So a gain with no
peak is a complete set for the specification. The FLAC reference code is stricter (it
treats a missing or unreadable gain or peak as a failure to load that set), and FFmpeg
uses a gain with no peak. The viewer shows what is there and reports only a value that is
malformed.
Sources read: the revised ReplayGain specification (Hydrogenaudio Knowledgebase, “Revised ReplayGain specification”, retrieved 27 November 2026) and the original specification’s data-format pages (replaygain.hydrogenaudio.org). The original specification also defines a binary form (a 16-bit gain field of name code, originator code, sign bit and 9 bits of tenfold gain, and a 32-bit floating-point peak); it is not used in Vorbis comments, where the revised specification defines the text form on this page.
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 (Ambisonics B-format, or
a multitrack recording). The value may be padded with zeros (0x0008 is
0x8), and both the field name and the value are read without regard to
case. A mask may name fewer channels than the audio has; the remaining channels
should not be played by an application that does not know their purpose (the
first two channels of Ambisonics UHJ are a stereo mix, and 0x3 says so)
(RFC 9639 section 8.6.2).