saving id3v2-tags

Dominik Pellkofer pellkofer at
Thu Mar 24 18:10:22 CET 2005

Hi folks,

I've been trying to figure this out for days - but somehow I just don't 
get it: Using taglib, I'm unsuccessfully trying to save id3v2 tags. But 
I can only get v1-ones to work.
As I didn't find anything in the archives and the examples on didn't help 
either, I hope you can give me a hint.

Neither just using the common TagLib::FileRef
TagLib::FileRef f(pszFilePath);
TagLib::Tag *t = f.tag();
// here doing t->setArtist(_T("...")) and so on

nor TagLib::MPEG::File
TagLib::MPEG::File f(pszFilePath);
TagLib::Tag *t = f.ID3v2Tag(true);
// now again t->setArtist(_T("..."))  // didn't work at all!

did set any id3v2 tags.
In the second (code) case, using, strangely 
all tags disappeared, i.e. winamp & co. told me that my mp3-file didn't 
contain any tags at all, but using TagLib my app could read them.

It can't be that hard to save ID3V2 tags with this - otherwise - great 

Thanks for some hints,

More information about the taglib-devel mailing list