What is the best library for reading ID3 tags? [closed]

我们两清 提交于 2019-12-01 08:51:49

问题


What library is presently the most thorough and capable ID3 tag reading library available? Preferably something I can compile as a shared library and wrap with Python's ctypes library, or even a Python package.


回答1:


I've had a good time using mutagen (tutorial: http://code.google.com/p/mutagen/wiki/Tutorial) - it's quite simple to get the info. Note that you should use the Easy ID3 option.

>>> from glob import glob
>>> from mutagen.easyid3 import EasyID3
>>> for filename in glob('/home/jon/Downloads/*.mp3'):
    mp3info = EasyID3(filename)
    print mp3info.items()


[('artist', [u"James O'Brien's Mystery Hour"]), ('title', [u"James O'Brien's Mystery Hour - 7 Dec 12"])]


来源:https://stackoverflow.com/questions/14013576/what-is-the-best-library-for-reading-id3-tags

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!