C++ library for reading and writing MP4/M4A/AAC (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Go to file
Martchus d5c8086230 Improve misc details 2016-08-05 01:46:31 +02:00
aac improved parsing ID3 genres 2016-02-23 20:33:00 +01:00
adts fixed includes 2015-09-06 19:57:33 +02:00
avc Improve documentation and consistency 2016-08-04 00:16:19 +02:00
avi fixed includes 2015-09-06 19:57:33 +02:00
flac Calculate duration of FLAC streams 2016-05-22 22:27:36 +02:00
id3 Improve misc details 2016-08-05 01:46:31 +02:00
matroska Improve documentation and consistency 2016-08-04 00:16:19 +02:00
mp4 Improve documentation and consistency 2016-08-04 00:16:19 +02:00
mpegaudio fixed calculation of duration of MPEG 1/2 audio streams 2016-01-31 00:02:23 +01:00
ogg Improve documentation and consistency 2016-08-04 00:16:19 +02:00
opus Support FLAC in Ogg 2016-05-14 23:20:51 +02:00
tests Improve misc details 2016-08-05 01:46:31 +02:00
vorbis Use workaround for GCC Bug 66145 2016-06-14 22:53:43 +02:00
wav set format id 2015-09-23 00:03:05 +02:00
.gitignore ignore *.txt.user files 2016-01-25 19:11:26 +01:00
CMakeLists.txt Improve documentation and consistency 2016-08-04 00:16:19 +02:00
LICENSE Initial commit 2015-04-22 19:11:19 +02:00
README.md Improve documentation and consistency 2016-08-04 00:16:19 +02:00
abstractattachment.cpp Improve documentation and consistency 2016-08-04 00:16:19 +02:00
abstractattachment.h Improve documentation and consistency 2016-08-04 00:16:19 +02:00
abstractchapter.cpp fixed includes 2015-09-06 19:57:33 +02:00
abstractchapter.h fixed includes 2015-09-06 19:57:33 +02:00
abstractcontainer.cpp Support FLAC in Ogg 2016-05-14 23:20:51 +02:00
abstractcontainer.h improved document title / segment count API 2015-12-27 19:51:57 +01:00
abstracttrack.cpp Improve subtitle format names and media types 2016-07-11 20:58:12 +02:00
abstracttrack.h Improve subtitle format names and media types 2016-07-11 20:58:12 +02:00
aspectratio.cpp parsing AVC config 2016-02-17 20:19:05 +01:00
aspectratio.h overall code cleanup 2016-04-24 22:10:45 +02:00
backuphelper.cpp Use workaround for GCC Bug 66145 2016-06-14 22:53:43 +02:00
backuphelper.h improved file handling 2016-05-01 20:02:44 +02:00
basicfileinfo.cpp improved file handling 2016-05-01 20:02:44 +02:00
basicfileinfo.h improved file handling 2016-05-01 20:02:44 +02:00
caseinsensitivecomparer.h fixed includes 2015-09-06 19:57:33 +02:00
download_testfiles.sh Add tests for FLAC files 2016-05-21 22:11:08 +02:00
exceptions.cpp fixed spelling mistakes 2015-10-16 21:46:36 +02:00
exceptions.h Add support for raw FLAC streams 2016-05-16 20:56:53 +02:00
fieldbasedtag.h Improve misc details 2016-08-05 01:46:31 +02:00
genericcontainer.h Support FLAC in Ogg 2016-05-14 23:20:51 +02:00
genericfileelement.h Fix typo 2016-06-18 00:00:49 +02:00
generictagfield.h fixed includes 2015-09-06 19:57:33 +02:00
localeawarestring.cpp First commit 2015-04-22 19:22:01 +02:00
localeawarestring.h added comments and move c'tor 2015-11-10 21:27:40 +01:00
margin.h parsing AVC config 2016-02-17 20:19:05 +01:00
mediafileinfo.cpp Improve misc details 2016-08-05 01:46:31 +02:00
mediafileinfo.h Improve misc details 2016-08-05 01:46:31 +02:00
mediaformat.cpp Improve subtitle format names and media types 2016-07-11 20:58:12 +02:00
mediaformat.h Improve subtitle format names and media types 2016-07-11 20:58:12 +02:00
notification.cpp fixed includes 2015-09-06 19:57:33 +02:00
notification.h fixed spelling mistake 2015-09-23 00:02:44 +02:00
positioninset.h Improve misc details 2016-08-05 01:46:31 +02:00
signature.cpp Improve handling of targets 2016-05-26 01:59:22 +02:00
signature.h Change usage of DECLARE_ENUM macro 2016-07-11 21:33:19 +02:00
size.h Support FLAC in Ogg 2016-05-14 23:20:51 +02:00
statusprovider.cpp fixed includes 2015-09-06 19:57:33 +02:00
statusprovider.h fixed includes 2015-09-06 19:57:33 +02:00
tag.cpp Improve misc details 2016-08-05 01:46:31 +02:00
tag.h Improve misc details 2016-08-05 01:46:31 +02:00
tagtarget.cpp Improve implementation of TagTarget::toString 2016-06-06 20:46:30 +02:00
tagtarget.h Fix misc issues 2016-07-30 22:35:46 +02:00
tagvalue.cpp Improve misc details 2016-08-05 01:46:31 +02:00
tagvalue.h Improve misc details 2016-08-05 01:46:31 +02:00

README.md

Tag Parser

C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags.

Supported formats

The tag library can read and write the following tag formats:

  • iTunes-style MP4/M4A tags (MP4-DASH is supported)
  • ID3v1 and ID3v2 tags
    • conversion between ID3v1 and different versions of ID3v2 is possible
  • Vorbis, Opus and FLAC comments in Ogg streams
    • cover art via "METADATA_BLOCK_PICTURE" is supported
  • Vorbis comments and "METADATA_BLOCK_PICTURE" in raw FLAC streams
  • Matroska/WebM tags and attachments

File layout options

Tag position

The library allows you to choose whether tags should be placed at the beginning or at the end of an MP4/Matroska file.

Padding

Padding allows adding additional tag information without rewriting the entire file or appending the tag. Usage of padding can be configured:

  • minimum/maximum padding: The file is rewritten if the padding would fall below/exceed the specifed limits.
  • preferred padding: If the file needs to be rewritten the preferred padding is used.

However, it is also possible to force rewriting the entire file.

Taking advantage of padding is currently not supported when dealing with Ogg streams (it is supported when dealing with raw FLAC streams).

Additional features

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.

Text encoding, Unicode support

The library is aware of different text encodings and can convert between different encodings using iconv.

Usage

For examples check out the command line interface of Tag Editor.

Bugs, stability

  • Matroska files composed of more than one segment aren't tested yet and might not work.
  • It is recommend you to create backups before editing because I can not test whether the library works with all kind of files.

Build instructions

The tagparser library depends on c++utilities and is built in the same way. It also depends on zlib.

TODO

  • Support more formats (EXIF, PDF metadata, Theora, ...).
  • Do tests with Matroska files which have multiple segments.