使用mp3tagiconv解决MP3乱码问题

引子此项目主页:https://code.google.com/p/mp3tagiconv/


mp3tagiconv是一款可用于解决MP3乱码问题的软件。它可以自动探测MP3标签的编码,并以合理的方式重新写入,经过其处理的编码可被Linux、Windows(包括Windows Media Player)和各种移动设备正确识别。(原理见这里):

mp3tagconv is a Mutagen based script intending to convert the encoding of tags of MP3 files, so that it can be recognized correctly by music players in Linux, Windows, etc.

The program is now only tested in Simplified Chinese, we will be happy if information about other languages is provided.

If you want to know more about how it works, please refer to An explanation in Chinese.

Usage

The script depends on mutagen to run. Please install it from the repository of your distribution (in Ubuntu: python-mutagen).

For mp3 files with Chinese tags(we first try gbk, then utf8), ID3v2 tags which are already encoded in unicode will not be affected:

mp3tagiconv a.mp3

You can use -e to specify the encoding used if the tag is stored by latin-1. The program will guess your encoding according to your list:

mp3tagiconv -e gbk,utf8 b.mp3
If you don't want to confirm for every file(not recommended):
mp3tagiconv --do-update *.mp3

Details

Actually, the program does the following things:

  • Read tags of a MP3 file from its ID3v2 and ID3v1. ID3v1 is used to supplement the result of ID3v2.
  • Guess the encoding of the tags.
  • Decode the tags, then:
    • Write directly to ID3v2 tag of MP3 file via mutagen.
    • Encode the tags with local encoding(eg. gbk in Chinese) and write it to ID3v1 tag of the file.
  • The modified tag now can be recognized by most of the applications, eg. rthymbox, totem, juk, Windows Media Player, etc.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值