MusicBrainz Tag: Difference between revisions

From MusicBrainz Wiki
Jump to navigationJump to search
(Reviewed and updated information on this page to the current status; cleanup and readability improvements)
(included description about MP4 tags; added APE tags to the tag overview table; moved overview table to the top (an overview shouldn't be at the bottom of a page))
Line 1: Line 1:
=MusicBrainz Metadata Tags (ID3 and Vorbis/FLAC Comment)=
=MusicBrainz Metadata Tags (ID3, Vorbis Comments, MP4, WMA, APE)=


'''Status:''' ''The information on this page is complete as of tunepimp [[Subversion]] snapshot 2006-01-13, and has been partially updated on 2009-12-14.''
'''Status:''' ''The information on this page is complete as of tunepimp [[Subversion]] snapshot 2006-01-13. It has been reviewed on 2009-12-15 and should be fairly up to date now.''


Applications that read or write metadata tags from music files should follow one consistent specification for what [[MusicBrainz]] information is stored where and in what tag. That way all the work of the various tagger applications will contribute to a well connected and clean body of metadata. Any application that deals with music should be able to read the [[MusicBrainz Identifier|MusicBrainzIdentifier]]<code><nowiki></nowiki></code>s from a music file in order to communicate unambiguously about the music it's working with.
Applications that read or write metadata tags from music files should follow one consistent specification for what [[MusicBrainz]] information is stored where and in what tag. That way all the work of the various tagger applications will contribute to a well connected and clean body of metadata. Any application that deals with music should be able to read the [[MusicBrainz Identifier|MusicBrainzIdentifier]]s from a music file in order to communicate unambiguously about the music it's working with.


==Overview==
==ID3v2 Tag specifications==

'''Metadata tags defined by MusicBrainz''' (a detailed description of them is below)
{| border="1"
|-
| '''Value''' || '''ID3v2''' || '''Vorbis Comments''' || '''MP4 (iTunes) tags''' || '''Windows Media''' || '''APE tags'''
|-
| MusicBrainz Track Id || UFID:<code><nowiki>http://musicbrainz.org</nowiki></code> || MUSICBRAINZ_TRACKID || ----:MusicBrainz Track Id || MusicBrainz/Track Id || MUSICBRAINZ_TRACKID
|-
| MusicBrainz Artist Id || TXXX:MusicBrainz Artist Id || MUSICBRAINZ_ARTISTID || ----:MusicBrainz Artist Id || MusicBrainz/Artist Id || MUSICBRAINZ_ARTISTID
|-
| MusicBrainz Album Id || TXXX:MusicBrainz Album Id || MUSICBRAINZ_ALBUMID || ----:MusicBrainz Album Id || MusicBrainz/Album Id || MUSICBRAINZ_ALBUMID
|-
| MusicBrainz Album Artist Id || TXXX:MusicBrainz Album Artist Id || MUSICBRAINZ_ALBUMARTISTID || ----:MusicBrainz Album Artist Id || MusicBrainz/Album Artist Id || MUSICBRAINZ_ALBUMARTISTID
|-
| MusicBrainz Disc Id || TXXX:MusicBrainz Disc Id || MUSICBRAINZ_DISCID || ----:MusicBrainz Disc Id || MusicBrainz/Disc Id || MUSICBRAINZ_DISCID
|-
| MusicBrainz Album Status || TXXX:MusicBrainz Album Status || MUSICBRAINZ_ALBUMSTATUS || ----:MusicBrainz Album Status || MusicBrainz/Album Status || MUSICBRAINZ_ALBUMSTATUS
|-
| MusicBrainz Album Type || TXXX:MusicBrainz Album Type || MUSICBRAINZ_ALBUMTYPE || ----:MusicBrainz Album Type || MusicBrainz/Album Type || MUSICBRAINZ_ALBUMTYPE
|-
| MusicBrainz Album Release Country || TXXX:MusicBrainz Album Release Country || RELEASECOUNTRY || ----:MusicBrainz Album Release Country || MusicBrainz/Album Release Country ||
|-
| MusicIP PUID || TXXX:MusicIP PUID || MUSICIP_PUID || ----:MusicIP PUID || MusicIP/PUID || MUSICIP_PUID
|}


'''Other important standard metadata tags'''
{| border="1"
|-
| '''Value''' || '''ID3v2''' || '''Vorbis Comments''' || '''MP4 (iTunes) tags''' || '''Windows Media''' || '''APE tags'''
|-
| Artist || TPE1 || ARTIST || ©ART || Author || Artist
|-
| Album Artist || TPE2 || ALBUMARTIST || aART || WM/AlbumArtist || Album Artist
|-
| Album || TALB || ALBUM || ©alb || WM/AlbumTitle || Album
|-
| Title || TIT2 || TITLE || ©nam || Title || Title
|-
| Track Number || TRCK || TRACKNUMBER || trkn || WM/TrackNumber || Track
|-
| Release Date || TYER + TDAT (2.3), TDRC (2.4) || DATE || ©day || WM/Year || Year
|-
| isCompilation || TCMP || COMPILATION || cpil || WM/IsCompilation || Compilation
|-
| Album Artist Sortname || TSO2 + TXXX:ALBUMARTISTSORT || ALBUMARTISTSORT || soaa || WM/AlbumArtistSortOrder || ALBUMARTISTSORT
|-
| Artist Sortname || XSOP (2.3), TSOP (2.4) || ARTISTSORT || soar || WM/ArtistSortOrder || ARTISTSORT
|}

==ID3v2 Tags==


See [[ID3v2 Tags|ID3v2Tags]] for a list of proposed frames tagger applications could write. The following descriptions are summerized in a table below, for more information on how to use ID3v2 tags in your own applications read the specifications on [http://www.id3.org/ http://www.id3.org/].
See [[ID3v2 Tags|ID3v2Tags]] for a list of proposed frames tagger applications could write. The following descriptions are summerized in a table below, for more information on how to use ID3v2 tags in your own applications read the specifications on [http://www.id3.org/ http://www.id3.org/].


Note: for each text frame ('''T'''XXX) the encoding of the value strings can be defined in the frame header. ID3v2.3 supports UTF-16 and ISO-8859-1 encoded strings; ID3v2.4 has addional support for UTF-8 and UTF-16BE. [[MusicBrainz]] Identifiers must be encoded as ISO-8859-1 strings.
Note: for each text frame (frame names starting with a '''T''') the encoding of the value strings can be defined in the frame header. ID3v2.3 supports UTF-16 and ISO-8859-1 encoded strings; ID3v2.4 has addional support for UTF-8 and UTF-16BE. [[MusicBrainz]] Identifiers must be encoded as ISO-8859-1 strings.


ID3v2 frames can be stored in any order in the MP3 file.
ID3v2 frames can be stored in any order in the MP3 file.
Line 27: Line 78:
ID3v2.3 is missing a standard frame for a detailed date. Therefore the experimental '''XDOR''' frame is used and the additional '''TORY''' that stores the year of release as a 4 digit number only is used.
ID3v2.3 is missing a standard frame for a detailed date. Therefore the experimental '''XDOR''' frame is used and the additional '''TORY''' that stores the year of release as a 4 digit number only is used.


In ID3v2.4 only the '''TDRL''' frame is used to store the complete release date in <code><nowiki>yyyy-MM-dd</nowiki></code> format.
In ID3v2.4 only the '''TDRL''' frame is used to store the complete release date in <code><nowiki>YYYY-MM-DD</nowiki></code> format.


===Music Brainz Identifier===
===Music Brainz Identifier===
Line 63: Line 114:
The ''MusicIP PUID'' is stored in a user defined '''TXXX''' text information frame, encoded as a <code><nowiki>0x00</nowiki></code> terminated ISO-8859-1 string. Its value is the track's [[PUID]] as stored in the [[MusicBrainz]] database.
The ''MusicIP PUID'' is stored in a user defined '''TXXX''' text information frame, encoded as a <code><nowiki>0x00</nowiki></code> terminated ISO-8859-1 string. Its value is the track's [[PUID]] as stored in the [[MusicBrainz]] database.


==Vorbis/FLAC comment specifications==
==Vorbis Comments==


In contrast to the various possibilities of ID3 tagging, Vorbis and FLAC tags are stored in a unified way. All strings are encoded as UTF-8, tagged data is stored in the so called [http://www.xiph.org/vorbis/doc/v-comment.html comment header], each key value pair is specified as a tripplet of the form: <code><nowiki>[length in bytes][key]=[value]</nowiki></code>. Strings are not terminated. For proposed extensions to the default comment tags see [http://reactor-core.org/ogg-tag-recommendations.html Ogg Vorbis Comment Field Recommendations] and [http://www.gophernet.org/articles/vorbiscomment.html Extending Vorbis Comments].
In contrast to the various possibilities of ID3 tagging, Vorbis and FLAC tags are stored in a unified way. All strings are encoded as UTF-8, tagged data is stored in the so called [http://www.xiph.org/vorbis/doc/v-comment.html comment header], each key value pair is specified as a tripplet of the form: <code><nowiki>[length in bytes][key]=[value]</nowiki></code>. Strings are not terminated. For proposed extensions to the default comment tags see [http://reactor-core.org/ogg-tag-recommendations.html Ogg Vorbis Comment Field Recommendations] and [http://www.gophernet.org/articles/vorbiscomment.html Extending Vorbis Comments].


Note, that <code><nowiki>RELEASECOUNTRY</nowiki></code> is no standard tag and not mentioned in any of the proposals; <code><nowiki>DATE</nowiki></code> was originally specified to store the recording date while [[MusicBrainz]] defines only release dates.
Note that <code><nowiki>RELEASECOUNTRY</nowiki></code> is no standard tag and not mentioned in any of the proposals; <code><nowiki>DATE</nowiki></code> was originally specified to store the recording date while [[MusicBrainz]] defines only release dates.


==MP4 (iTunes) tags==
The different comment names and their equivalent ID3v2 frames can be found in the table below.


There is no official MPEG standard on how to embed metadata tags in MP4 files. Apple iTunes therefore started to use their own solution in order to be able to store metadata tags. Those iTunes tags quickly became the de-facto standard for metadata tags within MP4 files.
==Overview==


Metadata tags within MP4 files are stored within so-called "boxes" (also known as "atoms"). Those boxes can contain other boxes as childs within them. Metadata tags to be used with iTunes come in the <code><nowiki>moov.udta.meta.ilst</nowiki></code> hierarchy. The boxes located directly under the <code><nowiki>ilst</nowiki></code> box have specific names, which are listed in the overview table above.
'''Tags defined by MusicBrainz'''


There also is one special metadata box: the <code><nowiki>----</nowiki></code> box. It has the three child boxes <code><nowiki>mean</nowiki></code>, <code><nowiki>name</nowiki></code>, and <code><nowiki>data</nowiki></code>. The <code><nowiki>mean</nowiki></code> box always carries the string "com.apple.iTunes", while the <code><nowiki>name</nowiki></code> box holds the actual metadata identifier string. If the tag table above therefore lists, for example, an MP4 tag name of "----:MusicBrainz Disc Id", then this actually means that a <code><nowiki>----</nowiki></code> box is used with a child <code><nowiki>name</nowiki></code> box which holds "MusicBrainz Disc Id".
{| border="1"
|-
| '''Value''' || '''ID3v2''' || '''Vorbis Comments''' || '''MP4 (iTunes) tags''' || '''Windows Media'''
|-
| MusicBrainz Track Id || UFID:<code><nowiki>http://musicbrainz.org</nowiki></code> || MUSICBRAINZ_TRACKID || ----:MusicBrainz Track Id || MusicBrainz/Track Id
|-
| MusicBrainz Artist Id || TXXX:MusicBrainz Artist Id || MUSICBRAINZ_ARTISTID || ----:MusicBrainz Artist Id || MusicBrainz/Artist Id
|-
| MusicBrainz Album Id || TXXX:MusicBrainz Album Id || MUSICBRAINZ_ALBUMID || ----:MusicBrainz Album Id || MusicBrainz/Album Id
|-
| MusicBrainz Album Artist Id || TXXX:MusicBrainz Album Artist Id || MUSICBRAINZ_ALBUMARTISTID || ----:MusicBrainz Album Artist Id || MusicBrainz/Album Artist Id
|-
| MusicBrainz Disc Id || TXXX:MusicBrainz Disc Id || MUSICBRAINZ_DISCID || ----:MusicBrainz Disc Id || MusicBrainz/Disc Id
|-
| MusicBrainz Album Status || TXXX:MusicBrainz Album Status || MUSICBRAINZ_ALBUMSTATUS || ----:MusicBrainz Album Status || MusicBrainz/Album Status
|-
| MusicBrainz Album Type || TXXX:MusicBrainz Album Type || MUSICBRAINZ_ALBUMTYPE || ----:MusicBrainz Album Type || MusicBrainz/Album Type
|-
| MusicBrainz Album Release Country || TXXX:MusicBrainz Album Release Country || RELEASECOUNTRY || ----:MusicBrainz Album Release Country || MusicBrainz/Album Release Country
|-
| MusicIP PUID || TXXX:MusicIP PUID || MUSICIP_PUID || ----:MusicIP PUID || MusicIP/PUID
|}



'''Other important standard tags'''
{| border="1"
|-
| '''Value''' || '''ID3v2''' || '''Vorbis Comments''' || '''MP4 (iTunes) tags''' || '''Windows Media'''
|-
| Artist || TPE1 || ARTIST || ©ART || Author
|-
| Album Artist || TPE2 || ALBUMARTIST || aART || WM/AlbumArtist
|-
| Album || TALB || ALBUM || ©alb || WM/AlbumTitle
|-
| Title || TIT2 || TITLE || ©nam || Title
|-
| Track Number || TRCK || TRACKNUMBER || trkn || WM/TrackNumber
|-
| Release Date || TYER + TDAT (2.3), TDRC (2.4) || DATE || ©day || WM/Year
|-
| isCompilation || TCMP || COMPILATION || cpil || WM/IsCompilation
|-
| Album Artist Sortname || TSO2 + TXXX:ALBUMARTISTSORT || ALBUMARTISTSORT || soaa || WM/AlbumArtistSortOrder
|-
| Artist Sortname || XSOP (2.3), TSOP (2.4) || ARTISTSORT || soar || WM/ArtistSortOrder
|}


[http://www.musicbrainz.org/docs/specs/metadata_tags.html OriginalVersion]
[http://www.musicbrainz.org/docs/specs/metadata_tags.html OriginalVersion]

Revision as of 11:41, 15 December 2009

MusicBrainz Metadata Tags (ID3, Vorbis Comments, MP4, WMA, APE)

Status: The information on this page is complete as of tunepimp Subversion snapshot 2006-01-13. It has been reviewed on 2009-12-15 and should be fairly up to date now.

Applications that read or write metadata tags from music files should follow one consistent specification for what MusicBrainz information is stored where and in what tag. That way all the work of the various tagger applications will contribute to a well connected and clean body of metadata. Any application that deals with music should be able to read the MusicBrainzIdentifiers from a music file in order to communicate unambiguously about the music it's working with.

Overview

Metadata tags defined by MusicBrainz (a detailed description of them is below)

Value ID3v2 Vorbis Comments MP4 (iTunes) tags Windows Media APE tags
MusicBrainz Track Id UFID:http://musicbrainz.org MUSICBRAINZ_TRACKID ----:MusicBrainz Track Id MusicBrainz/Track Id MUSICBRAINZ_TRACKID
MusicBrainz Artist Id TXXX:MusicBrainz Artist Id MUSICBRAINZ_ARTISTID ----:MusicBrainz Artist Id MusicBrainz/Artist Id MUSICBRAINZ_ARTISTID
MusicBrainz Album Id TXXX:MusicBrainz Album Id MUSICBRAINZ_ALBUMID ----:MusicBrainz Album Id MusicBrainz/Album Id MUSICBRAINZ_ALBUMID
MusicBrainz Album Artist Id TXXX:MusicBrainz Album Artist Id MUSICBRAINZ_ALBUMARTISTID ----:MusicBrainz Album Artist Id MusicBrainz/Album Artist Id MUSICBRAINZ_ALBUMARTISTID
MusicBrainz Disc Id TXXX:MusicBrainz Disc Id MUSICBRAINZ_DISCID ----:MusicBrainz Disc Id MusicBrainz/Disc Id MUSICBRAINZ_DISCID
MusicBrainz Album Status TXXX:MusicBrainz Album Status MUSICBRAINZ_ALBUMSTATUS ----:MusicBrainz Album Status MusicBrainz/Album Status MUSICBRAINZ_ALBUMSTATUS
MusicBrainz Album Type TXXX:MusicBrainz Album Type MUSICBRAINZ_ALBUMTYPE ----:MusicBrainz Album Type MusicBrainz/Album Type MUSICBRAINZ_ALBUMTYPE
MusicBrainz Album Release Country TXXX:MusicBrainz Album Release Country RELEASECOUNTRY ----:MusicBrainz Album Release Country MusicBrainz/Album Release Country
MusicIP PUID TXXX:MusicIP PUID MUSICIP_PUID ----:MusicIP PUID MusicIP/PUID MUSICIP_PUID


Other important standard metadata tags

Value ID3v2 Vorbis Comments MP4 (iTunes) tags Windows Media APE tags
Artist TPE1 ARTIST ©ART Author Artist
Album Artist TPE2 ALBUMARTIST aART WM/AlbumArtist Album Artist
Album TALB ALBUM ©alb WM/AlbumTitle Album
Title TIT2 TITLE ©nam Title Title
Track Number TRCK TRACKNUMBER trkn WM/TrackNumber Track
Release Date TYER + TDAT (2.3), TDRC (2.4) DATE ©day WM/Year Year
isCompilation TCMP COMPILATION cpil WM/IsCompilation Compilation
Album Artist Sortname TSO2 + TXXX:ALBUMARTISTSORT ALBUMARTISTSORT soaa WM/AlbumArtistSortOrder ALBUMARTISTSORT
Artist Sortname XSOP (2.3), TSOP (2.4) ARTISTSORT soar WM/ArtistSortOrder ARTISTSORT

ID3v2 Tags

See ID3v2Tags for a list of proposed frames tagger applications could write. The following descriptions are summerized in a table below, for more information on how to use ID3v2 tags in your own applications read the specifications on http://www.id3.org/.

Note: for each text frame (frame names starting with a T) the encoding of the value strings can be defined in the frame header. ID3v2.3 supports UTF-16 and ISO-8859-1 encoded strings; ID3v2.4 has addional support for UTF-8 and UTF-16BE. MusicBrainz Identifiers must be encoded as ISO-8859-1 strings.

ID3v2 frames can be stored in any order in the MP3 file.

General Frames

The following frames are used for the regular information from the database: TPE1 for the main artist name, TALB for the album name, TIT2 for the track title, TRCK for the track number on the album (without total number of tracks in the old MusicBrainzTagger and PicardTagger < 0.5.1 and with totals since PicardTagger 0.5.1).

TCMP is a nonstandard tag that defines a track as being part of a compilation (VA album) if set to the string value "1" or part of a single artist album if set to the string value "0". It is used by the iTunes music player software.

Artist Sortname

The artist sortname is stored in the TSOP frame for ID3v2.4 and in the experimental XSOP frame for ID3v2.3.

Release Date

ID3v2.3 is missing a standard frame for a detailed date. Therefore the experimental XDOR frame is used and the additional TORY that stores the year of release as a 4 digit number only is used.

In ID3v2.4 only the TDRL frame is used to store the complete release date in YYYY-MM-DD format.

Music Brainz Identifier

To store the MusicBrainzIdentifiers in an ID3v2 tag, you will need to use a UFID frame for the TrackID, and some user defined TXXX text frames for the artist, album, album artist and PUID as well as the album status and type. Please note that for ease of use these ID3 frames are specified to use ISO 8859-1. However, the types of characters used to express these tags are the same in ISO 8859-1 and UTF-8, since UTF-8 is backward compatible with 7-bit ASCII.

MusicBrainz Track Identifier

The MusicBrainz Track Id is the internal unique ID MusicBrainz defines for every object in its database. It is stored in the special UFID frame, that contains two parts: The Owner Identifier selects the namespace where the identifies is unique. For MusicBrainz it is be guaranteed that this ID is unique on the server; therefore the default owner identifier is http://musicbrainz.org. The second part is the TrackID for the track as stored in the MusicBrainz database.

MusicBrainz Artist Identifier

The MusicBrainz Artist Id is stored in a user defined TXXX text information frame, encoded as a 0x00 terminated ISO-8859-1 string. Its value is the ArtistID as stored in the MusicBrainz database.

MusicBrainz Album Identifier

The MusicBrainz Album Id is stored in a user defined TXXX text information frame, encoded as a 0x00 terminated ISO-8859-1 string. Its value is the AlbumID as stored in the MusicBrainz database.

MusicBrainz Album Artist Identifier

The MusicBrainz Album Artist Id is used to store an artist identifier for the album the track is on. This is only for VariousArtistsReleases where the tracks have multiple different artists and the album itself is by the special artist VariousArtists with ArtistID 89ad4ac3-39f7-470e-963a-56509c546377.

It is stored in a user defined TXXX text information frame, encoded as a 0x00 terminated ISO-8859-1 string. Its value is the ArtistID as stored in the MusicBrainz database.

MusicBrainz Album Status

This stores the status of the album the track is from, encoded as a 0x00 terminated ISO-8859-1 string. At the moment the possible values are: official, promotional, bootleg.

MusicBrainz Album Type

This type the status of the album the track is from, encoded as a 0x00 terminated ISO-8859-1 string. Possible values are: album, single, live e.a.

MusicIP PUID Identifier

The MusicIP PUID is stored in a user defined TXXX text information frame, encoded as a 0x00 terminated ISO-8859-1 string. Its value is the track's PUID as stored in the MusicBrainz database.

Vorbis Comments

In contrast to the various possibilities of ID3 tagging, Vorbis and FLAC tags are stored in a unified way. All strings are encoded as UTF-8, tagged data is stored in the so called comment header, each key value pair is specified as a tripplet of the form: [length in bytes][key]=[value]. Strings are not terminated. For proposed extensions to the default comment tags see Ogg Vorbis Comment Field Recommendations and Extending Vorbis Comments.

Note that RELEASECOUNTRY is no standard tag and not mentioned in any of the proposals; DATE was originally specified to store the recording date while MusicBrainz defines only release dates.

MP4 (iTunes) tags

There is no official MPEG standard on how to embed metadata tags in MP4 files. Apple iTunes therefore started to use their own solution in order to be able to store metadata tags. Those iTunes tags quickly became the de-facto standard for metadata tags within MP4 files.

Metadata tags within MP4 files are stored within so-called "boxes" (also known as "atoms"). Those boxes can contain other boxes as childs within them. Metadata tags to be used with iTunes come in the moov.udta.meta.ilst hierarchy. The boxes located directly under the ilst box have specific names, which are listed in the overview table above.

There also is one special metadata box: the ---- box. It has the three child boxes mean, name, and data. The mean box always carries the string "com.apple.iTunes", while the name box holds the actual metadata identifier string. If the tag table above therefore lists, for example, an MP4 tag name of "----:MusicBrainz Disc Id", then this actually means that a ---- box is used with a child name box which holds "MusicBrainz Disc Id".


OriginalVersion