C++ library for reading and writing MP4/M4A/AAC (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Go to file
Martchus 488fce3ab8 parsing AVC config 2016-02-17 20:19:05 +01:00
aac parsing AVC config 2016-02-17 20:19:05 +01:00
adts fixed includes 2015-09-06 19:57:33 +02:00
avc parsing AVC config 2016-02-17 20:19:05 +01:00
avi fixed includes 2015-09-06 19:57:33 +02:00
id3 make use of padding when applying changes to MP3 files 2015-12-23 23:36:52 +01:00
matroska parsing AVC config 2016-02-17 20:19:05 +01:00
mp4 parsing AVC config 2016-02-17 20:19:05 +01:00
mpegaudio fixed calculation of duration of MPEG 1/2 audio streams 2016-01-31 00:02:23 +01:00
ogg support Opus in OGG 2016-01-17 19:32:58 +01:00
opus added parser for Opus identification header 2016-01-17 21:32:57 +01:00
resources improved project files 2015-12-08 08:38:26 +01:00
tests parsing AVC config 2016-02-17 20:19:05 +01:00
vorbis support Opus in OGG 2016-01-17 19:32:58 +01: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 parsing AVC config 2016-02-17 20:19:05 +01:00
LICENSE Initial commit 2015-04-22 19:11:19 +02:00
README.md recognize ar and tar archives by magic number 2016-01-20 22:44:57 +01:00
abstractattachment.cpp added methods to buffer attachments 2015-11-26 14:22:44 +01:00
abstractattachment.h fixed buffer being released instead of discarded 2015-12-21 00:03:04 +01: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 improved document title / segment count API 2015-12-27 19:51:57 +01:00
abstractcontainer.h improved document title / segment count API 2015-12-27 19:51:57 +01:00
abstracttrack.cpp parsing AVC config 2016-02-17 20:19:05 +01:00
abstracttrack.h parsing AVC config 2016-02-17 20:19:05 +01:00
aspectratio.cpp parsing AVC config 2016-02-17 20:19:05 +01:00
aspectratio.h parsing AVC config 2016-02-17 20:19:05 +01:00
backuphelper.cpp fixed includes 2015-09-06 19:57:33 +02:00
backuphelper.h First commit 2015-04-22 19:22:01 +02:00
basicfileinfo.cpp fixed misc bugs 2015-12-22 17:00:54 +01:00
basicfileinfo.h First commit 2015-04-22 19:22:01 +02:00
caseinsensitivecomparer.h fixed includes 2015-09-06 19:57:33 +02:00
download_testfiles.sh parsing AVC config 2016-02-17 20:19:05 +01:00
exceptions.cpp fixed spelling mistakes 2015-10-16 21:46:36 +02:00
exceptions.h First commit 2015-04-22 19:22:01 +02:00
fieldbasedtag.h removed useless destructors 2015-12-21 18:35:47 +01:00
general.pri disable new ABI (can't catch ios_base::failure with new ABI) 2015-12-13 20:44:45 +01:00
genericcontainer.h fixed includes 2015-09-06 19:57:33 +02:00
genericfileelement.h fixed buffer being released instead of discarded 2015-12-21 00:03:04 +01: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 recognize ar and tar archives by magic number 2016-01-20 22:44:57 +01:00
mediafileinfo.h added more methods to control file layout when applying changes 2015-11-26 14:28:54 +01:00
mediaformat.cpp parsing AVC config 2016-02-17 20:19:05 +01:00
mediaformat.h parsing AVC config 2016-02-17 20:19:05 +01:00
nestingsupportingtag.h First commit 2015-04-22 19:22:01 +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 First commit 2015-04-22 19:22:01 +02:00
signature.cpp recognize ar and tar archives by magic number 2016-01-20 22:44:57 +01:00
signature.h recognize ar and tar archives by magic number 2016-01-20 22:44:57 +01:00
size.h fixed includes 2015-09-06 15:42:18 +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 fixed includes 2015-09-06 19:57:33 +02:00
tag.h fixed includes 2015-09-06 19:57:33 +02:00
tagparser.doxygen First commit 2015-04-22 19:22:01 +02:00
tagparser.pro parsing AVC config 2016-02-17 20:19:05 +01:00
tagtarget.cpp fixed includes 2015-09-06 19:57:33 +02:00
tagtarget.h allow specific targets to be created with createAppropriateTags() 2015-10-13 23:32:00 +02:00
tagvalue.cpp fixed includes 2015-09-06 19:57:33 +02:00
tagvalue.h fixed includes 2015-09-06 19:57:33 +02:00

README.md

Tag Parser

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

Supported formats

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

  • iTunes-style MP4 tags (MP4-DASH is supported)
  • ID3v1 and ID3v2 tags
  • Vorbis and Opus comments (cover art via "METADATA_BLOCK_PICTURE" is supported) in Ogg 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.

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 does not do any conversions for you (eg. converting Latin1 to UTF-8). However the API provides a way to check which encoding is present (when reading) and which encoding(s) can be used (when writing).

Usage

For examples check out the command line interface of my Tag Editor (which is also on Git).

Bugs, stability

  • Matroska files composed of more than one segment aren't tested yet and might not work.
  • To add new features I've had to revise a lot of code since the last release. I always test the library with files produced by mkvmerge and ffmpeg and several other file but can't verify that it will work with all files. Hence I recommend you to create backups of your 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 tag formats (EXIF, PDF metadata, ...).
  • Do tests with Matroska files which have multiple segments.