[WS] MusicBrainz expanded

Intro

This Mp3tag Web Sources Script (WSS) collects metadata from MusicBrainz using the JSON-based MusicBrainz API.

Please scroll down for the download- and installation instructions.

Like any other Web Sources Script it will add tags and metadata to all your selected files.
Metadata in already existing tags will be replaced without any further information or reconfirmation!

Script Info - Functionality

The main objectives for this WSS are:
1.) Best possible compatibility to MusicBrainz official tagger "Picard"
2.) Using JSON (instead of XML)

This script is working best with a complete release (most of us are using the term "Album").
The first overview "List of search results..." after a search by

  1. Artist + Album
    or
  2. Artist + Album + Tracks
    or
  3. Artist + Album + Tracks + MediaType + Country
    or
  4. ASIN
    or
  5. Barcode
    or
  6. Catalog number
    or
  7. Album-Artist + Album (thanks to @make-nz!)

is listing all available relases/albums with the additional columns "No of media" (1), Disambiguation (2), ASIN (3), Barcode (4) and Status (5). This should help you to identify the correct release for your tracks ready to be tagged.

Since May 2024 you can also search by MusicBrainz Album ID, but this will not show you the above list of search results, because this MB ID is unique to one release. You directly get the "Adjust tag information" window.

The main "Adjust tag information" window let you check if you really have found the matching release.
Most important are the track titles and track lengths. Sometimes tracks do not appear in the correct sort order. Then you can Move Up or Move Down your local filename on the right side to the correct place.

In addition to the usual release-level tags (like ARTIST, ALBUM, YEAR, TRACK, TITLE) you will get the following expanded tags ***:
ALBUMARTIST
ALBUMARTISTSORT
ARTISTS
ARTISTSORT
ASIN
Barcode
Catalog Number
COMPILATION
DATE
DISAMBIGUATION
DISCNUMBER
ISRC
LANGUAGE
MB_ArtistCredit_Artist_Country
MEDIATYPE
MUSICBRAINZ_ALBUMARTISTID
MUSICBRAINZ_ALBUMID
MUSICBRAINZ_ALBUMRELEASECOUNTRY
MUSICBRAINZ_ALBUMSTATUS
MUSICBRAINZ_ALBUMTYPE
MUSICBRAINZ_ARTISTID
MUSICBRAINZ_RELEASEGROUPID
MUSICBRAINZ_RELEASETRACKID
MUSICBRAINZ_TRACKID
ORIGINALYEAR
ORIGYEAR
PRODUCER (only if set on release-level)
PUBLISHER
QUALITY
SCRIPT
SetSubtitle

The following tags are no more available since v2.00, because they are available on track-level only.
INVOLVEDPEOPLE
PERFORMING_ORCHESTRA
PERFORMING_ORCHESTRA_BEGINDATE
PERFORMING_ORCHESTRA_ENDDATE

Maybe I will find some time to write an additional WSS-Script "MusicBrainz involved"...
(I make no promises)

Can I reduce the number of tags?
How can I strip the tags down to the one I need?

If you don't need all tags *** offered by this Web Sources Script, you can easily deselect them.
Since Mp3tag v3.13 you can select or deselect the checkboxes in the "Adjust tag information" result window in front of any tag in the sections "Metadata Title" or "Metadata Album".

If you don't need all the dozens of tags *** offered by this Web Sources Script, you can easily remove them inside this script. Just open the linked `*.inc` file in a text editor and scroll down to the bottom of the script. Remove the # sign in front of every tag not needed. *Example:* If you don't need the INVOLVEDPEOPLE tag, go to the line with `#set "INVOLVEDPEOPLE"` and change it to `set "INVOLVEDPEOPLE"` Save the file.

*** The number of tags highly depends on the existing data at MusicBrainz.
Not every release has a complete set of all tags. All these metadata have been provided by users like you and me.

Script Info - Exceptions

The exceptions to the main objective "compatibility to MB Picard" are:
a) This script does NOT manipulate the official MusicBrainz metadata in any way.

  • That means, there is no change to lowercase for the primary and secondary "Release Type" like "Album" or "Compilation" by default.
    Since v2.00 you can now change this in the script settings
  • There is no change to lowercase for the "Release Status" like "Official" by default.
    Since v2.00 you can now change this in the script settings
  • There is no apostrophe replacement for ' with ' and no GB -> UK country replacement.
  • There is no ISRC formatting.
  • There is no filtering of duplicate Catalog-Numbers from different Labels.
  • All metadata are written 1:1 as delivered from the source.
  • If you want to format such metadata, please use the according Actions from Mp3tag.

