Opened 11 years ago

Closed 11 years ago

#5820 closed enhancement (fixed)

Improvements to Musicbrainz compilation album detection

Reported by: drdaz7 at gmail dot com Owned by:
Priority: minor Milestone: 0.22
Component: mythmusic Version: 0.21-fixes
Severity: medium Keywords: musicbrainz compilation albumartist
Cc: Ticket locked: no

Description

I recently began (re)tagging my music using Musicbrainz Picard. It's a fantastic piece of software. I ran into some issues with compilation albums in mythmusic, however as each track on the album was being placed separately under the track artist name instead of the album artist name.

I did a little research and found that:

a) A number of others have the same problem

b) There is code in mythmusic which is supposed to remedy this (ticket #3697)

I found that the code in mythmusic checks for the special Musicbrainz Various Artists album artist ID, and only then will it class the album as a compilation. In addition, it checks the 'TPE4' tag in mp3 files for the compilation artist.

This leaves us the following issues:

a) When a compilation album is attributed to an album artist other than 'Various Artists' in the Musicbrainz database, the files will not be tagged such that mythmusic recognizes them as compilations.

b) In mp3 files, mythmusic is checking TPE4 for album artist info, when Picard is writing that info in TPE2 (see http://wiki.musicbrainz.org/PicardTagMapping for details on where Picard writes its information).

I have written a patch against 0.21-fixes which helps the situation (for me at least) by:

a) Checking the 'release type' flag for the keywords 'compilation' or 'soundtrack' as additional hints that an album is a compilation.

b) Checking TPE2 in mp3 files instead of TPE4 for album artist info.

I have been using these alterations myself for a number of weeks now, and it has solved compilation album issues for me for mp3 and ogg files. All of my music is in one of these formats, so I have not needed to change, or been able to test, other formats.

I am not a C++ coder, so there may well be prettier / better ways to do this, but I tried to maintain a similar style to what was there.

Attachments (1)

musicbrainz_compilation.patch (5.0 KB) - added by drdaz7 at gmail dot com 11 years ago.

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by drdaz7 at gmail dot com

comment:1 in reply to:  description ; Changed 11 years ago by anonymous

Replying to drdaz7 at gmail dot com: I'm a bit concerned about "Checking TPE2 in mp3 files instead of TPE4". Mythmusic has been using TPE4 for quite some time and I believe Amarok does as well. I, for one, do not want to go through re-tagging thousands of files in my collection.

comment:2 in reply to:  1 Changed 11 years ago by drdaz7 at gmail dot com

Replying to anonymous:

Replying to drdaz7 at gmail dot com: I'm a bit concerned about "Checking TPE2 in mp3 files instead of TPE4". Mythmusic has been using TPE4 for quite some time and I believe Amarok does as well.

Amarok does not use TPE4 for Album Artist: http://bugs.kde.org/show_bug.cgi?id=134202

In addition, the problem I (and others) were experiencing (that Album Artist was not being correctly detected) was due to MythMusic looking in the wrong place, and thus falling back to the track artist name when scanning.

I, for one, didn't have to re-tag any files for this to work.

comment:3 Changed 11 years ago by stuartm

Milestone: unknown0.22
Owner: changed from Isaac Richards to stuartm
Status: newaccepted

TPE4 is more technically correct than TPE2 and MythMusic is NOT looking in the wrong place. TPE4 is used by a number of applications. Any solution which removes TPE4 support will not be accepted. I'm happy to consider adding optional fallback to TPE2 but only to support broken tagging applications like Picard.

comment:4 in reply to:  3 Changed 11 years ago by drdaz7 at gmail dot com

Replying to stuartm:

TPE4 is more technically correct than TPE2 and MythMusic is NOT looking in the wrong place. TPE4 is used by a number of applications. Any solution which removes TPE4 support will not be accepted. I'm happy to consider adding optional fallback to TPE2 but only to support broken tagging applications like Picard.

Fair enough.

I'll agree that the description of TPE4 in the id3v2 standard actually sounds more like what we're dealing with here. With that said, TPE2 is more or less a de-facto standard at this point, with MS Media Player, Apple iTunes and Amarok (amongst others) using TPE2 for this purpose. As such this becomes an issue of principal vs pragmatism.

I'm not arguing that TPE4 shouldn't be used - I really don't care. I didn't find any files in my collection which actually had the TPE4 tag filled with useful data. Will MythMusic actually fill TPE4 when ripping a CD? Furthermore, I'm not entirely sure how this fallback should work; should TPE2 be ignored if TPE4 contains something?

If Colin Guthrie is still around, can he chime in with arguments one way or the other? I believe he was the chap who added the check in the first place: http://www.gossamer-threads.com/lists/mythtv/dev/101966.

comment:5 Changed 11 years ago by drdaz7 at gmail dot com

Having looked at the standard again, and read several other similar discussions, it appears that both TPE2 and TPE4 are equally wrong - they are both metadata which refers to the specific track. There is (as far as I can tell) no truly appropriate tag for this information specified by the standard.

Another solution would be to have a database entry to specify where MythMusic should look for this info. I am not entirely sure whether such an option should be exposed in the user interface however, as the tag names would be meaningless to anybody who hasn't examined the standard. With that said, context help listing the popular media players which use each option could be useful...

The reason I am wary of the fallback option is due to the apparently numerous interpretations of the standard. I suspect that it isn't a problem since TPE4 contained (as far as I can tell) nothing of consequence in my 80GB mp3 collection, with varied sources, and Myth's checking TPE4 has not caused problems for anybody that we know of.

Out of interest, those reading this thread, do compilation albums with a credited 'Album Artist' work correctly? That is, is the album listed under the 'Album Artist', with each track credited to the performer?

(Note: a common hack (very often used in freedb) is to encode the performing artist in the track name, with the album artist tagged as the performing artist. This really doesn't count as working 'correctly'.)

comment:6 Changed 11 years ago by stuartm

Owner: stuartm deleted
Status: acceptednew

comment:7 Changed 11 years ago by paulh

Closed by [20932]?

comment:8 Changed 11 years ago by stuartm

Resolution: fixed
Status: newclosed

The original patch included some MusicBrainz? related changes but I don't agree with them all. E.g. the assumption that a soundtrack album is a compilation is flawed, not all soundtracks consists of tracks written/performed by different artists. Many are original scores written and performed by a single orchestra/artist especially for the film/programme/musical.

I'm going to close this ticket, open a new one if there is anything left to salvage from the original proposal which hasn't already been committed or dismissed.

Note: See TracTickets for help on using tickets.