Cover Art Archive

From MusicBrainz Wiki
Revision as of 03:55, 30 September 2011 by RobertKaye (talk | contribs)

Introduction

The Cover Art Archive is a cooperation between the Internet Archive and MusicBrainz that aims to level the playing field for music cover art. Currently, there is no central repository of music cover art (e.g. the images of Audio CD covers) that is freely and easily accessible. The Cover Art Archive aims to fix this situation by creating a collection of cover art that is stored on the Internet Archive's servers and curated by the MusicBrainz community. The images for any release (e.g. an Audio CD) are indexed by MusicBrainz Release Id (MBID) and can be fetched by constructing a URL that is based on the MBID.

Fetching Cover Art

To construct the URL for the original size front cover for a release with a given MBID, replace (MBID) in the URL below with the MBID of the release:

 http://archive.org/download/mbid-(MBID)/mbid-(MBID)-front-000.jpg

For example, to fetch the cover art of Portishead's Dummy CD Audio, which has the MBID of 8f468f36-8c7e-4fc1-9166-50664d267127, you construct the following URL:

 http://archive.org/download/mbid-8f468f36-8c7e-4fc1-9166-50664d267127/mbid-8f468f36-8c7e-4fc1-9166-50664d267127-front-000.jpg

Then all you need to do is an HTTP GET on that URL to download the cover art. If you get a Not Found (404) error, this release does not have cover art in MusicBrainz. Note: The MBID is repeated in the URL because these cover art images are part of the normal Internet Archive collection and their naming convention is friendly to their visitors who might download individual images via their web browser. In order to allow the user to save multiple images to a directory on their own computer without overwriting existing files, each of the files names should be unique.

Supported Image Types

The URL structure allows fetching different types of cover art images and different resolutions of the images. All the details of the URL structure are shown here:

 http://archive.org/download/mbid-(MBID)/mbid-(MBID)-(type)-(page)[-(size)].jpg

In addition to the MBID already mentioned, a type is supported. Type can be one of:

 front, back, inner, booklet, sleeve, medium, obi, spine, box, other  

(TODO: define each of these)

Each of these types define a portion of cover art that could be stored. Not every release will have each of these, but this list conveys all the things that can be stored in the Cover Art Archive. The page argument indicates the zero based page for a given type. The front cover of a release can always be found at page 000 and if the release includes a booklet, you can fetch each of the pages of the booklet by fetching:

 http://archive.org/download/mbid-8f468f36-8c7e-4fc1-9166-50664d267127/mbid-8f468f36-8c7e-4fc1-9166-50664d267127-booklet-000.jpg
 http://archive.org/download/mbid-8f468f36-8c7e-4fc1-9166-50664d267127/mbid-8f468f36-8c7e-4fc1-9166-50664d267127-booklet-001.jpg
 . . .


Finally, the optional (size) argument allows some control over which size of image you would like to fetch. If you would like to fetch the original size that was uploaded to the Cover Art Archive, omit the size parameter. If you would like the image where the largest side of the image is 500 pixels tall or wide, include the -500 size argument. Initially the archive will only contain original sized images and 500 pixel sized images. If you need an image size that is smaller than 500, download the 500 sized image and re-size the image.