b) The INVOLVEDPEOPLE tag needs data from track-level and will no more be filled with this script since June 2024 and v2.00
b) This script does NOT map any source tag to target tag.

  • That means, there is no "live sound" transformed into Engineer or "orchestrator" into Arranger.
  • All types of relationships will be filled 1:1 into the INVOLVEDPEOPLE tag.
    There are only a few exceptions with own tags like COMPOSER, CONDUCTOR, LYRICIST, WORK, WRITER
    (Hint: MB Picard also shows the Mixer or Engineer or Producer as separate tags, but merge it together with all kind of Instrument- and Vocal-Performers into the same INVOLVEDPEOPLE tag).

c) If you want to modify the tag SetSubtitle in both programs, Mp3tag AND MB Picard, you have to add this two Tagger Script Lines in MB Picard (Options -> Options -> Scripting -> Tagger Scripts):

   $set(SetSubtitle,%discsubtitle%)
   $unset(discsubtitle)

Details about this topic.

Why the version jump from v1.30 to v2.00?

This Web Sources Script was rewritten from scratch.

With this new version v2.00 I introduce "Settings":

You don't need to modify the script code anymore, if you want to
a) always fill the DISCNUMBER, also for releases with only one media
    -> You get 1/1 for 1 disc media
b) see some more non-standard metadata. This is experimental and slow.
c) see some more non-standard metadata. This is experimental and slow.
d) convert the ALBUMSTATUS and ALBUMTYPE to lowercase like in MB Picard
    -> Album -> album, Official -> official, EP -> ep
e) download the album front picture from Cover Art Archive
    -> If you DON'T want to download and see album art, then disable this setting
f) Download the small thumbnail album pictures for preview in 'List of search results'
    -> If you DON'T want to download the various small cover thumnails, then disable this setting

On Windows you can also hover over the settings to see some help text.

What about the Cover Art?

Some Cover Art pictures from MusicBrainz can be huge!
You will find pictures with more then 4000x Pixels and sizes about 50 MB and more.
Downloading and preview take a lot of time, because the Cover Art Archive isn't the fastest delivering source. If you think Mp3tag freezes during the search for tag data, then it is very likely that a huge cover will be downloaded. Please be patient.

Good news:
Since Mp3tag v3.11h (released 2022-01-14) one of the 4 available "MusicBrainz Cover Size" in File -> Options -> Tag Sources: 250 Pixels, 500 Pixels, 1200 Pixels or the Original size can be configured.

This script doesn't resize the picture in any way, it just download the predefined size from the MusicBrainz Cover Art Archive. If you like the biggest available cover picture (and are patiently waiting for the download), then configure the size to "Original".

Download

Newest Mp3tag, at least v3.27c
Important: This WSS will NOT work with older Mp3tag versions then v3.27c

Current v2.31: MusicBrainz expanded (v2.31).zip (23,9 KB) / Modified: 2025-08-23

Previous v2.30: MusicBrainz expanded (v2.30).zip (23,8 KB) / Modified: 2025-04-22
Previous v2.20: MusicBrainz expanded (v2.20).zip (21,9 KB) / Modified: 2024-10-10

Old v1.30: MusicBrainz expanded v1.30.zip (12,4 KB) / Modified: 2024-05-10
Previous old: MusicBrainz expanded v1.20.zip (11,2 KB) / Modified: 2022-04-28

How to Install

  1. Download the above .zip and extract it to the %appdata%\mp3tag\data\sources directory
    (Just hit Win+R and copy & paste %appdata%\mp3tag\data\sources)
    Or you can click on menu File -> Open configuration folder and then open the folder \data and open the subfolder \sources
  2. You can access all WS scripts either by using the menu Tag sources or by right-clicking on the selected tracks and Tag sources->....

Version History

2025-08-23: v2.31 - Bugfix release, details see here
2025-04-22: v2.30 - One new column, one addition, one fix, details see here
2024-10-10: v2.20 - One addition, details see here
2024-08-27: v2.10 - One addition, details see here
2024-06-19: v2.00 - One addition, two new features and four removed tags, details see here
2024-05-10: v1.30 - One addition and one new feature, details see here
2022-04-28: v1.20 - One addition and one fix, details see here
2022-01-25: v1.01 - Two changes and one fix, details see here
2022-01-15: v1.00 - First Public Release
(special thanks to @Florian and @ohrenkino for the support and tests of the preview-releases)

