The TTA format has no tag block of its own. The format’s authors say it supports ID3v1, ID3v2 and APEv2 tags, and those are the three kinds found on real files. They are the ordinary tags, read with the same rules as in MP3 and Monkey’s Audio files: this page says where they go and how a reader finds them. The explorer shows each as a table of fields, and shows pictures.
Where each kind sits
| Tag | Position | How it is found |
|---|---|---|
| ID3v2 | In front of the TTA1 header | The file starts with ID3, a version, flags and a size written 7 bits to a byte; the header follows the tag exactly (ttaenc, libtta and FFmpeg all skip the tag by its size; ttaenc-dev 2.0 and libtta also add 10 bytes when bit 4 of the flags, the ID3v2.4 footer flag, is set, and the explorer does for a version 2.4 tag). Every offset in the file moves by the tag’s length, but the seek table’s sizes do not change. |
| APEv2 | After the last frame, before an ID3v1 tag | The 32 bytes before the end (or before the ID3v1 tag) begin APETAGEX: that is its footer, with the tag’s size; a header of the same 32 bytes may open it. |
| ID3v1 | The last 128 bytes | The 128 bytes before the end start with TAG. |
Nothing in a TTA file marks where the frames end: the end of the last frame is the end of the seek table’s sizes added up. Anything after that is a tag, or damage. A reader therefore reads the frames from the table and looks for the end tags by their signatures, which is what the explorer does (a tag in front is found first, then the end tags from the end inwards).
Worked example
A file with an APEv2 tag and an ID3v1 tag after the last frame (the explorer’s test file
enc-tag-apev2-id3v1.tta; the end of its last frame is just before the first
line):
… 41 72 74 69 73 74 00 41 50 45 20 61 72 74 69 73 74 Artist.APE artist the end of an APE item: key, 0, value
59 65 61 72 00 32 30 32 36 Year.2026
41 50 45 54 41 47 45 58 APETAGEX (the footer)
D0 07 00 00 version 2000
78 00 00 00 tag size 120 (items and footer)
04 00 00 00 4 items
00 00 00 80 flags: bit 31 set, the tag has a header
00 00 00 00 00 00 00 00 reserved
54 41 47 … TAG: the 128-byte ID3v1 tag follows (title, artist, album, year, comment, track, genre)
Because the footer says the tag has a header, the tag starts 32 bytes before the first item,
at APETAGEX again.
What readers do
- ttaenc 3.4.1 copies an ID3v2 tag in front when encoding and skips it when decoding.
- FFmpeg reads an ID3v1 tag at the end, an ID3v2 tag in front (automatically), and an APEv2 tag from the end (after it has read the seek table).
- A file that has tags in more than one place is unusual but legal: the combinations ID3v2 + APEv2 + ID3v1, APEv2 + ID3v1 and APEv2 without a header were built and read for the explorer’s tests.
Not described
Known, not yet covered
- Reference: the byte layouts of the three tag kinds are on their own pages (linked above), not repeated here.
Unknown
- Reference: which tag the official TTA tools prefer to write, and whether any real file has the tags in an order other than ID3v2, APEv2, ID3v1.