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.12 Release - Feb 16, 2021
- Added support for WinRT.
- Added support for Linux on POWER.
- Added support for classical music tags of iTunes 12.5.
- Added support for file descriptor to FileStream.
- Added support for ‘cmID’, ‘purl’, ‘egid’ MP4 atoms.
- Added support for ‘GRP1’ ID3v2 frame.
- Added support for extensible WAV subformat.
- Enabled FileRef to detect file types based on the stream content.
- Dropped support for Windows 9x and NT 4.0 or older.
- Check for mandatory header objects in ASF files.
- More tolerant handling of RIFF padding, WAV files, broken MPEG streams.
- Improved calculation of Ogg, Opus, Speex, WAV, MP4 bitrates.
- Improved Windows compatibility by storing FLAC picture after comments.
- Fixed numerical genres in ID3v2.3.0 ‘TCON’ frames.
- Fixed consistency of API removing MP4 items when empty values are set.
- Fixed consistency of API preferring COMM frames with no description.
- Fixed OOB read on invalid Ogg FLAC files (CVE-2018-11439).
- Fixed handling of empty MPEG files.
- Fixed parsing MP4 mdhd timescale.
- Fixed reading MP4 atoms with zero length.
- Fixed reading FLAC files with zero-sized seektables.
- Fixed handling of lowercase field names in Vorbis Comments.
- Fixed handling of ‘rate’ atoms in MP4 files.
- Fixed handling of invalid UTF-8 sequences.
- Fixed possible file corruptions when saving Ogg files.
- Fixed handling of non-audio blocks, sampling rates, DSD audio in WavPack files.
- TableOfContentsFrame::toString() improved.
- UserTextIdentificationFrame::toString() improved.
- Marked FileRef::create() deprecated.
- Marked MPEG::File::save() with boolean parameters deprecated, provide overloads with enum parameters.
- Several 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 hundreds of projects that use TagLib. Here’s a small selection of them:
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 |
Gerbera | UPnP MediaServer |
Audiobox.fm | Cloud-based media library and player |
Audacious Media Player | GTK2 Based Music Player (XMMS, BMP family) |
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 |
Loudgain | Loudness normalizer |
Kid3 | Audio Tagger |
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.