MusicBrainz Tag: Difference between revisions

From MusicBrainz Wiki
Jump to navigationJump to search
(finally *sigh* (Imported from MoinMoin))
((Imported from MoinMoin))
(6 intermediate revisions by the same user not shown)
Line 7: Line 7:
==ID3v2 Tag specifications==
==ID3v2 Tag specifications==


See [[ID3v2 Tags|ID3v2Tags]] for a list of proposed frames tagger applications could write.
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.

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


===General Frames===
===General Frames===


The following tags are used for the regular information from the database:
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.
{| border="1"
|-
| TPE1: || [Main artist name]
|-
| TALB: || [Album name]
|-
| TIT2: || [Track title]
|-
| TRCK: || [Track number in album]
|}


'''TCMP''' is a nonstandard tag that defines a track as being part of a compilation (VA album) if set to '''1''' or part of a single artist album if set to '''0'''. It is used by the iTunes music player software.
Also the non-standard frame <code><nowiki>TCMP</nowiki></code> is used for iTunes' "Part of Compilation" description. It is 0 for a single artist album and 1 for a multiple artist album.


====Artist Sortname====
====Artist Sortname====


The artist sortname is stored in the '''TSOP''' frame for ID3v2.4 and in the experimental '''XSOP''' frame for ID3v2.3.
The artist sortname should really be stored in a ID3v2.4 frame called <code><nowiki>TSOP</nowiki></code>, but that is not supported under ID3v2.3. For writing ID3v2.3 tags, a <code><nowiki>XSOP</nowiki></code> frame that is formatted like a regular text frame should be used. You should never write a <code><nowiki>XSOP</nowiki></code> frame in ID3v2.4 tag.
{| border="1"
|-
| XSOP: || [Artist sortname]
|}

The text encoding field of this frame should be set to whatever encoding is being used for the <code><nowiki>TPE1</nowiki></code>, <code><nowiki>TIT2</nowiki></code> and <code><nowiki>TALB</nowiki></code> track. Given that [[MusicBrainz]] uses UTF-8 to store its data, you should choose encoding $03 (UTF-8) if you plan to store MB data without changing its encoding. '''However, the UTF-8 encoding is only available in ID3v2.4.''' Alternatively use encoding $01 (UTF-16) if you're writing ID3v2.3 or earlier tags. (see [http://www.id3.org/id3v2.4.0-frames.txt ID3v2.4 specification] for more details on <code><nowiki>X???</nowiki></code> frames)


====Release Date====
====Release Date====


ID3v2.3 is missing a standard frame for a detailed date. Therefore an extra frame <code><nowiki>XDOR</nowiki></code> is added. So, in ID3v2.3:
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.
{| border="1"
|-
| TORY: || [Release year]
|-
| XDOR: || [Complete release date]
|}


In ID3v2.4 only one frame 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.
{| border="1"
|-
| TDRL: || [Complete release date]
|}


===Music Brainz Identifier===
===Music Brainz Identifier===


To store the [[MusicBrainz Identifier|MusicBrainzIdentifier]]<code><nowiki></nowiki></code>s in an ID3v2 tag, you will need to use a <code><nowiki>UFID</nowiki></code> frame for the Track Id, and up to four <code><nowiki>TXXX</nowiki></code> user defined text frames for the artist, album, album artist and trm identifiers. Please note that for ease of use the ID3 frames are specified to use ISO 8859-1. However, the types of characters used to express these tags are the same in ISO 8895-1 and UTF-8, since UTF-8 is backward compatible with 7-bit ASCII.
To store the [[MusicBrainz Identifier|MusicBrainzIdentifier]]<code><nowiki></nowiki></code>s in an ID3v2 tag, you will need to use a '''UFID''' frame for the Track Id, and some user defined '''TXXX''' text frames for the artist, album, album artist and trm identifiers 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 8895-1 and UTF-8, since UTF-8 is backward compatible with 7-bit ASCII.


