How to correct code of MP3 labels in Chinese on Linux

Generally, audios in MP3 format can be loaded with the correct labels in windows systems, but, the fans using Linux, like me, want to get the correct labels of MP3 audios when I use Rhythmbox to play audios. Fortunately, there is a mini tool which can finish this task.

Please follow steps, you can get the right labels.

1. Using the terminal, switch to the super user, execute the line to install the python-mutagen pakeage.

yum install python-mutagen

2. two methods to convert your MP3 labels to the right format so that it can be displayed rightly in the players.
(a) Enter your audio directory if you just want to convert those files just under this directory, using terminal, execute the command

mid3iconv -e gbk *.mp3

This command can convert the mp3 files under the directory immediately, not including the subdirectory.

(b) Or if you have some subdirectories, using albums, artists as its directory names, Just enter the audios' highest directory, execute the line

find . -iname '*.mp3' -execdir mid3iconv -e gbk {} \;

This command can convert the mp3 files under the directory, including the subdirectory.

3. Another problem: using the above commonds cause Windows's media player not read the labels correctly. you could add --remove-v1 to delete the ID3v1 label. However, iTune on Windows can display the UTF formatted labels.
Causes of this issue

MP3 label's types with its supported encodings

ID3v1: ISO-8859-1
ID3v2 2.3: ISO-8859-1, UTF-16
ID3v2 2.4: ISO-8859-1, UTF-16, UTF-8
APEv2: UTF-8

So, there's no rule to label MP3. In fact, an MP3 file may have these four labels. If it has more than one of these label formats, the player reads the labels one by one, first is APEv2, then ID3v2 2.4, after it ID3v2 2.3, the last one is ID3v1.

In linux system, players can display labels right if the label code is UTF. Restrictedly, ISO-8858-1 does not support Chinese, but it can store Chinese code. If the label is encoded by GBK, Big5, GB18030, GB2312 formats in Chinese, the player reads it as ISO-8859-1 code so that the label cannot be displayed rightly.

References

1. Linux系统下Mp3标签乱码问题的分析和解决.

2. RE: find: missing argument to -exec.

   Send article as PDF   

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.