View Single Post
  #1  
Old 01-26-2010, 07:14 AM
Stream Recorder
 
Posts: n/a
Default

Correcting GBK,Big5,CP1251,... ID3v1 and ID3v2 tags by converting them to UTF (linux)


ID3v1 or v2 don't really supports multi-byte encodings such as GBK or Big5.

Most existing files falsely pretend they are ISO-8859-1 encoded. This means the softwares handle them in all kinds of weird ways.

Even if the user can force the encoding in some players, it is then impossible to display tags of several international languages at the same time if files are so encoded.

Converting ID3 tags to Unicode is important not only for Linux players, but also for most portable players.



How to correct ID3v1 and ID3v2 tags with python-mutagen (mid3iconv) by converting them to Unicode

In the Terminal:

Install python-mutagen:
Code:
apt-get install python-mutagen
Go to your music folder
Code:
cd ~/Music/
Correcting Chinese ID3 tags
Correct Chinese Traditional BIG5 ID3v2 tags by converting them to Unicode and remove ID3v1 tags:
Code:
find -iname '*.mp3' -print0 | xargs -0 mid3iconv -e GBK --remove-v1
Correct Chinese Simpliefied GBK ID3v2 tags by converting them to Unicode and remove ID3v1 tags:
Code:
find -iname '*.mp3' -print0 | xargs -0 mid3iconv -e GBK --remove-v1

Correct Chinese Simpliefied GB2312 ID3v2 tags by converting them to Unicode and remove ID3v1 tags:
Code:
find -iname '*.mp3' -print0 | xargs -0 mid3iconv -e GB2312 --remove-v1
Correcting Russian ID3 tags
Correct ID3v2 Windows1251 tags by converting them to Unicode and remove ID3v1 tags:
Code:
find -iname '*.mp3' -print0 | xargs -0 mid3iconv -e CP1251 --remove-v1
Correct ID3v2 KOI8-R tags by converting them to Unicode and remove ID3v1 tags:
Code:
find -iname '*.mp3' -print0 | xargs -0 mid3iconv -e KOI8-R --remove-v1
Correcting Cyrrilic/Ukranian KOI8-U ID3 tags
Code:
find -iname '*.mp3' -print0 | xargs -0 mid3iconv -e KOI8-U --remove-v1
Correcting Korean EUC-KR ID3 tags
Code:
find -iname '*.mp3' -print0 | xargs -0 mid3iconv -e EUC-KR --remove-v1
Correcting Japanese EUC-JP ID3 tags
Code:
find -iname '*.mp3' -print0 | xargs -0 mid3iconv -e EUC-JP --remove-v1
Correcting Hebrew ID3 tags
Code:
find -iname '*.mp3' -print0 | xargs -0 mid3iconv -e CP1255 --remove-v1
Correcting Arabic ID3 tags
Code:
find -iname '*.mp3' -print0 | xargs -0 mid3iconv -e CP1256 --remove-v1
Correcting Greek ID3 tags
Code:
find -iname '*.mp3' -print0 | xargs -0 mid3iconv -e CP1253 --remove-v1
Correcting Turkish ID3 tags
Code:
find -iname '*.mp3' -print0 | xargs -0 mid3iconv -e CP1254 --remove-v1

Note: If you don't want to remove ID3v1 tags, do not use the "--remove-v1" parameter.
Reply With Quote