Lossless Codec---APE代码解读系列(三)

APE代码解读系列(一)

APE代码解读系列(二)

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

 

 

 

 

 

 

 


 

 

     

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值