
AVorbis comment is ametadata container used in theOgg file format (withVorbis,FLAC,Theora,Speex andOpuscodecs).[1] It allows information such as the title, artist, album, track number or other information about the file to be added to the file itself. However, as the official Ogg Vorbis documentation notes, “[the comment header] is meant for short, text comments, not arbitrary metadata; arbitrary metadata belongs in a separate logical bitstream (usually an XML stream type) that provides greater structure and machine parseability.” Instead, the intended function of Vorbis comments is to approximate the kind of information that might be hand-inked onto a blank facedCD-R orCD-RW: a few lines of notes briefly detailing the content.[2]
A Vorbis tag is a list of fields in the formatFieldName=Data. The field name can be composed of printableASCII characters, 0x20 (space) through 0x7D (‘}’), with 0x3D (‘=’) and 0x7E (‘~’) excluded. It is case insensitive, soartist andARTIST are the same field.
The number of fields and their length is restricted to 4,294,967,295 (the maximum value of an unsigned 32-bitinteger), but most tag editing applications impose stricter limits.FLAC has a smaller limit of 24-bit in aMETADATA_BLOCK_VORBIS_COMMENT, because it stores thumbnails and cover art in binarybig-endianMETADATA_BLOCK_PICTUREs outside of the FLAC tags.[3]
The data is encoded inUTF-8, and so any conformingUnicode string may be used as a value.
Any field name is allowed, and there is no format that the data values must be in. This is in contrast to theID3 format used forMP3s, which is highly structured. Field names are also permitted to be used more than once. It is encouraged to use this feature to support multiple values, for example twoARTIST=... fields to list both artists of a single composition.
The specification gives several example tag names such asTITLE andTRACKNUMBER. Most applications also support commonde facto standards, such asDISCNUMBER,RATING, and tags forReplayGain information. Ratings are usually mapped as 1-5 stars with 20,40,60,80,100 as the actual string values.
There are no provisions for storing binary data in Vorbis comments. This is by design; they are intended to be used as part of acontainer format such asOgg, and any additional binary data should be encoded into the container as a stream. The exception to this, by popular request, is a proposal to incorporate cover art into a Vorbis comment.[4]