通过 Mutagen 更改 APIC ID3 标签中的嵌入图像类型
我有一个很大的音乐库,我刚刚花了大约 30 个小时来整理。对于某些 MP3 文件,我将封面图像嵌入为类型 0(其他),我想将其更改为类型 3(封面)。有没有办法在 Python 中做到这一点,特别是在 Mutagen 中?
I have a large music library which I have just spent around 30 hours organizing. For some of the MP3 files, I embedded the cover art image as type 0 (Other) and I'd like to change it to type 3 (Front Cover). Is there a way to do this in Python, specifically in Mutagen?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这就是我如何成功的。
首先,在 Mutagen 中访问该文件:
然后,获取对您要查找的标签的引用:
然后,修改
type
属性:然后,将其分配回音频文件,只是为了 最后一定要
保存!
你就在那里! APIC 标签附带了自己的类,其中包含修改图片和图片标记信息所需的一切。快乐的音乐组织!
Here's how I was able to pull it off.
First, get access to the file in Mutagen:
Then, get a reference to the tag you're looking for:
Then, modify the
type
attribute:Then, assign it back into the audio file, just to be sure
Finally, save it!
And you're there! The APIC tag comes with its own class that sports everything you'd need to modify pictures and picture tagging info. Happy music organizing!