User:LordSputnik/Unified Metadata Format

From MusicBrainz Wiki
< User:LordSputnik
Revision as of 23:56, 5 December 2013 by LordSputnik (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Unified Metadata Format is a proposed structure for storing data within and exchanging data between metadata applications. It is based on the JSON format.

Key Features

  • JSON-based - supports key-value pairs, nesting and lists.
  • A standard set of key names which can be mapped to both MusicBrainz webservice data and tags in common metadata formats.
  • Non-standard names are stored in common metadata formats in a block, so they aren't lost on conversion and can be read back into UMF if needed.
  • Everything is an entity or a basic value (string, integer, date, etc.) - entities always have mappings to MusicBrainz IDs, and sometimes other IDs too.

Basic Conceptual Types

string
A sequence of unicode characters.
integer
A whole number.
decimal
A number which may have a decimal point.
datetime
A combination of a date and a time.
time
Just a time, with no particular point of reference.
binary
A piece of base64 encoded binary data.
object
An object containing a collection of keys.
list
A list of values.

Each key is associated with a particular type - the value for the key should be of that type.

Entity Properties

musicbrainz
specifies a MusicBrainz MBID related to the entity.
amazon
specifies an Amazon ASIN related to the entity.
image
an image representing the entity.

Release Properties

Key Description Standard Type ID3 Mapping
title The title of the release string TALB
artist The artists credited on the release string TPE2

Recording Properties

Key Description Standard Type ID3 Mapping
title The title of the recording string TIT2
artist The artists featured on the recording string TPE1

Track Properties

Key Description Standard Type ID3 Mapping
title The title of the track, usually as given on the release string TIT2
artist The artists performing on the track, as credited on the release string TPE1
id The number or text used to identify the track. Commonly referred to as the track number. string TPE2
position The position of the track within the medium. integer TRCK
medium The number of the medium that the track comes from. integer TPOS

Image Properties

Key Description Standard Type ID3 Mapping
mime The mimetype of the image file. string
data The data of the image. binary
url A URL where the image can be accessed. string

Example

   {
       "release": {
           "title":"Vol. 3: (The Subliminal Verses)",
           "musicbrainz":"cffc2fa1-0bc1-3dc0-b865-d79533d79dbc",
           "discogs":1826346,
           "media":[
               {
                   "tracks":[
                       {
                           "id":0,
                           "recording": {
                               "musicbrainz":"77d7867d-c6ed-406c-9bbb-59756f9f8ded"
                           }
                   ]
               }
           ]
       }
   }