Only one embedded genre tag being read

The problem is that right now, Plex/ffmpeg only supports multiple values if they are separated with a semi-colon. The old agent accepted several other separators. I can be corrected, but ffmpeg actually reads tags separated with slashes, and semi-colons as one tag. That is, ,a tag like Pop/Rock or Pop; Rock is not actually two tags, but just one, being “Pop/Rock” or “Pop; Rock” I’m assuming some code inserted by Plex, splits the genres at the separators it recognizes. Forward slashes and null-char are not part of that group.

I don’t expect a quick fix for this, if ever. It’s not likely to be considered a high priority.

No it’s slightly different. Plex only splits the tags it gets back from ffmpeg on semicolons now:

  • with FLAC/Vorbis tags, multiple values are stored as multiple fields of the same name (GENRE = “Pop”, GENRE = “Rock”). ffmpeg reads both values correctly, and returns them to Plex as a semicolon-separated string: “Pop;Rock”. Plex then splits this string. (no bugs, works as intended)
  • with mp4 (AAC), multiple values are also stored as multiple fields of the same name (©gen = “Pop”, ©gen = “Rock”) but ffmpeg only reads the first one, and returns “Pop” (=bug in ffmpeg to be fixed)
  • with id3v2.3, multiple genres are not allowed
  • with id3v2.4, multiple values are null-separated (TCON = “Pop[null]Rock”). ffmpeg stops reading when it hits a null character, so it returns “Pop” to Plex (=another bug in ffmpeg to be fixed)
  • with id3v2.3 or id3v2.4, if you store genres as a single string with semicolon separators (TCON = “Pop;Rock”) you’re violating the standard, but this does make ffmpeg return “Pop;Rock”, and Plex happily separates that.
  • the forward slash is not a valid separator for Genre in any standard (id3v2.3, id3v2.4, mp4 or Vorbis comments), so neither ffmpeg nor Plex splits “Pop/Rock” if it encounters it.

You can check all this by doing ffmpeg -i file.mp3

I can think of a couple of approaches to fix ffmpeg stopping when it hits a null character:

  • before it parses the frame, do a find/replace of null with semicolon
  • when it parses the frame, when it hits a null character, replace it with semicolon and continue
  • split the frame on null characters into an array, and then after reading the whole frame, return the array as a semicolon-separated string

Update: all rejoice, a fix has just been submitted to ffmpeg by a Plex employee: [FFmpeg-devel,3/3] lavf/id3v2dec: support multiple values and TIPL frames - Patchwork

Let’s hope it gets accepted quickly. The latest ffmpeg build (28-Aug) doesn’t have it yet.

Should fix the issue with multivalued tags in id3v2, which only leaves the similar issue with mp4 (aac) still open.

7 Likes

While I appreciate the explanation, this tiny bit used to at least be true for Plex. I can’t find any official Plex docs for this, but I have always done it that way and it has always worked, right up until this update.

A quick reddit search offers others that have been doing the same.

Yeah I can imagine it’s annoying if you’ve been relying on this Plex bug.

It’s fairly easy to fix though, a one-time batch find/replace (replace / with ;) in your Genre tags makes it work again.

Agreed, as long as your using ID3v2.3 tags. I’d been using ID3v2.4 and needed to switch to get plex to play nicely. Really wish they would put that into their support docs.

Not for long if this ffmpeg fix goes through quickly, then id3v2.4 tags will work again.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

I know this has taken a while but we have a test build that supports these kinds of multiple genre tags now.

We’d like to make sure it solves the issue fully before rolling this out into a release.

I’m listing a few popular platforms below, if you want to test a specific platform that isn’t listed here please let me know and I’ll add it:

Windows:
https://artifacts.plex.tv/plex-media-server-experimental/1.31.2.6700-baa28a637/windows/PlexMediaServer-1.31.2.6700-baa28a637-x86_64.exe

MacOS:
https://artifacts.plex.tv/plex-media-server-experimental/1.31.2.6700-baa28a637/macos/PlexMediaServer-1.31.2.6700-baa28a637-universal.zip

Linux (Debian):
https://artifacts.plex.tv/plex-media-server-experimental/1.31.2.6700-baa28a637/debian/plexmediaserver_1.31.2.6700-baa28a637_amd64.deb

Linux (RPM):
https://artifacts.plex.tv/plex-media-server-experimental/1.31.2.6700-baa28a637/redhat/plexmediaserver-1.31.2.6700-baa28a637.x86_64.rpm

Unraid:
https://artifacts.plex.tv/plex-media-server-experimental/1.31.2.6700-baa28a637/unraid/PlexMediaServer-1.31.2.6700-baa28a637-x86_64.txz

Please give this build a test if you can and let me know if it’s working as expected.

4 Likes

Will give the build a test later this afternoon. One point of clarification, is the fix just for multiple genre tags or is it all tags ? Ultimately, releasestatus is the tag I’m more interested in as I’d like to move my tags to ID3v2.4 which I can’t ATM due to this limitation.

At the moment only genres but we could apply it to any tags where having multiple values like this makes sense.

We don’t read releasestatus at all, so it wouldn’t matter to us if you had that tag or not.

Sorry, meant releasetype. Needed for groupings like album; compilation, album; live etc…

It would be relatively simple to support this behaviour with release type too.

2 Likes

Some other tags to consider for multiple values:

Composer, Songwriter, lyricist, writer (MusicBrainz has a mix of these, sometimes Lennon/McCartney are composers, sometimes songwriters for example) Album Artist, and Track Artist,. I know Plex doesn’t use some of those tags, but maybe in the future…

Had a little time this afternoon to run a test with build plexmediaserver_1.31.2.6700-baa28a637_amd64.deb. This is what I done …

With build plexmediaserver_1.31.0.6654-02189b09f_amd64.deb I updated 1 album from ID3v2.3 to ID3v2.4 tags and including two genres …
Screenshot from 2023-02-14 13-51-54
… and force refreshed the album. As expected plex sees only 1 of the genres.

Then updated to build plexmediaserver_1.31.2.6700-baa28a637_amd64.deb and afterwards force refreshed the album. Plex now sees both genres as seen in the screenshot below.

So looks good to me. I’ve only tested mp3.

Personally would like to see this extended to releasetype. Also label would benefit but I have other problems with that tag due to my library using mp3 music media (Record Label embedded Metadata for Music Media).

A step forward so thanks.

1 Like

A release has only one label. All other corporate entities listed on covers are not “label”, but lyrics publishers, distributors, or manufacturers. But according to MB policies they are not record labels.

Fair enough. Reason I mentioned it is that many releases get tagged with musicbrainz picard as having multiple labels, here is one example https://musicbrainz.org/release/74d91370-12d3-4ea6-b3d2-fdc983f0196c with two labels.

Screenshot from 2023-02-14 16-24-22

Rhino is now a subsidiary of Warner. But the label is still only “Rhino”, while Warner is the holding Label - MusicBrainz

OK tested 1.31.2.6700:

  1. multiple genres are again correctly read in id3v2.4, Vorbis (FLAC) and mp4 (m4a) tag formats :partying_face:
  2. however, Plex only reads the multiple genres of the first track of the album, all other genres of the album are ignored

Steps to reproduce:
album/track1.mp3: Genre = Pop, Rock
album/track2.mp3: Genre = Reggae,Dubstep

Plex reads: Pop,Rock

I don’t know exactly which build this bug was introduced, but not too long ago Plex would roll up all genres: Pop,Rock,Reggae,Dubstep

1 Like