Saving custom tags

Urs Fleisch urs.fleisch at gmail.com
Sat Oct 15 10:43:50 BST 2022


Hi Hank,

For simple cases, you can use the properties interface, which can
create TXXX, WXXX and COMMENT frames with custom descriptions. For a
simple example, you can look at tagwriter.cpp, which can create such
frames for example using `tagwriter -I URL:CustomUrl
'URL value' -I 'COMMENT:Custom Comment' 'Comment value' -I 'Custom Text' 'A TXX
X value' myfile.mp3`. The descriptions, however, will then be in all
uppercase. If you need more control, you could use the low level
classes, e.g. in the case of ID3v2 frames
`UserTextIdentificationFrame` or one of the other subclasses of Frame
(see https://taglib.org/api/classTagLib_1_1ID3v2_1_1Frame.html).

This is now all ID3v2 specific, but for the other tag types, the
properties interface can be used too, and there exist also specific
low level classes, e.g. `TagLib::MP4::Item`.

Regards,
Urs


More information about the taglib-devel mailing list