Last but not least

Please let me know if you have found any error or inconsistency using this script.
Attach a screenshot with your current result and your expected values.
Don't forget to note the MusicBrainz release ID, where the source data is available.
If you prefer, write such infos in a PM.

8 Likes

Thank you, this is great, i will try it.

1 Like

I cant find any results, the search works but the album it self dont:

also what this mean, please?:

Do you use the newest Mp3tag v3.11h?

What was your used search string (Album? Artist?)


Ups, the "releaseansicht" is a fixed string. The help says

Name of the web source, e.g. Discogs.com

I should change the line #25 in the *.inc file
[Name]=MusicBrainz: Releaseansicht
to something like "MusicBrainz" only.

Just as a side note:
If you have 5 local tracks (lower right in your screenshot).
Why do you choose the Single release (Digital media) with only 1 track?
Would one of the listed releases with 5 tracks not be a better fit?

Thank you i thought i updated but i was wrong. It works.
i use the version date in mine :slight_smile: :
imagem

Regarding the side note, i was testing it.

Nice work thank you.

1 Like

Thank you for the feedback! :+1:

1 Like

2022-01-25 - Update v1.01

  • CHG: [Name] to MusicBrainz (thanks to @Romano)
  • FIX: Only fill metadata to matching number of tracks
  • CHG: Comment tag will not be written anymore
2 Likes

2022-04-28 - Update v1.20

  • ADD: Performing Orchestra with Begin- & End-Date
  • FIX: Trim "off" added for INDEX-part too (thanks to @poster)
    (no more space trimming in release selection window)
1 Like

This is such a great script, but would it be possible to add search by Musicbrainz AlbumID, or can one of the current options be changed to that?

I will have a look if this is possible.

Just to be sure:
You ask for an additional search like the existing one for Barcode, but with MB AlbumID instead, right?
In this case you get only one matching result with such an MB AlbumID, correct?

As far as I'm aware the Musicbrainz AlbumID is unique per album, so you should only ever get 1 release per ID.

With "MusicBrainz AlbumID" you mean this one:
0022f00b-94ef-4af4-b94a-31395aa7c6b5
for this example release?

Yes that one I'm after thanks.

1 Like

@LyricsLover
Great tool! I like it much better than Picard for some reason, feeling more in control.
Thanks for creating this !

Could there be an option to have the track number without the total tracks and preferably with leading zeros if >9 tracks?
Now that I'm typing this realise I could also leave the track number out for tagging so old style remains. Anyhow thanks a lot for this tool.

1 Like

You're welcome and thank you.

Technically, it would be possible:

but I suggest that to you use Actions for everything that you like to see in another format or syntax in your environment.
For your idea to "leave the track number out for tagging" you just have to click and deactivate the checkbox in front of TRACK in the upper left "Adjust tag information" part of the found metadata result.
image

Great script!
I have several files that contain ISRC code tags. It would be convenient to enable a search based on the ISRC code. Could someone guide me on how to modify the existing code to make this functionality possible?

If you tell me one or two releases on MusicBrainz with ISRC, I can try to provide such an additional search possibility.

Some samples:
USUM70837229 (Kanye West - Love Lockdown)
http://musicbrainz.org/ws/2/recording/?query=isrc:USUM70837229
USCJY1431369 (Taylor Swift - Bad Blood)
http://musicbrainz.org/ws/2/recording/?query=isrc:USCJY1431369

Thank you for this examples.

My current MusicBrainz script is searching by release ("release" is the MusicBrainz term for "Album")
http://musicbrainz.org/ws/2/release
not a single recording
http://musicbrainz.org/ws/2/recording

The search for a release seems to be possible with informations about Artist, Album, ASIN, Barcode, Catalog Number and AlbumID. But unfortunately not by ISRC.
At least, I can't find a working query-syntax for ISRC and a ws/2/release.

You would have to build a new script (maybe based on mine) using a recording-query, not a release-query.

Please let me know If you want to try that.

In the meantime I continue to search for a possibility, but I'm not very confident.

2024-05-10 - Update v1.30

  • ADD: Added a new possibility to "Search by MB AlbumID" (thanks to @Kareha)
    image

  • NEW: Showing cover art thumbnail in the search query result overview
    -> This feature was introduced with Mp3tag 3.25c
    You need at least Mp3tag 3.25c to see this cover art thumbnails!

1 Like