刘品
学以致用---博主简介:专注语音、视频数字信号处理方面的研究以及算法在手机平台上面的移植和优化。涉及语音/音频编解码,语音增强,语音识别,语音音质客观评估,VOIP语音引擎 Qos算法模块和声音变速不变调和变调不变速等功能实现。熟悉ARM 各个系列的CPU,用ARMv4,ARMv5,ARMv6 and Cortex Neon 汇编优化相关算法代码,争取perforamance 最优。目前主要Windows mobile and Android platform上做相关speech/audio算法以及应用开发, HEVC 编解码器PC 和手机上的开发与应用。(交流Email:liupin.2008@gmail.com)

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

 

 

 

 

 

 

 


 

 

     

posted on 2009-12-14 13:45  liupin  阅读(1725)  评论(0编辑  收藏  举报

-->