Fixing MusicBrainz tags mangled by ffmpeg

I have some Picard-tagged FLAC files that I transcoded to MP3 using ffmpeg.

I made some changes to my Picard settings, and I’d like to retag my MP3s without needing to transcode them.

ffmpeg copied the MusicBrainz tags verbatim, and FLAC and MP3 use different tag names, so Picard isn’t automatically recognizing the MP3s when I add them to Picard, so I’m trying to write a script to try to fix the MP3 tag names.

Try as I might, I cannot get Picard to automatically recognize the MP3s.

I’ve already tried using the following mapping:

MUSICBRAINZ_ALBUMARTISTID -> Musicbrainz Release Artist
MUSICBRAINZ_ARTISTID -> MusicBrainz Artist Id
MUSICBRAINZ_TRACKID -> MusicBrainz Recording Id
MUSICBRAINZ_ALBUMID -> MusicBrainz Release Id
MUSICBRAINZ_RELEASEGROUPID -> MusicBrainz Release Group Id
MUSICBRAINZ_RELEASETRACKID -> MusicBrainz Track Id

But Picard refuses to use the new tags.

And when I try to retag a track manually with tags that I’ve fixed with my script, it shows me this:

All the tags are the same, and the names are the same, but it still doesn’t recognize them, and will put duplicates in if asked to.

Is there something I’me missing? Is some subtle way that I might not be adding the tags correctly?

If I go ahead and tell PIcard to tag the track, Picard shows duplicate tags:

I’m totally flummoxed :face_with_raised_eyebrow:

Also, which tags does Picard use to automatically recognize tracks? I’ve been trying to translate all MusicBrainz tags, but I might as well only bother with the ones that actually make a difference.

This was kindly solved by some good people in the IRC channel. I didn’t know about the UFID tag, which I need to map the track id to. Man I was confused >_<

3 Likes

For others looking at this, the discussion is at

https://chatlogs.metabrainz.org/brainzbot/musicbrainz/msg/4702403/

2 Likes