quodlibet / mutagen

Python module for handling audio metadata

Home Page:https://mutagen.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mutagen-inspect output

bll123 opened this issue · comments

MP4 : Is mutagen-inspect supposed to be outputting the 'MP4FreeForm' function name?

MP3 : UFID is output with python b'' markers.
This one is a bit minor, my parser already handles it.
Though I mucked up a lot of my data in the past when I didn't know it was there.

.m4a file:

- MPEG-4 audio (ALAC), 210.81 seconds, 1536000 bps (audio/mp4)
----:BDJ4:DANCE=MP4FreeForm(b'Waltz', <AtomDataType.UTF8: 1>)
----:com.apple.iTunes:MusicBrainz Track Id=MP4FreeForm(b'blah', <AtomDataType.UTF8: 1>)

I found some other .m4a files with free-form data (that I did not create):

----:com.apple.iTunes:iTunNORM=MP4FreeForm(b' 00000CA9 00000C80 000049EE 00004A2C 0001743E 0001743E 00007E89 00007E89 0000100D 0000100D', <AtomDataType.UTF8: 1>)
----:com.apple.iTunes:UFIDhttp://www.cddb.com/id3/taginfo1.html=MP4FreeForm(b'\xe4\x8c\xb3\xe3\x8d\x84\xe3\x85\x8e\xe5\x84\xb1\xe3\x9c\xb9\xe3\xa0\xb7\xe3\x94\xb4\xe3\x84\xb5\xe5\x98\xb7\xe3\xa0\xb8\xe3\xa1\x83\xe4\x99\x85\xe4\x94\xb2\xe3\x85\x85\xe3\x98\xb4\xe3\xa5\x85\xe3\x80\xb9\xe3\x81\x81\xe3\x80\xb2\xe3\x88\xb2\xe4\x98\xb9\xe3\x98\xb2\xe3\x91\x82\xe3\xa4\xb9\xe3\xa1\x86\xe4\x98\xb0\xe3\x81\x90', <AtomDataType.UTF8: 1>)

.mp3 file:

UFID=http://musicbrainz.org=b'blah'

Yes, mutagen-inspect outputs the text representation of the data structures used by mugagen. MP4FreeForm is the class that handles reading those free-form tags.

I think we can close this as answered.

What should be added is that mutagen-inspect is not supposed to be an API but it is a debugging and file inspection tool. It sounds like this is what it is being used for, with parsing the data. For actually programmatically reading the tags from files for use in an application the mutagen API should be used. That's definitely much easier then writing a parser for mutagen-inspect, which does also not have guaranteed stable output.