我成功标记了更多"普通" mp3文件中的标签和用户格式的标签。 但其他标准版本包括' copyright',' engineer',' composer','编码由','语言' 。没有显示(例如在EasyTag或其他音频程序中) 我的界限是:
t =Tag()
t.artist = TAGS['AUTEUR']
t.title = TAGS['TITLE']
t.album = TAGS['ALBUM']
t.genre = TAGS['GENRE']
t.recording_date = TAGS['YEAR']
t.track_num = TAGS['TRACK']
t.publisher = TAGS['PUBLISHER']
t.disc_num = (1, 1)
t.user_text_frames.set(TAGS['CDID'], u"CD_ID")
#These stick OK
t.engineer = TAGS['ENG']
t.copyright = TAGS['C']
t.composer = TAGS['COMPOSER']
#no showing
t.save(AUDIO, version=ID3_V2_3)
#I also test with version=ID3_V2_4 but no cigar.
它的eyed3能够访问这些标签吗?
答案 0 :(得分:0)
好的,真的需要'版权'标签,我切换到'Mutagen'模块
我需要的所有标签都在那里,没有添加额外的元数据来创建“用户文本框架”来存储其他重要信息。
在这里使用Metagen的一些完整配方代码: http://code.activestate.com/recipes/577138-embed-lyrics-into-mp3-files-using-mutagen-uslt-tag/
版权所有,只是: ...........
from mutagen.id3 import ID3, TCOP #... more imported tags here
try:
tags = ID3(mp3file)
except ID3NoHeaderError:
print "Adding ID3 header;",
tags = ID3()
#... more tags
tags["TCOP"] = TCOP(encoding=3, text=u"""All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher, except in the case of brief quotations embodied in critical reviews and certain other noncommercial uses permitted by copyright law. For permission requests, write to the publisher, addressed \“Attention: Permissions Coordinator,\” at the address below.""")
tags.save(mp3file)