Tag Parser 12.3.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags.
The tag library can read and write the following tag formats:
Further remarks:
The library allows you to choose whether tags should be placed at the beginning or at the end of an MP4/Matroska file.
Padding allows adding additional tag information without rewriting the entire file or appending the tag. Usage of padding can be configured:
Default value for minimum and maximum padding is zero. Hence the library will almost always have to rewrite the entire file to apply changes. To prevent this, set at least the maximum padding to a higher value.
It is also possible to force rewriting the entire file always.
Taking advantage of padding is currently not supported when dealing with Ogg streams (it is supported when dealing with raw FLAC streams).
The library can also display technical information such as the ID, format, language, bitrate, duration, size, timestamps, sampling frequency, FPS and other information of the tracks.
It also allows to inspect and validate the element structure of MP4 and Matroska files.
The library is aware of different text encodings and can convert between different encodings using iconv.
find_package(tagparser 10.1.0 REQUIRED)
) which provides the imported target tagparser
you can link against. Otherwise, use the pkg-config
module tagparser
to query the required compiler/linker flags.example.cpp
.TagParser::MediaFileInfo
providing access to everything else.std::ios_base::failure
.TagParser::Failure
.TagParser::Diagnostics
object to store those messages.TagParser::AbortableProgressFeedback
object for callbacks and aborting.TagParser::TagValue
objects. Those objects erase the actual type similar to QVariant
from the Qt framework. The documentation of TagParser::TagValue
covers how different types and encodings are handled.For more examples check out the command line interface of Tag Editor. API documentation can be generated using Doxygen with cmake --build … --target tagparser_apidoc
.
Bugs can be reported on GitHub.
It is recommend to create backups before editing because I can not test whether the library works with all kinds of files. (When forcing rewrite a backup is always created.)
The tagparser library depends on c++utilities and is built in the same way. It also depends on zlib, iso-codes and requires at least CMake 3.19. Tests depend on CppUnit. For checking integrity of testfiles, the OpenSSL crypto library is required.
The location of the JSON file from iso-codes can be specified via the CMake variable LANGUAGE_FILE_ISO_639_2
.
For building multiple projects in one go (c++utilities, tagparser and the tag editor), checkout the "Building this straight" instructions.
More TODOs are tracked in the issue section at GitHub.
Copyright © 2015-2024 Marius Kittler
All code is licensed under [GPL-2-or-later](LICENSE).