Wednesday, December 27, 2006

Music taging in Python

During the X-mas, I took a closer look in meta data tagging in music files using Python. There are modules to tag mp3, flac and ogg vorbis file, but each file format has its own module and each module has its own API. That's bad! Then I found a Python module called mutagen. Mutagen handles tagging for all the file formats above and some other too. Thats nice! If you are happy to only use some of those tags that are possible in MP3 files, you will have the same API for the three files. If you want to use all the tags in MP3, we are at least down to two instead of three different API:s.

Unfortunately I noticed that mutagen convert all tag names in ogg files to lower case. The recomendation from the xiph-people that had defined the ogg-vorbis standard is that tag names should be in upper case. I have mailed the mailing list for mutagen and hope that they will change the behavior according to the recommendations.

No comments: