TagLib
TagLib Audio Meta-Data Library
TagLib is a library for reading and editing the meta-data of several popular audio formats. Currently it supports both ID3v1 and ID3v2 for MP3 files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC, Speex, WavPack TrueAudio, WAV, AIFF, MP4 and ASF files.
TagLib is distributed under the GNU Lesser General Public License (LGPL) and Mozilla Public License (MPL). Essentially that means that it may be used in proprietary applications, but if changes are made to TagLib they must be contributed back to the project. Please review the licenses if you are considering using TagLib in your project.
There is some general information about the motivation and workings of TagLib that can be found in the API documentation.
Contact:
Please, for all questions related to TagLib and / or patches use the development list. Bugs should be reported at the GitHub bug tracker.
Goals and Features:
- TagLib is fast - tests have shown it to be about 6 times faster than id3lib and 3 times faster than libvorbisfile at reading tags (CPU time)
- TagLib is clean - TagLib is written in clean, object oriented C++ using a programming style common in KDE and Qt library programming
- TagLib is easy - TagLib offers an abstraction layer that makes it easy to ignore the differences between the different file formats and their implementations
- TagLib is powerful - for those that want to look under the hood TagLib provides access to the implementations of the individual file formats and provides a toolkit for doing advance manipulation of audio meta-data
- TagLib is well documented - Every class, namespace, function and enumeration in TagLib is documented
- TagLib supports Unicode - both ID3v2 and Ogg Vorbis standards are designed to support Unicode, so is TagLib (many tagging libraries and frontends are not)
- TagLib is extensible - TagLib does not implement every feature of ID3v2, but does instead make it possible for application authors to extend TagLib to support the specific features that they need in their applications
- TagLib is not toolkit specific - while TagLib does use KDE-style programming conventions and C++ by default, it does not link to either Qt or Glib (in fact it has no external dependencies) and does provide Glib-style C bindings (currently for the generic API only)
TagLib 1.11 BETA 2 Release - March 4, 2016
- Better handling of PCM WAV files with a ‘fact’ chunk.
- Better handling of corrupted APE tags.
- Efficient decoding of unsynchronized ID3v2 frames.
- Fixed text encoding when saving certain frames in ID3v2.3 tags.
- Fixed updating the size of RIFF files when removing chunks.
- Several smaller bug fixes and performance improvements.
TagLib 1.11 BETA Release - January 30, 2016
- New API for creating FileRef from IOStream.
- Added support for ID3v2 PCST and WFED frames.
- Added support for pictures in
XiphComment. - Added
String::clear(). - Added
FLAC::File::strip()for removing non-standard tags. - Added alternative functions to
XiphComment::removeField(). - Added
BUILD_BINDINGSbuild option. - Added
ENABLE_CCACHEbuild option. - Replaced
ENABLE_STATICbuild option withBUILD_SHARED_LIBS. - Better handling of duplicate ID3v2 tags in all kinds of files.
- Better handling of duplicate tag chunks in WAV files.
- Better handling of duplicate tag chunks in AIFF files.
- Better handling of duplicate Vorbis comment blocks in FLAC files.
- Better handling of broken MPEG audio frames.
- Fixed crash when calling
File::properties()afterstrip(). - Fixed crash when parsing certain MPEG files.
- Fixed crash when saving Ogg files.
- Fixed possible file corruptions when saving ASF files.
- Fixed possible file corruptions when saving FLAC files.
- Fixed possible file corruptions when saving MP4 files.
- Fixed possible file corruptions when saving MPEG files.
- Fixed possible file corruptions when saving APE files.
- Fixed possible file corruptions when saving Musepack files.
- Fixed possible file corruptions when saving WavPack files.
- Fixed updating the comment field of Vorbis comments.
- Fixed reading date and time in ID3v2.3 tags.
- Marked
ByteVector::nullandByteVector::isNull()deprecated. - Marked
String::nullandString::isNull()deprecated. - Marked
XiphComment::removeField()deprecated. - Marked
Ogg::Page::getCopyWithNewPageSequenceNumber()deprecated. It returns null. - Marked custom integer types deprecated.
- Many smaller bug fixes and performance improvements.
TagLib 1.10 Release - November 11, 2015
- New API for the audio length in milliseconds.
- Added new options to the tagwriter example.
- Added support for ID3v2 ETCO and SYLT frames.
- Added support for album artist in PropertyMap API of MP4 files.
- Added support for embedded frames in ID3v2 CHAP and CTOC frames.
- Added support for AIFF-C files.
- Better handling of duplicate ID3v2 tags in MPEG files.
- Allowed generating taglib.pc on Windows.
- Added
ZLIB_SOURCEbuild option. - Fixed backwards-incompatible change in TagLib::String when constructing UTF16 strings.
- Fixed crash when parsing certain FLAC files.
- Fixed crash when encoding empty strings.
- Fixed saving of certain XM files on OS X.
- Changed Xiph and APE generic getters to return space-concatenated values.
- Fixed possible file corruptions when removing tags from WAV files.
- Added support for MP4 files with 64-bit atoms in certain 64-bit environments.
- Prevented ID3v2 padding from being too large.
- Fixed crash when parsing corrupted APE files.
- Fixed crash when parsing corrupted WAV files.
- Fixed crash when parsing corrupted Ogg FLAC files.
- Fixed crash when parsing corrupted MPEG files.
- Fixed saving empty tags in WAV files.
- Fixed crash when parsing corrupted Musepack files.
- Fixed possible memory leaks when parsing AIFF and WAV files.
- Fixed crash when parsing corrupted MP4 files.
- Stopped writing empty ID3v2 frames.
- Fixed possible file corruptions when saving WMA files.
- Added TagLib::MP4::Tag::isEmpty().
- Added accessors to manipulate MP4 tags.
- Fixed crash when parsing corrupted WavPack files.
- Fixed seeking MPEG frames.
- Fixed reading FLAC files with zero-sized padding blocks.
- Added support for reading the encoder information of WMA files.
- Added support for reading the codec of WAV files.
- Added support for multi channel WavPack files.
- Added support for reading the nominal bitrate of Ogg Speex files.
- Added support for VBR headers in MPEG files.
- Marked FLAC::File::streamInfoData() deprecated. It returns an empty ByteVector.
- Marked FLAC::File::streamLength() deprecated. It returns zero.
- Fixed possible file corruptions when adding an ID3v1 tag to FLAC files.
- Fixed self-assignment operator in some types.
- Fixed extraction of MP4 tag keys with an empty list.
- Many smaller bug fixes and performance improvements.
Language Bindings
- C (Abstract API only, included with the library.)
- Perl
- Python
- Ruby
- taglib-ruby
- rtaglib (Abstract API only)
- ruby-taglib (alternative, older) (Abstract API only)
Projects Using TagLib
There are quite a few projects using TagLib already. Here’s a partial list. If you know of something else, please send me a mail with a link and I’ll add it here. (Note that inclusion here is not an endorsement of the listed software.)
| JuK | Jukebox for KDE |
| Amarok | Music player for KDE |
| Clementine | Multi-platform player inspired by Amarok 1.4 |
| Last.fm | Social music site |
| Amazon Kindle | eBook Reader |
| Native Instruments Traktor | Profesional DJing Software |
| VLC Media Player | Multi-purpose media player |
| Kodi | Kodi Media Center |
| MediaTomb | UPnP MediaServer |
| Nightingale | Mozilla powered open source music player based on Songbird |
| Audiobox.fm | Cloud-based media library and player |
| Tellico | Collection manager for KDE |
| Audacious Media Player | GTK2 Based Music Player (XMMS, BMP family) |
| Sonata | GTK+ based music client for MPD |
| Quick File Rename | Shareware, meta-data aware batch file renamer for Windows |
| Goggles Music Manager | Music manager that uses the FOX toolkit |
| GNOME Commander | Two-pane graphical file manager for GNOME |
Git Access
TagLib is hosted on GitHub. You can check out TagLib’s development source there.
Building
TagLib can be built on various UNIXes (including OS X) and Windows using CMake. Most Linux distributions ship with TagLib already.
