Compilation tags and you

I’m trying out Navidrome, a lightweight alternative to Airsonic, and I had difficulty with my music seemingly being tagged various artists when it shouldn’t (sometimes with different tracks), and albums with various artists being considered separate albums. Obviously, this is pretty annoying since I haven’t seen other music library software do it.

An example of albums getting split by artists

Unlike a lot of music library software, Navidrome uses the “album artist” tag, but doesn’t group by it. Instead, it relies on the compilation tag being set for all tracks on an album. Unfortunately, most tagging tools don’t make this obvious, so it’s easy to forget.

There are some tools that make this a little bit more introspectable. On FreeBSD, I installed at least the flac, py38-eyed3, and id3lib packages for these tools.

For example, you can use the “id3info” tool to see if there’s a “TCMP” frame used for compilations on MP3s with IDv3 tags:

$ id3info 07\ The\ Reaction\ -\ Talk\ Talk\ Talk\ Talk.mp3 

*** Tag information for Streets (1977)/07 The Reaction - Talk Talk Talk Talk.mp3
=== APIC (Attached picture): ()[, 3]: image/jpeg, 808079 bytes
=== TALB (Album/Movie/Show title): Streets
=== TCMP ():  frame
=== TCOM (Composer): Ed Hollis, Mark Hollis
=== TCON (Content type): Punk
=== TIT2 (Title/songname/content description): Talk Talk Talk Talk
=== TPE1 (Lead performer(s)/Soloist(s)): The Reaction
=== TPE2 (Band/orchestra/accompaniment): Various Artists
=== TPOS (Part of a set): 1/1
=== TRCK (Track number/Position in set): 07/17
=== TXXX (User defined text information): (replaygain_track_gain): -5.43 dB
=== TXXX (User defined text information): (replaygain_track_peak): 0.867373
=== TYER (Year): 1977
*** mp3 info
MPEG1/layer III
Bitrate: 224KBps
Frequency: 44KHz

You can remove the TCMP frames easily with eyeD3 and add them again; the content of a compilation is a text of “1” or “0”:

$ eyeD3 --remove-frame TCMP *.mp3
$ eyeD3 --text-frame "TCMP:1" *.mp3

For FLACs, we can use the metaflac tool; the Vorbis tag format that FLAC borrows uses “COMPILATION” instead as the name:

$ metaflac --remove-tag=COMPILATION *.flac
$ metaflac --set-tag=COMPILATION=1 *.flac

You can use the same principles for other kinds of tags too. It’s unfortunate that tagging music is fraught with obscure issues; the whole experience has taught me the way schemas and normalization are done is inconsistent and ass-backwards. But that’s the topic of a future post…

2 thoughts on “Compilation tags and you

Leave a Reply

Your email address will not be published. Required fields are marked *