Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MP4: Using Freeform Key to Store Multiple Genres (like mp3tag and foobar2000) #551

Open
ghost opened this issue Jan 25, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented Jan 25, 2022

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
mutagen

mp3tag
mp3tag

I apologize if I'm missing something obvious.

@ghost ghost changed the title MP4: Using Freeform to Store Multiple Genres (like mp3tag and foobar2000) MP4: Using Freeform Key to Store Multiple Genres (like mp3tag and foobar2000) Jan 25, 2022
@phw
Copy link
Collaborator

phw commented Feb 14, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant