1

我成功地标记了 mp3 文件和用户格式文件中更“常见”的标签。但其他标准如“版权”、“工程师”、“作曲家”、“编码者”、“语言”。没有显示(例如在 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 能够访问这些标签吗?

4

1 回答 1

0

好的,真的需要“版权”标签,我切换到“诱变剂”模块

我需要的所有标签都在那里,无需添加额外的元数据创建“用户文本框架”来存储其他重要信息。

在此处使用 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)
于 2017-08-05T14:09:41.517 回答