Inconsistent Handling of Genre Field in m4a Files

It seems there is some continued issues with the genre field in m4a files. There was some discussion a while ago here

If a single genre is saved to any m4a file it is stored into the traditional genre tag location. But if there are multiple genre tags they are stored in a custom tag location. This location is apparently not read by many players and instead results in the genre being left empty on the display.

Android apps like Poweramp and GoneMAD handle multiple genres correctly for all other file formats other than m4a. Is this because m4a doesn't actually support multiple genre tags? Or are these being mapped to the wrong location when mp3tag is saving them compared to when using a single genre field?

GoneMAD has noted this on the development site.

Yes, I've just checked — there is some special handling of the genre field for MP4 metadata (based on the topic you've linked to) and this code assumes that the genre field is a single-value field. I could potentially rewrite this part to not use a custom field in case of multiple genre fields...

Can you edit the genre in those apps and use multiple genres there?

I hadn't thought of working backwards to see how this works. I'll try some of these tonight and get back to you with any results.

I did test this with a single m4a file just to see how it was handled. In both GoneMAD and Poweramp I was able to edit the Genre using a semicolon as the separator. Both apps then showed each one as a distinct genre in their respective libraries for browsing. A couple of other apps like Neutron and Foobar did not split them, but they don't support multiple genre tags or do this normally anyhow. However they did pick up the edits and displayed both genres as a single entry.

When I pull this file that was changed on Android back to Windows and open it in mp3tag, it is confirmed to be a single genre tag with the semicolon separator, as one would expect. If I use mp3tag to separate them into separate tags again, they go back to the custom tag and the Android apps then again show a blank genre.

I'm guessing that since m4a/Apple doesn't formally support multiple genres, this creates a challenge to administer the concept from the mp3tag side. I am not familiar enough with the back end to know what else is involved.

@Florian I can send you a file that has been split by mp3tag, and one that has been edited on the Android side if that helps.

Wouldn't this be the same as using a semicolon-separated list when filling the genre via Mp3tag?

Can you check what's displayed for this file, which uses two MP4 gnre atoms and one MP4 ©gen atom?

multiple-genres.m4a.zip (56.8 KB)

This is the result using GoneMAD player. This has the best tag integration of the players on Android that I have tested. It shows the genre results as Dance, Disco, Club House in the Song Info details. With the previous separate multiple genre tags this was showing up as blank.

Using the Poweramp app with the same test file only the genres Dance, Club House are displayed. The Disco genre is missing that GoneMAD was able to display. Again with the previous multi genre testing this was blank for m4a files.

And finally for comparison purposes this is the result from the Android version of Neutron Music Player. It only shows a single genre Club House without either Dance or Disco being displayed. However this is to be expected as this app does not formally support multiple tags for any field including genre. But it is worth noting that like the other Android apps when using the previous m4a test files with multiple genre fields, this was actually coming up blank.

I don't know which fields were stored in the different genre locations for your test file. But it seems whatever change was done there allowed at least one tag to be displayed in each of these apps, which is better than being blank. For GoneMAD and Poweramp that support multiple tags, perhaps this change will allow them to handle m4a better with their future development. The solo dev for GMMP is a fan of mp3tag and has suggested they would revisit this support request in future development.

Thanks for taking some time to look into this so quickly.

Thank you for the feedback! Based on your observations, writing multiple genres with their respective MP4 atom IDs seems to be more compatible.

I've changed this with Mp3tag v3.28a to allow for broader testing.

Thanks for this update @Florian

It appears that all of my Android and iOS player apps are now recognizing at least the first genre field in m4a files with multiple genres tag fields. So the changes have definitely had positive results in all cases. I also checked to confirm that any files with a single genre field had no negative consequences.

It is now back to the devs of the player apps to handle the additional tags that they are currently not showing. But at least now they are not coming up blank.