Tag Parser  6.4.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
README.md
Go to the documentation of this file.
1 # Tag Parser
2 C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags.
3 
4 ## Supported formats
5 The tag library can read and write the following tag formats:
6 - iTunes-style MP4/M4A tags (MP4-DASH is supported)
7 - ID3v1 and ID3v2 tags
8  - conversion between ID3v1 and different versions of ID3v2 is possible
9 - Vorbis, Opus and FLAC comments in Ogg streams
10  - cover art via "METADATA_BLOCK_PICTURE" is supported
11 - Vorbis comments and "METADATA_BLOCK_PICTURE" in raw FLAC streams
12 - Matroska/WebM tags and attachments
13 
14 ## File layout options
15 ### Tag position
16 The library allows you to choose whether tags should be placed at the beginning or at
17 the end of an MP4/Matroska file.
18 
19 ### Padding
20 Padding allows adding additional tag information without rewriting the entire file
21 or appending the tag. Usage of padding can be configured:
22 - minimum/maximum padding: The file is rewritten if the padding would fall below/exceed the specifed limits.
23 - preferred padding: If the file needs to be rewritten the preferred padding is used.
24 
25 Default value for minimum and maximum padding is zero. Hence the library will almost always have to rewrite
26 the entire file to apply changes. To prevent this, set at least the maximum padding to a higher value.
27 
28 It is also possible to force rewriting the entire file always.
29 
30 Taking advantage of padding is currently not supported when dealing with Ogg streams (it is supported when dealing with raw FLAC streams).
31 
32 ## Additional features
33 The library can also display technical information such as the ID, format, language, bitrate,
34 duration, size, timestamps, sampling frequency, FPS and other information of the tracks.
35 
36 It also allows to inspect and validate the element structure of MP4 and Matroska files.
37 
38 ## Text encoding, Unicode support
39 The library is aware of different text encodings and can convert between different encodings using iconv.
40 
41 ### Windows specific
42 A workaround to support filenames containing non-ASCII characters (despite the lack of an UTF-8
43 supporting `std::fstream` under Windows) can be enabled by adding `-DUSE_NATIVE_FILE_BUFFER=ON`
44 to the CMake arguments **when building `c++utilities`**. It is *not* sufficient to specify this
45 option only when building `tagparser`.
46 
47 ## Usage
48 For examples check out the command line interface of [Tag Editor](https://github.com/Martchus/tageditor).
49 API documentation can be generated using Doxygen with `make tagparser_apidoc`.
50 
51 ## Bugs, stability
52 It is recommend to create backups before editing because I can not test whether the library
53 works with all kinds of files (when forcing rewrite a backup is always created).
54 
55 ## Build instructions
56 The tagparser library depends on [c++utilities](https://github.com/Martchus/cpp-utilities) and is built
57 in the same way.
58 It also depends on zlib. For checking integrity of testfiles, the OpenSSL crypto
59 library is required.
60 
61 ## TODO
62 - Support more formats (EXIF, PDF metadata, Theora, ...)
63 - Support adding cue-sheet to FLAC files