I
I
ILoveYAnny2016-06-22 11:10:27
linux
ILoveYAnny, 2016-06-22 11:10:27

How to detect IDV tag encodings in mp3 file in Uubuntu?

Hello, how can I determine the encoding of tags in an mp3 file? Interested in the definition, not the correction

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Bogachev, 2016-06-22
@ILoveYAnny

This is probably not a very beautiful solution, but still: we get the tags and write them to a temporary file. Then, with the help of file , we find out the encoding and highlight it with something. It looks something like this (you can arrange and use all this in a script):

~$ mp3info -p "%a %l %t %g %c\n" Blues\ Saraceno\ -\ Dogs\ of\ War.mp3 > /tmp/test
~$ cat /tmp/test
Blues Saraceno Dark Country 3 Dogs of War  Recorded with Spotydl
~$ file -i /tmp/test | sed -ne '/charset/ s/.*\= *//p'
us-ascii

~$ mp3info -p "%a %l %t %g %c\n" Ария\ -\ Закат\ \(акустика\).mp3 > /tmp/test
~$ cat /tmp/test
���� 2000 � ���� ���� ����� (2000 � ���� ����) Rock
~$ file -i /tmp/test | sed -ne '/charset/ s/.*\= *//p'
iso-8859-1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question