saving id3v2-tags

Dominik Pellkofer pellkofer at gmail.com
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 
http://ktown.kde.org/~wheeler/files/more-taglib-examples/ didn't help 
either, I hope you can give me a hint.

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

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

did set any id3v2 tags.
In the second (code) case, using f.save(TagLib::...::ID3v2), 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 
library?

Thanks for some hints,
Dominik


More information about the taglib-devel mailing list