Managing Various Artists MP3s on Linux
9 January 2025
One of the most useful tags that shows up in MP3s (or most annoying, depending on your point of view) is TCMP. Setting this to the string 1 is often a good way to indicate that a track belongs to a compilation, and therefore your music player should put this album under the special "Various Artists" or "Compilations" section of your music library.
This is an unofficial ID3 tag from iTunes, albeit a much needed one because otherwise the best you can do is put "Various Artists" as the album artist (TPE2), the per-track artist as artist (TPE1) and hope that music players figure out what you actually wanted. Worse still, TPE2 doesn't even really mean "album artist"—it's offically "Band/Orchestra/Accompaniment" but everything treats it as Album Artist. At least TCMP is unambiguous. This documentation from cmus is a nice example of how awkward this all is.
The difficulty with TCMP being both useful and unofficial is that often players are paying attention to it but it doesn't show up in tag editing software. It doesn't show in Clementine nor EasyTag nor exiftool. So if you have something incorrectly being lumped under "Various Artists" or vice versa you might be driven batty trying to figure out why.
I recommend the tool mid3v2 to figure out what's actually going on (python3-mutagen package on Debian). Here's an MP3 that isn't in a compilation:
$ mid3v2 --list-raw 04\ -\ Travellers.mp3 Raw IDv2 tag info for 04 - Travellers.mp3 TALB(encoding=<Encoding.UTF16: 1>, text=['Spectrum']) TCON(encoding=<Encoding.UTF16: 1>, text=['255']) TDRC(encoding=<Encoding.LATIN1: 0>, text=['2021']) TIT2(encoding=<Encoding.UTF16: 1>, text=['Travellers']) TPE1(encoding=<Encoding.UTF16: 1>, text=['vision string quartet']) TRCK(encoding=<Encoding.UTF16: 1>, text=['04/13'])
If you get a massive wall of output try appending | grep -v PIC to avoid seeing the album art.
If the compilation flag is set you'll see a line like this:
TCMP(encoding=<Encoding.UTF8: 3>, text=['1'])
Add the TCMP flag to a file:
mid3v2 --TCMP 1 file.mp3
Remove the TCMP flag from a file:
mid3v2 --delete-frames TCMP file.mp3
Tech Tidbits Blog by Thomas Karpiniec
Posts RSS, Atom