APE tag 详细介绍
APEv1 is an older version of APEv2 and uses essentially the same format. APEv1 has all info values stored as ASCII, while APEv2 uses UTF-8. Also APEv2 has a header that marks the beginning of the tag, making it easier to detect when streaming etc.
APEv1 is used by older versions of Monkey's Audio.
APEv1 specification
This is how information is laid out in an APEv1 tag:
The only difference between APEv1 and APEv2 is that APEv1 has no header. Therefore, it is strongly recommended that developers adopt v2 instead of v1 as standard tagging system for their formats.
APE Tag Item 1 | 10.. bytes |
APE Tag Item 2 | 10.. bytes |
... | 10.. bytes |
APE Tag Item n-1 | 10.. bytes |
APE Tag Item n | 10.. bytes |
APE Tags Footer | 32 bytes |
APE tag items should be sorted ascending by size. When streaming, parts of the APE tags can be dropped to reduce danger of drop outs between titles. This is not a must, but strongly recommended. Actually the items should be sorted by importance/byte, but this is not feasible. Only break this rule if you add less important small items and you don't want to rewrite the whole tag. An APE tag at the end of a file (strongly recommended) must have at least a footer, an APE tag in the beginning of a file (strongly unrecommended) must have at least a header. When located at the end of an MP3 file, an APE tag should be placed after the the last frame, just before the ID3v1 tag (if any).
APEv2 is a tagging format derived from APEv1 originally developed for MPC audio files, and is now also used in Monkey's Audio, WavPack and OptimFROG. It can also be used with other formats when using programs like foobar2000 or Tag (a program that can create and read tags). It is comparable in functionality to Vorbis comment. Just like Vorbis comment it defines some standard fields, but it also defines some formats for those fields (like what a date should look like).
APEv2 also differs from Vorbis comment in the way lists of values are handled. Suppose a certain song has two artists. In Vorbis comment this will result in two ARTIST entries, but in APEv2 this will result in one Artist field with the two artists separated by a null character (a byte with the value zero).
APEv2 specification
This is how information is laid out in an APEv2 tag:
APE Tags Header | 32 bytes |
APE Tag Item 1 | 10.. bytes |
APE Tag Item 2 | 10.. bytes |
... | 10.. bytes |
APE Tag Item n-1 | 10.. bytes |
APE Tag Item n | 10.. bytes |
APE Tags Footer | 32 bytes |
APE tag items should be sorted ascending by size. When streaming, parts of the APE tags can be dropped to reduce danger of drop outs between titles. This is not a must, but strongly recommended. Actually the items should be sorted by importance/byte, but this is not feasible. Only break this rule if you add less important small items and you don't want to rewrite the whole tag. An APE tag at the end of a file (strongly recommended) must have at least a footer, an APE tag in the beginning of a file (strongly unrecommended) must have at least a header. When located at the end of an MP3 file, an APE tag should be placed after the the last frame, just before the ID3v1 tag (if any).
Link:http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification