after using python mutagen,metatags not displayed

大兔子大兔子 提交于 2019-12-20 05:53:46

问题


I wanted to edit the meta data of a bunch of mp3 files,so I used python mutegan.
The details of the mp3 file before running mutagen

I used this simple code to change the details of the mp3 file.

from mutagen.easyid3 import EasyID3
audio = EasyID3("C:/wamp/www/music/songs/showkali.mp3")
audio['genre']='pop'
audio.save()

After running the program the details cannot be seen in the properties.
The details of the mp3 file after running mutagen
I figured out this is due to change in id3 tag version after running the program.The id3 tag version changed from ID3v2.3 to ID3v2.4.So I tried using the code

from mutagen.easyid3 import EasyID3
audio = EasyID3("C:/wamp/www/music/songs/showkali.mp3")
audio['genre']='pop'
audio.save(v2_version=3)

But still the details are not displayed in the details tab of properties.Can anyone suggest me an solution.Thanks in advance.


回答1:


easyid3 does not support v2.3 atm: https://github.com/quodlibet/mutagen/issues/188

You can work around this issue by doing

mutagen.id3.ID3("C:\\...mp3").save(v2_version=3)

after saving with easyid3



来源:https://stackoverflow.com/questions/40972762/after-using-python-mutagen-metatags-not-displayed

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