====MusicBrainz Track Identifier:====
====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 <code><nowiki>http://musicbrainz.org</nowiki></code>. The second part is the UUID for the track as stored in the [[MusicBrainz]] database.
<ul><li style="list-style-type:none">UFID frame
</ul>
{| border="1"
|-
| Owner identifier: || <code><nowiki> http://musicbrainz.org </nowiki></code>
|-
| Identifier: || [mb track uuid]
|}
<ul><li style="list-style-type:none">(see section 4.1 in the [http://www.id3.org/id3v2.4.0-frames.txt ID3v2.4 specification])
</ul>


====MusicBrainz Artist Identifier:====
====MusicBrainz Artist Identifier:====


The ''MusicBrainz Artist Id'' 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 artist UUID as stored in the [[MusicBrainz]] database.
<ul><li style="list-style-type:none">TXXX User defined text information frame
</ul>
{| border="1"
|-
| Text encoding || $00 (ISO-8859-1)
|-
| Description || <code><nowiki> MusicBrainz Artist Id </nowiki></code>
|-
| Value: || [mb artist uuid]
|}
<ul><li style="list-style-type:none">(see section 4.2.6 in the [http://www.id3.org/id3v2.4.0-frames.txt ID3v2.4 specification])
</ul>


====MusicBrainz Album Identifier:====
====MusicBrainz Album Identifier:====


The ''MusicBrainz Album Id'' 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 album UUID as stored in the [[MusicBrainz]] database.
<ul><li style="list-style-type:none">TXXX User defined text information frame
</ul>
{| border="1"
|-
| Text encoding || $00 (ISO-8859-1)
|-
| Description || <code><nowiki> MusicBrainz Album Id </nowiki></code>
|-
| Value: || [mb album uuid]
|}
<ul><li style="list-style-type:none">(see section 4.2.6 in the [http://www.id3.org/id3v2.4.0-frames.txt ID3v2.4 specification])
</ul>


====MusicBrainz Album Artist Identifier:====
====MusicBrainz Album Artist Identifier:====


The ''MusicBrainz Album Id'' is used to store an artist identifier for the album the track is on. At the moment, this is only used for Various Artists albums where the tracks have multiple different artists and the album itself is by the special artist ''Various Artists'' with UUID <code><nowiki>89ad4ac3-39f7-470e-963a-56509c546377</nowiki></code>.
This identifier is used to indicate the artist for the album if the tracks on the album are from various artists. Currently, only an artist id of 89ad4ac3-39f7-470e-963a-56509c546377 is being used to indicate that this track comes from a various artist album. If this field is not present, the track comes from an album where all tracks were created by the same artist.

<ul><li style="list-style-type:none">TXXX User defined text information frame
It 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 artist UUID as stored in the [[MusicBrainz]] database.
</ul>

{| border="1"
====MusicBrainz Album Status====
|-

| Text encoding || $00 (ISO-8859-1)
This stores the status of the album the track is from, encoded as a <code><nowiki>0x00</nowiki></code> terminated ISO-8859-1 string. At the moment the possible values are: ''official'', ''promotional'', ''bootleg''.
|-

| Description || <code><nowiki> MusicBrainz Album Artist Id </nowiki></code>
====MusicBrainz Album Type====
|-

| Value: || [mb album artist uuid]
This type the status of the album the track is from, encoded as a <code><nowiki>0x00</nowiki></code> terminated ISO-8859-1 string. Possible values are: ''album'', ''single'', ''live'' e.a.
|}
<ul><li style="list-style-type:none">(see section 4.2.6 in the [http://www.id3.org/id3v2.4.0-frames.txt ID3v2.4 specification])
</ul>


====MusicBrainz TRM Identifier:====
====MusicBrainz TRM Identifier:====


The ''MusicBrainz TRM Id'' 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 TRM UUID as stored in the [[MusicBrainz]] database.
<ul><li style="list-style-type:none">TXXX User defined text information frame

</ul>
===Overview===

{| border="1"
{| border="1"
|-
|-
| '''ID3v2.3 frame''' || '''ID3v2.4 frame''' || '''Value''' || '''Description''' (TXXX only)
| Text encoding || $00 (ISO-8859-1)
|-
| TPE1 || TPE1 || [artist name] ||
|-
| TALB || TALB || [album title] ||
|-
| TIT2 || TIT2 || [track title] ||
|-
|-
| TRCK || TRCK || [track number] ||
| Description || <code><nowiki> MusicBrainz TRM Id </nowiki></code>
|-
|-
| XSOP || TSOP || [artist sortname] ||
| Value: || [mb trm uuid]
|-
| TORY || --- || [release year] ||
|-
| XDOR || TDRL || [release date] ||
|-
| TXXX || TXXX || [artist UUID] || <code><nowiki>MusicBrainz</nowiki></code> Artist Id
|-
| TXXX || TXXX || [album UUID] || <code><nowiki>MusicBrainz</nowiki></code> Album Id
|-
| TXXX || TXXX || [album artist UUID] || <code><nowiki>MusicBrainz</nowiki></code> Album Artist Id
|-
| TXXX || TXXX || [album status] || <code><nowiki>MusicBrainz</nowiki></code> Album Status
|-
| TXXX || TXXX || [album type] || <code><nowiki>MusicBrainz</nowiki></code> Album Type
|-
| TXXX || TXXX || [TRM UUID] || <code><nowiki>MusicBrainz</nowiki></code> TRM Id
|-
| UFID || UFID || [track UUID] || (OwnerID is: <code><nowiki>http://musicbrainz.org</nowiki></code>)
|-
| TCMP || TCMP || if VA then 1 else 0 ||
|}
|}
<ul><li style="list-style-type:none">(see section 4.2.6 in the [http://www.id3.org/id3v2.4.0-frames.txt ID3v2.4 specification])
</ul>


==Vorbis/FLAC comment specifications==
==Vorbis/FLAC comment specifications==
Line 188: Line 159:
|}
|}


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

Authors: [[User:DonRedman|DonRedman]], [[User:Shepard|Shepard]], [[User:Fuchs|Fuchs]][http://www.musicbrainz.org/docs/specs/metadata_tags.html OriginalVersion]


[[Category:To Be Reviewed]] [[Category:Documentation]]
[[Category:To Be Reviewed]] [[Category:Documentation]]

Revision as of 00:47, 28 October 2005

MusicBrainz Metadata Tags (ID3 and Vorbis/FLAC Comment)

Status: Alert.png The information on this page is outdated. There are a lot more tags by now, which are all not documented here.

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.

ID3v2 Tag specifications

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 (TXXX) 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.

TCMP is a nonstandard tag that defines a track as being part of a compilation (VA album) if set to 1 or part of a single artist album if set to 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 Track Id, and some user defined TXXX text frames for the artist, album, album artist and trm identifiers 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 8895-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 UUID 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 artist UUID 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 album UUID as stored in the MusicBrainz database.

MusicBrainz Album Artist Identifier:

The MusicBrainz Album Id is used to store an artist identifier for the album the track is on. At the moment, this is only used for Various Artists albums where the tracks have multiple different artists and the album itself is by the special artist Various Artists with UUID 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 artist UUID 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.

MusicBrainz TRM Identifier:

The MusicBrainz TRM Id 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 TRM UUID as stored in the MusicBrainz database.

Overview

ID3v2.3 frame ID3v2.4 frame Value Description (TXXX only)
TPE1 TPE1 [artist name]
TALB TALB [album title]
TIT2 TIT2 [track title]
TRCK TRCK [track number]
XSOP TSOP [artist sortname]
TORY --- [release year]
XDOR TDRL [release date]
TXXX TXXX [artist UUID] MusicBrainz Artist Id
TXXX TXXX [album UUID] MusicBrainz Album Id
TXXX TXXX [album artist UUID] MusicBrainz Album Artist Id
TXXX TXXX [album status] MusicBrainz Album Status
TXXX TXXX [album type] MusicBrainz Album Type
TXXX TXXX [TRM UUID] MusicBrainz TRM Id
UFID UFID [track UUID] (OwnerID is: http://musicbrainz.org)
TCMP TCMP if VA then 1 else 0

Vorbis/FLAC comment specifications

To store the MusicBrainz identifiers in an Ogg Vorbis comment stream or a FLAC file you will need to use the following comments. Remember that Vorbis/FLAC comments fields are in UTF-8, and they should follow these recommendations.

MusicBrainz Track Identifier:

Comment name: MUSICBRAINZ_TRACKID
Comment value: [mb track uuid]

MusicBrainz Artist Identifier:

Comment name: MUSICBRAINZ_ARTISTID
Comment value: [mb artist uuid]

MusicBrainz Album Identifier:

Comment name: MUSICBRAINZ_ALBUMID
Comment value: [mb album uuid]

MusicBrainz Album Artist Identifier:

See comments above in ID3 section.

Comment name: MUSICBRAINZ_ALBUMARTISTID
Comment value: [mb album artist uuid]

MusicBrainz TRM Identifier:

Comment name: MUSICBRAINZ_TRMID
Comment value: [mb trm uuid]

MusicBrainz Artist Sortname

Comment name: MUSICBRAINZ_SORTNAME
Comment value: [mb artist sortname]

Authors: DonRedman, Shepard, FuchsOriginalVersion