19 December 2011

TagLib, an awesome library to edit ID3 metadata

Recently, I have some MP3 files that contains its ID3 data in Arabic (I think either WINDOWS-1256 or ISO-8859-6 formats), the formats that cannot be read by Rhythmbox.
 
So, I have either edit in source of Rhythmbox (which is a better solution), or find a library to enable me to re-write these metadata.

I went with solution #2, I have do some search and found TagLib, a very awesome KDE library that makes this task very easy. Building the library was a straightforward task, I can say it is the first lib that I can build from source in my life .) .

Example: To compile and run:
$cc -o taglibClient taglibClient.cc -ltag
$./taglibClient
Fairouz

2 comments:

lelO said...

Did you use it with C# ??
I wonder how you extract the arabic Title, Album, etc with the correct encoding ??

mhewedy said...

Hey lelO,

I've used this lib with C++ (see the code snippet)

Have you tried use it to extract Arabic text and didn't work? (In the example I am extracting and supplying English text, However, I think It could edit in Arabic)

see http://m-hewedy.blogspot.com/search/label/lib_taglib