2015-08-16 23:39:42 +02:00
|
|
|
# Tag Parser
|
2016-05-16 20:56:53 +02:00
|
|
|
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags.
|
2015-05-19 22:53:17 +02:00
|
|
|
|
2015-06-08 22:04:24 +02:00
|
|
|
## Supported formats
|
|
|
|
The tag library can read and write the following tag formats:
|
2016-05-16 20:56:53 +02:00
|
|
|
- iTunes-style MP4/M4A tags (MP4-DASH is supported)
|
2015-06-08 22:04:24 +02:00
|
|
|
- ID3v1 and ID3v2 tags
|
2016-05-16 20:56:53 +02:00
|
|
|
- conversion between ID3v1 and different versions of ID3v2 is possible
|
2016-05-14 00:24:01 +02:00
|
|
|
- Vorbis, Opus and FLAC comments in Ogg streams
|
|
|
|
- cover art via "METADATA_BLOCK_PICTURE" is supported
|
2016-05-16 20:56:53 +02:00
|
|
|
- Vorbis comments and "METADATA_BLOCK_PICTURE" in raw FLAC streams
|
2015-06-08 22:04:24 +02:00
|
|
|
- Matroska/WebM tags and attachments
|
|
|
|
|
2015-12-22 23:54:35 +01:00
|
|
|
## 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.
|
|
|
|
|
2016-05-16 20:56:53 +02:00
|
|
|
Taking advantage of padding is currently not supported when dealing with Ogg streams (it is supported when
|
|
|
|
dealing with raw FLAC streams).
|
2016-01-17 21:38:27 +01:00
|
|
|
|
2015-12-22 23:54:35 +01:00
|
|
|
## Additional features
|
2015-08-16 23:36:49 +02:00
|
|
|
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.
|
|
|
|
|
2015-06-08 22:04:24 +02:00
|
|
|
It also allows to inspect and validate the element structure of MP4 and Matroska files.
|
|
|
|
|
2015-12-27 18:06:01 +01:00
|
|
|
## 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).
|
|
|
|
|
2015-12-22 23:54:35 +01:00
|
|
|
## Usage
|
2016-06-10 23:08:01 +02:00
|
|
|
For examples check out the command line interface of my [Tag Editor](https://github.com/Martchus/tageditor).
|
2015-06-08 22:04:24 +02:00
|
|
|
|
2015-12-27 18:06:01 +01:00
|
|
|
## 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.
|
|
|
|
|
2015-05-19 22:53:17 +02:00
|
|
|
## Build instructions
|
|
|
|
The tagparser library depends on c++utilities and is built in the same way.
|
|
|
|
It also depends on zlib.
|
2015-08-16 23:39:42 +02:00
|
|
|
|
|
|
|
## TODO
|
2016-03-22 22:52:36 +01:00
|
|
|
- Support more formats (EXIF, PDF metadata, Theora, ...).
|
|
|
|
- Allow adding tags to specific streams when dealing with OGG.
|
2015-10-14 19:42:48 +02:00
|
|
|
- Do tests with Matroska files which have multiple segments.
|