MP4: Using Freeform Key to Store Multiple Genres (like mp3tag and foobar2000)
I may be doing this wrong, but there seems to be little documentation on MP4 tagging in general. From what I understand, the standard MP4 genre key does not support multiple values. I have noticed programs like mp3tag and foobar2000 work around this by storing multiple genres using a freeform key. The issue I am running into is the way mutagen saves multiple genres using similar code to this:
import mutagen
song = mutagen.File('song.m4a', easy=True)
song.tags.RegisterFreeformKey('genre_extra', 'GENRE')
song.tags['genre_extra'] = ['Pop', 'Rock']
del song.tags['genre']
song.save()
This appears to mimic the other programs when using the mutagen library. However, there are differences in how the tags are stored:
mutagen

mp3tag

I apologize if I'm missing something obvious.
How multiple values for a tag should be handled in MP4 is not well-defined. mutagen uses a different approach then foobar2000, though. That's what you notice there. For a more in-depth discussion of this see
https://tickets.metabrainz.org/browse/PICARD-376?focusedCommentId=35787