libtaginfo is a wrapper library for taglib and alows access to media tags in an abstract way.
libtaginfo is a C++ library.
C and vala bindings are available with this library.
Known tag formats:
- Ape tags,
- Asf tags and
- Id3 tags (v1, v2.2, v2.3, v2.4),
- Mod tags.
- Mp4 tags,
- Xiphcomment/Vorbis tag,
These tags are used with the following media files (extensions / mime):
- aac : audio/aac, audio/aacp, audio/mp4, audio/x-aac
- aif : audio/x-aiff
- aiff : audio/x-aiff
- ape : application/x-ape
- asf : audio/x-ms-asf, video/x-ms-asf
- flac : audio/flac, audio/x-flac+ogg, audio/x-flac
- it : audio/x-it
- m4a : audio/mp4a-latm, audio/x-m4a
- m4b : audio/m4b
- m4p : audio/x-m4p
- mod : audio/x-mod
- mp3 : audio/mpeg, audio/x-mpegurl
- mp4 : audio/mp4, video/mp4
- mpc : audio/mpc, audio/x-musepack
- oga : audio/x-vorbis+ogg, audio/ogg
- ogg : audio/x-vorbis+ogg, audio/ogg
- s3m : audio/x-s3m
- spx : audio/x-spx, audio/x-speex, audio/x-speex+ogg
- tta : audio/tta, audio/x-tta
- wav : audio/x-wav
- wma : audio/x-ms-wma
- wmv : video/x-ms-wmv, video/x-msvideo
- wv : application/x-wavpack, audio/wavpack, audio/x-wavpack
- xm : audio/x-xm
There is an API for accessing the following media tags:
- Album
- Album artist
- Artist
- BPM
- Comments;
- Compilation/V.A. flag
- Composer;
- Copyright;
- Encoder;
- Genre
- Homepage;
- Images (embedded image files)
- Lyrics
- Original artist
- Play count
- Rating (1 - 5 stars, 0 not set)
- Title
- Track count;
- Track number;
- User defined album labels;
- User defined artist labels;
- User defined track labels;
- Volume count;
- Volume number;
- Year
However, some media tags are not supported by some tag formats. (E.g. mod tags are very limited)
There is an API for accessing the following audio properties:
- Bitrate
- Channel count
- Lenght in seconds
- Sample rate
Getting Started
Libtaginfo provides a simple API which makes it possible to ignore the differences between tagging formats and format specific APIs which allow programmers to work with the features of specific tagging schemes.
Here's a very simple example with TagLib:
TagInfo::InfoRef ref("song.mp3");
ref->load();
TagLib::String artist = ref.info()->get_artist(); // artist == "Don van Vliet"
TagInfo::InfoRef ref2("song.ogg");
ref2.info()->set_album("Mambo No. 1");
ref2.save();
More examples can be found in the examples directory in the source code package.