MP3 tags Cyrillic chars

audaciouscharacter encodingtagging

I have some mp3 files with Cyrillic chars on file names and also on their tags.

I'm using audacious to play them. See the file info below:

enter image description here

Is it possible to change some encoding to show the contents correctly?

Âûñîêî should be Высоко, I guess.

Best Answer

I don't have any Cyrillic characters in my music collection but I can do Greek with no problem using the latest version of eyed3 installed by sudo pip install --upgrade eyed3:

 $ eyeD3 Μπεστ\ οφ/Τζίμης\ Πανούσης\ -\ Κάγκελα\ Παντού.mp3 
Τζίμης Πανούσης - Κάγκελα Παντού.mp3    [ 3.43 MB ]
-------------------------------------------------------------------------------
Time: 03:45 MPEG1, Layer III    [ 128 kb/s @ 44100 Hz - Joint stereo ]
-------------------------------------------------------------------------------
ID3 v2.4:
title: Tzimis Panousis-Kagkela Pantou.mp3
artist: Tzimis Panousis
album: Unknown

In the example above, I have a directory (album name) called Μπεστ οφ which contains a song called Κάγκελα Παντού by Τζίμης Πανούσης. As you can see in the id3tool output above, the tags are not in Greek. Let's fix that:

$ eyeD3 -A "Μπεστ οφ" \
        -t "Κάγκελα Παντού" \
        -a "Τζίμης Πανούσης" \
        "./Μπεστ οφ/Τζίμης Πανούσης - Κάγκελα Παντού.mp3"

That correctly set the tags using the Greek alphabet:

$ eyeD3 Μπεστ\ οφ/Τζίμης\ Πανούσης\ -\ Κάγκελα\ Παντού.mp3 
Τζίμης Πανούσης - Κάγκελα Παντού.mp3    [ 3.43 MB ]
-------------------------------------------------------------------------------
Time: 03:45 MPEG1, Layer III    [ 128 kb/s @ 44100 Hz - Joint stereo ]
-------------------------------------------------------------------------------
ID3 v2.4:
title: Κάγκελα Παντού
artist: Τζίμης Πανούσης
album: Μπεστ οφ

OK, but since the information is encoded in the name of the file, this can be automated. In the example above, the file name has this format:

Album/Artist - Title.mp3

So, we can parse and add the tags for all files with a little shell magic:

find . -type f -name "*mp3" | while read file; do 
    album="$(basename "$(dirname "$file")")"; 
    filename="$(basename "$file")"; 
    artist=${filename%%-*}; 
    title=${filename##*-}; 
    title=${title%%.mp3}; 
    eyeD3 -A "$album" -t "$title" -a "$artist" "$file"; 
done

After running this command, all files will have had their id3 tags modified:

  enter image description here

Related Question