澳门塔怎么玩:3gp文件格式研究 (转windcao的专栏)

来源:百度文库 编辑:偶看新闻 时间:2024/04/29 18:06:39

序言

06我开始做3gp文件的播放器,但是关于3gp的文档太少了也很难找,在网友luxh的帮助下,
我终于有了第一份关于3gp文件格式的文档《ISO/IEC 14496-12,ISO媒体文件格式》.
在此真心感谢luxh的贡献.
当然了是英文版的,有文档就不错了.为了便于查阅和理解,我把之后陆续找到的其他几个文档也揉在了一起.
从06年5月12日到现在2007-3-23,一点点的挤时间,总算写完了.如有错误,敬请斧正.
之所以写这篇文章目的只有一个,希望大家都能够少走弯路.
有用的到的人可以随意复制,转贴.
因为以后我有可能会对本文修改更新,所以请保留文中的原始链接.
愿意同我一道研究的人请加msn:windcao@hotmail.com

需要看的文档
http://www.3gpp.org/ftp/Specs/archive/26_series/
3GPP TS 26.233
3GPP TS 26.243
3GPP TS 26.244


luxh找到的一个好东西
http://isotc.iso.org/livelink/livelink/fetch/2000/2489/Ittf_Home/PubliclyAvailableStandards.htm
大家一定要仔细找找啊,宝藏!
我们研究3gpp文件最重要的两个文档就是《ISO/IEC 14496-12,ISO媒体文件格式》和《3GPP TS 26.244-700》


ISO/IEC 14496的组成如下:(引自:http://www.blogcn.com/user73/lipingfu/index.html
(1)ISO/IEC 14496-1,系统部分,描述了组成一个场景的音频和视频成分之间的关系。
(2、3)ISO/IEC 14496-2,视频部分和ISO/IEC 14496-3音频部分,分别规定自然的和合成的视频对象、音频对象的编码表示。
(4)ISO/IEC 14496-4,一致性测试部分,定义了比特流和设备的一致性条件,用来测试MPEG-4的实现。
(5)ISO/IEC 14496-5,参考软件,包括与MPEG-4的主要部分相对应的软件。
(6)ISO/IEC 14496-6,多媒体传送整体框架DMIF,这是MPEG-4应用层与传输网络的接口,定义了通信协议,使MPEG-4系统的数据流能进入各种传输网络。还包含一个存储格式MP4,用于存储编码的场景。
(7) ISO/IEC 14496-7,为MPEG-4工具优化软件,提供了对实现进行优化的例子(这里的实现指的是第五部分)。
(8)ISO/IEC 14496-8,定义了在IP网络上传输MPEG-4内容的方式。
(9)ISO/IEC 14496-9,为参考硬件描述,提供了用于演示怎样在硬件上实现本标准其他部分功能的硬件设计方案。
(10)ISO/IEC 14496-10,高级视频编码AVC,定义了一个被称为AVC的视频编解码器。
(11)ISO/IEC 14496-11,场景描述和应用引擎。
(12)ISO/IEC 14496-12,ISO媒体文件格式,定义了一个存储媒体内容的文件格式。
(13)ISO/IEC 14496-13,知识产权管理和保护(IPMP)扩展。
(14)ISO/IEC 14496-14,MP4文件格式,定义了基于第十二部分的用于存储MPEG-4内容的容器文件格式。
(15)ISO/IEC 14496-15,AVC文件格式,定义了基于第十二部分的用于存储第十部分的视频内容的文件格式。
(16)ISO/IEC 14496-16,动画框架扩展AFX(Animation Framework eXtension)。
(17)ISO/IEC 14496-17,同步文本字幕格式(尚未完成,2005年1月达成"最终委员会草案"。
(18)ISO/IEC 14496-18,字体压缩和流式传输(针对公开字体格式)。
(19)ISO/IEC 14496-19,综合材质流(Synthesized Texture Stream)。
(20)ISO/IEC 14496-20,简单场景表示(尚未完成,2005年1月达成"最终委员会草案"。
(21)ISO/IEC 14496-21,用于描绘(Rendering)的MPEG-J拓展(尚未完成,2005年1月达成"委员会草案"

我做的一个辅助工具http://download.csdn.net/source/162659 3gpp文件结构查看器, 版本是0.1.2http://download.csdn.net/source/162821 3gpp文件结构查看器, 版本是0.1.3这个工具的源码:http://download.csdn.net/source/162682

正文:
首先来说3gp文件相当于一个容器,本身没有什么具体的编码解码规则。
我们可以选择编码方式
- AMR narrow-band:编码简称'samr' 常用与语言片段的压缩,可以对声音片段进行最大程度的压缩,但是失真较大,如果用在音乐文件上结构常常是无法忍受的。

(详情请参考:3GPP TS 26.071: "Mandatory Speech CODEC speech processing functions; AMR Speech CODEC; General description".)

- AMR wideband:编码简称'sawb' 相对AMR narrow-band来说压缩比降低了,品质有所提升可用来压缩音乐。

(详情请参考:3GPP TS 26.171: "AMR Wideband Speech Codec; General Description".)

- Extended AMR-WB codec编码简称 'sawp'

(详情请参考:
3GPP TS 26.290: "Extended AMR Wideband codec; Transcoding functions".
3GPP TS 26.304: "ANSI-C code for the Floating-point; Extended AMR Wideband codec".
3GPP TS 26.273: "ANSI-C code for the Fixed-point; Extended AMR Wideband codec".

- Enhanced aacPlus and MPEG-4 AAC codec编码简称 'mp4a'

(详情请参考:
3GPP TS 26.401: "General audio codec audio processing functions; Enhanced aacPlus general audio codec; General description".
3GPP TS 26.410: "General audio codec audio processing functions; Enhanced aacPlus general audio codec; Floating-point ANSI-C code".
3GPP TS 26.411: "General audio codec audio processing functions; Enhanced aacPlus general audio codec; Fixed-point ANSI-C code".

- MPEG-4 video codec编码简称'mp4v'

(详情请参考:ISO/IEC 14496-2:2004: "Information technology – Coding of audio-visual objects – Part 2: Visual".)

- H.263 video codec编码简称'h263'

(详情请参考:ITU-T Recommendation H.263 (01/05): "Video coding for low bit rate communication".)

- H.264 video codec编码简称'avc1'

(详情请参考:ITU-T Recommendation H.264 (03/05): "Advanced video coding for generic audiovisual services"
ISO/IEC 14496-10:2005: "Information technology – Coding of audio-visual objects – Part 10: Advanced Video Coding".)

- 3GPP timed text format 编码简称'tx3g'

(详情请参考:3GPP TS 26.245: "Transparent end-to-end packet switched streaming service (PSS); Timed text format".)

其中手机最普遍支持的格式是 amr(音频) +h263(视频)

 

 3gp文件基于mpeg4由若干个box组成

 一个3gp文件由若干个box组成常见的有:

文件类型包:(FileTypeBox,简称代码'ftyp')
ftyp:文件类型包相当于文件头,说明了文件所使用的协议版本,编码格式等信息
+[4]-+[4]-+[4]-+[4]-+[4]-+
|size|ftyp|mjbr|mivs|cpbr|
+----+----+----+----+----+
mjbr:major_brand 版本分支
mivs:minor_version 版本号 
cpbr:compatible_brands 兼容分支

媒体数据包:(Media Data Box,简称代码'mdat')
"Media Data Box
Box类型: ‘mdat’
容器: 文件
是否必须: 否
数量: 任意个. "-luxh

mdat box 存放了音频视频和其他的数据,一般的文件至少有2个mdatbox, 一个用于音频,一个用于视频, 通常还会有一些文本信息也放在mdatbox中,各种信息的顺序不固定。 如果只是存放音乐一个mdat就够用了。

你可能会问这么多box 都叫mdat我怎么知道音频放哪里视频放哪里呢?别着急这些相关信息都放在moovbox里面

影片包:(moov box:Movie Box:)是一个3gp文件中最复杂最重要的文件。

看到这里你可能会问"moovbox里面的方框都分别代表什么含义呀?媒体描述信息是怎么存放的?",别着急咱们来慢慢分析一下。
"Movie Box
Box类型: 'moov';
容器: 文件
是否必须: 是
数量: 一个,并且只能是一个.

媒体的原始数据被放置在这个box中,这个box位于文件的最高级别,一般来说这个box接近于文件的开始或者末尾,尽管这并不被要求。语法如下:
a ligned(8) class MovieBox extends Box(‘moov’) {} "-luxh

moovbox 有两个必要的子box他们是影片头包和轨迹包
影片头包movie header,简称代码'mvhd'
首先剖析一下影片头包,顺便以此为例理解一下包的结构。
每一个包开头的4个字节都是一个整数存放了本包的长度。
接下来的4个字节是个字符串存放了本包的类型。如'moov','mvhd'。
基本上包都是这模样的:
+[4]-+[4]-+[size-8]-------------------+
|size|type|data                       |
+----+----+---------------------------+

很多box是这样的我们可以称之为全包(full box)
+[4]-+[4]-+-+---+[size-8]-------------------+
|size|type|v|flg|data                       |
+----+----+-+---+---------------------------+

简记为
+[4]-+[4]-+[4]-+[size-8]-------------------+
|size|type|vsfl|data                       |
+----+----+----+---------------------------+

其中vsfl:版本号标志

+-+---+
|v|flg|
+-+---+
v :version
flg:flages

在影片头包中接下来的是版本标志等信息。
MVHD 是媒体信息头,存放媒体的全局性的信息。
+[4]-+[4]-+[4]-+[4]-+[4]-+[4]-+[4]-+[76]----...---------+[4]-+
|size|mvhd|vsfl|cttm|mdtm|tmsc|mxtl|reserved...         |ntid|
+----+----+----+----+----+----+----+--------...---------+----+
size:box长度
type:文件类型标识内容为"mvhd"
vsfl:版本号标志
cttm:creat time 文件创建时间
mdtm:modification time  文件修改时间
tmsc:timescale 时间缩放因数
mxtl:maxTrackLen duration of longest track 最长播放时间
reserved: 保留字段
ntid-next trak id  下一个频道标识

轨迹包TRAK 也是一个容器,是单个媒体流频道的信息的容器,它有两个必要的子box:TKHD,MDIA。
TKHD 存放本trak的信息,有两个版本
v=0
+[4]-+[4]-+[4]-+[4]-+[4]-+[4]-+[4]-+[4]-+
|size|tkhd|vsfl|cttm|mdtm|tkid|resv|duat|
+----+----+----+----+----+----+----+----+
+[12]--------+2-+2-+[36]----...-+[4]-+[4]-+
|reserved    |ct|rs|reserved    |twvo|thvo|
+------------+--+--+--------...-+----+----+
v=1
+[4]-+[4]-+[4]-+[8]-----+[8]-----+[4]-+[4]-+[8]-----+
|size|tkhd|vsfl|cttm    |mdtm    |tkid|resv|duat    |
+----+----+----+--------+--------+----+----+--------+
+[12]--------+2-+2-+[36]----...-+[4]-+[4]-+
|reserved    |ct|rs|reserved    |twvo|thvo|
+------------+--+--+--------...-+----+----+

size:box长度
type:文件类型标识内容为"tkhd"
vsfl:版本号标志
cttm:creat time 文件创建时间
mdtm:modification time  文件修改时间
tkid:track-id 同一个文件中这是一个不重复的序列
resv:reserved 保留字段
duat:duration 总的播放时间长度
reserved: 保留字段
ct:codec_type {audio=0x0100; video=0} 编码类型,到底是音频还是视频等
rs:reserved 保留字段
reserved: 保留字段
如果这个track 是视频编码它将有如下字段,在你解码的时候非常有用.
twvo:Track width , for visual only 视频的宽度
thvo:Track height, for visual only 视频的高度

MDIA是存放具体的媒体信息的容器。
有且仅有3个子box:{MDHD,HDLR,MINF}

MDHD媒体头,也有两个版本
 v=0
+[4]-+[4]-+[4]-+[4]-+[4]-+[4]-+
|size|type|cttm|mdtm|tmsk|duat|
+----+----+----+----+----+----+

v=1
+[4]-+[4]-+[8]-----+[8]-----+[4]-+[8]-----+
|size|type|cttm    |mdtm    |tmsk|duat    |
+----+----+--------+--------+----+--------+
其中
size:box长度
type:文件类型标识内容为"mdhd"

pl:pad&language{bit(1) pad = 0;unsigned int(5)[3] language // ISO-639-2/T language code参见附录}
*-*[15]-----------*
|p|language       |
*-*---------------*

pd:unsigned int(16) pre_defined = 0;

HDLR 句柄,描述媒体类型
+[4]-+[4]-+[4]-+[12]--------+[size-24]--+
|size|pred|hdlt|reserved    |name       |
+----+----+----+------------+-----------+
size:box长度
type:文件类型标识内容为"tkhd"

pred:pre_defined = 0;
hdlt:handler_type;
 ‘vide’ Video track 视频
 ‘soun’ Audio track 音频
 ‘hint’ Hint track 注释
reserved: reserved = 0;
name: 名称字符串,0结尾的UTF-8串

MINF 媒体信息容器(Media Information Box)
这是一个普通的box容器.它的内部可能包含如下的子box:
VMHD,SMHD,HMHD,NMHD,DINF,STBL.
VMHD,SMHD,HMHD分别对应于视频,音频,注视,NMHD我还不太清楚.它们都属于fullbox.
DINF数据信息和STBL采样表,都是普通的box. VMHD还包括两个数据字段.
+[4]-+[4]-+[4]-+[4]-+
|gmod|opcl          |
+----+----+----+----+
 
gmod:graphicsmode 描述了本视频track 与其他视频track的混合方式.默认的值为0,也就是直接覆盖.
opcl:opcolor 透明色颜色值 (red, green, blue)如果gmod不是copy的话会用到.
SMHD包括两个字段
+--+--+
|bl|rs|
+--+--+
 
bl:balance 是一个定点小数(精度 8.8) 前8bits是整数,后8bits是小数.如果值为0说明左右声道是相同的.全左的情况下值为-1.0 全右则为1.0.
rs:reserved 保留字段.
HMHD包括5个字段.如下:
+--+--+[4]-+[4]-+[4]-+
|mp|ap|mbrt|abrt|resv|
+--+--+----+----+----+
 
mp:maxPDUsize 最大PDU长度 -pdu是啥???????? 知道啥是pdu的朋友请告诉我.
ap:avgPDUsize 平均PDU长度
mbrt:maxbitrate 最大比特率
abrt:avgbitrate 平均比特率
resv:reserved 保留字段

NMHD是个空的fullbox

DINF是一个普通的box,也是一个容器,它包括url,urn,dref三个fullbox
url 内部是一个UTF-8编码的0结尾的字符串
string location;
url里面则是两个
string name;
string location;
这两个都被称为DataEntryBox.
dref里面是一个url或者urn的列表.首先它有一个字段
unsigned int(32) entry_count;DataEntryBox的列表的个数.
然后就是DataEntryBox的列表

STBL是一个普通的box,也是一个容器,里面包含了很多媒体采样信息.

STTS是一个fullbox里面包含了采样的时间长度信息
内部的数据首先是列表长度
unsigned int(32) entry_count;
然后就是采用时长列表.
列表每一项都由两个字段组成.
unsigned int(32) sample_count;采样个数
unsigned int(32) sample_delta;每个采样的时间长度.

在认识stsd之前我们首先要了解一个数据结构SampleEntry和它的子类AudioSampleEntry,VisualSampleEntry和HintSampleEntry

SampleEntry 是一个继成box的抽象的数据结构模型.
除了size,type外它包括两个字段,如下:
+[4]-+[4]-+[6]---+--+
|size|type|resved|di|
+----+----+------+--+
resved:reserved,保留字段
di:data_reference_index,序号.
从这个抽象数据结构继承下来的三个子类分别增加了几个独特的新字段.

HintSampleEntry
+[4]-+[4]-+[6]---+--+[n]-+
|size|type|resved|di|data|
+----+----+------+--+----+
resved:reserved,保留字段
di:data_reference_index,序号.
data:是一个0结尾的utf8编码的字符串.

VisualSampleEntry
+[4]-+[4]-+[6]---+--+--+--+[12]---------+--+--+[4]-+[4]-+[4]-+--+[32]----...---+--+--+
|size|type|resved|di|pd|rs|pre_defined |wd|ht|hrsl|vrsl|resv|fc|compressorname|dp|pd|
+----+----+------+--+--+--+-------------+--+--+----+----+----+--+--------...---+--+--+
size:box长度
type:box:类型
resved:reserved,保留字段
di:data_reference_index,序号.
pd: pre_defined 保留字段
rs: reserved 保留字段
pd: pre_defined 保留字段
wd: width 视频的宽
ht: height 视频的高
hrsl: horizresolution 水平分辨率如0x00480000; // 72 dpi
vtsl: vertresolution 垂直分辨率如0x00480000; // 72 dpi
rd: reserved 保留字段
fc: frame_count 每个采样里面的贞数,一般是1;
cmpn: compressorname 是一个数字开头的字符串.并且末尾有填料.对齐到32位.
  +-+[n]-+[x]-+
  |n|data|xpad|
  +-+----+----+
n:number of data.数据的长度,x+n+1=32
dp: depth 视频的色深 0x18 表示24位色
pd: pre_defined 保留字段

AudioSampleEntry
+[4]-+[4]-+[6]---+--+[8]-----+--+--+--+--+[4]-+
|size|type|resved|di|reserved|cc|ss|pd|rs|sprt|
+----+----+------+--+--------+--+--+--+--+----+

resved:reserved,保留字段
di:data_reference_index,序号.
reserved:保留字段
cc: channelcount 声道数1或者2;
ss: samplesize 采样位数大小 8bit 8 ;16bit 16;
pd: pre_defined 保留字段
rs: reserved保留字段
sprt:samplerate 采样率

stsd是一个采样包(SampleEntry)的列表,一般来讲同一个列表中只有一种SampleEntry.
可以通过hdlr里面的handler_type来判断属于哪种SampleEntry.
内部的数据首先是列表长度,一个32位无符号整数 entry_count;
然后就是采样包列表.
采样包有很多具体的实现.如下: +MP4VisualSampleEntry:MP4视频采样包. +[4]-+[4]-+[6]---+--+--+--+[12]---------+--+--+[4]-+[4]-+[4]-+--+[32]----...---+--+--+[n]-+
|size|type|resved|di|pd|rs|pre_defined |wd|ht|hrsl|vrsl|resv|fc|compressorname|dp|pd|esds|
+----+----+------+--+--+--+-------------+--+--+----+----+----+--+--------...---+--+--+----+
size:box长度
type:box类型,内容'mp4v'
resved:reserved,保留字段
di:data_reference_index,序号.
pd: pre_defined 保留字段
rs: reserved 保留字段
pd: pre_defined 保留字段
wd: width 视频的宽
ht: height 视频的高
hrsl: horizresolution 水平分辨率如0x00480000; // 72 dpi
vtsl: vertresolution 垂直分辨率如0x00480000; // 72 dpi
rd: reserved 保留字段
fc: frame_count 每个采样里面的贞数,一般是1;
compressorname: 是一个数字开头的字符串.并且末尾有填料.对齐到32位.
dp: depth 视频的色深 0x18 表示24位色
pd: pre_defined 保留字段
+esds:原子数据流描述包(Elementary Stream Data Box). ES_ID — set to 0 as stored; when built into a stream, the lower 16 bits of the TrackID are used.
streamDependenceFlag — set to 0 as stored; if a dependency exists, it is indicated using a track reference of type ‘dpnd’.
URLflag — kept untouched, i.e. set to false, as the stream is in the file, not remote.
SLConfigDescriptor — is predefined type 2.
OCRStreamFlag — set to false in the file.
+MP4AudioSampleEntry:Entry type for audio samples defined in the MP4 specification. +[4]-+[4]-+[6]---+--+[8]-----+--+--+--+--+[4]-+[n]-+
|size|type|resved|di|reserved|cc|ss|pd|rs|sprt|esds|
+----+----+------+--+--------+--+--+--+--+----+----+
resved:reserved,保留字段
di:data_reference_index,序号.
reserved:保留字段
cc: channelcount 声道数1或者2;
ss: samplesize 采样位数大小 8bit 8 ;16bit 16;
pd: pre_defined 保留字段
rs: reserved保留字段
sprt:samplerate 采样率
+esds:Elementary Stream Data Box.Box containing an elementary stream descriptor for this stream. ES_ID — set to 0 as stored; when built into a sntream, the lower 16 bits of the TrackID are used.
streamDependenceFlag — set to 0 as stored; if a dependency exists, it is indicated using a track reference of type ‘dpnd’.
URLflag — kept untouched, i.e. set to false, as the stream is in the file, not remote.
SLConfigDescriptor — is predefined type 2.
OCRStreamFlag — set to false in the file.
+AMRSampleEntry:Entry type for AMR and AMR-WB speech samples defined in clause 6.5 of the present document. +[4]-+[4]-+[6]---+--+[8]-----+--+--+--+--+[4]-+[n]-+
|size|type|resved|di|reserved|cc|ss|pd|rs|sprt|damr|
+----+----+------+--+--------+--+--+--+--+----+----+
type:'samr' resved:reserved,保留字段
di:data_reference_index,序号.
reserved:保留字段
cc: channelcount 声道数1或者2;
ss: samplesize 采样位数大小 8bit 8 ;16bit 16;
pd: pre_defined 保留字段
rs: reserved保留字段
sprt:samplerate 采样率
+damr:AMRSpecificBox +[4]-+[4]-+[4]-+-+--+-+-+
|size|type|vend|d|ms|m|f|
+----+----+----+-+--+-+-+
type:'damr' vend:vendor
d:decoder_version
ms:mode_set
m:mode_change_period
f:frames_per_sample
+AMRWPSampleEntry:Entry type for AMR and AMR-WB speech samples defined in clause 6.5 of the present document. +[4]-+[4]-+[6]---+--+[8]-----+--+--+--+--+[4]-+[n]-+
|size|type|resved|di|reserved|cc|ss|pd|rs|sprt|dawp|
+----+----+------+--+--------+--+--+--+--+----+----+
type:'sawb' resved:reserved,保留字段
di:data_reference_index,序号.
reserved:保留字段
cc: channelcount 声道数1或者2;
ss: samplesize 采样位数大小 8bit 8 ;16bit 16;
pd: pre_defined 保留字段
rs: reserved保留字段
sprt:samplerate 采样率
+dawp:AMRWPDecSpecStruc The AMRWPDecSpecStruc is defined as follows: +[4]-+[4]-+[4]-+-+
|size|type|vend|d|
+----+----+----+-+
type:'dawp'
vend:vendor
d:decoder_version
+H263SampleEntry:Entry type for H.263 visual samples defined in clause 6.6 of the present document. +[4]-+[4]-+[6]---+--+--+--+[12]---------+--+--+[4]-+[4]-+[4]-+--+[32]----...---+--+--+[n]-+
|size|type|resved|di|pd|rs|pre_defined |wd|ht|hrsl|vrsl|resv|fc|compressorname|dp|pd|d263|
+----+----+------+--+--+--+-------------+--+--+----+----+----+--+--------...---+--+--+----+
size:box长度
type:box类型,内容's263'
resved:reserved,保留字段
di:data_reference_index,序号.
pd: pre_defined 保留字段
rs: reserved 保留字段
pd: pre_defined 保留字段
wd: width 视频的宽
ht: height 视频的高
hrsl: horizresolution 水平分辨率如0x00480000; // 72 dpi
vtsl: vertresolution 垂直分辨率如0x00480000; // 72 dpi
resv: reserved 保留字段
fc: frame_count 每个采样里面的贞数,一般是1;
compressorname: 是一个数字开头的字符串.并且末尾有填料.对齐到32位.
dp: depth 视频的色深 0x18 表示24位色
pd: pre_defined 保留字段
+d263:H263SpecificBox Information specific to the H.263 decoder. +[4]-+[4]-+[n]-------------+[m]-------+
|size|type|H263DecSpecStruc|BitrateBox|
+----+----+----------------+----------+
type:内容'd263'

+H263DecSpecStruc: H.263 信息包
H263DecSpecStruc 注意这不是一个包而是个结构.

+[4]-+-+-+-+
|vend|d|l|p|
+----+-+-+-+

vend:vendor 销售商,4位的字符串例如 'VXYZ'
d:decoder_version解码器版本
l:H263_Level h263版本
p:H263_Profile h263特性
l和p这两个定义是基于MIME media type video/H263-2000标准的
The profile and level specifications can be found in [9].
请参考ITU-T Recommendation H.263 (1998): "Video coding for low bit rate communication".
例 1: H.263 基本 = {H263_Level = 10, H263_Profile = 0}
例 2: H.263 Profile 3 @ Level 10 = {H263_Level = 10 , H263_Profile = 3}
注意:hint轨迹也可能引用这个结构中的信息.
+BitrateBox:比特率信息包(可选的) +[4]-+[4]-+[4]-+[4]-+
|size|type|avbr|mabr|
+----+----+----+----+

type:‘bitr’
avbr: Avg_Bitrate 平均比特率
mabr: Max_Bitrate 平均比特率
+AVCSampleEntry:Entry type for H.264 (AVC) visual samples defined in the AVC file format specification. 请参考ISO/IEC 14496-15: 2004: "Information technology – Coding of audio-visual objects –
Part 15: Advanced Video Coding (AVC) file format". +TextSampleEntry:Entry type for timed text samples defined in the timed text specification ISO/IEC 14496-17,同步文本字幕格式 歌词可以放在这个里面. +HintSampleEntry:Entry type for hint track samples defined in the ISO specification.

附录:
ISO-639-2/T language code

                        ISO 639-2 CodeISO 639-1 CodeEnglish name of Language                            aar            aa            Afar                            abk            ab            Abkhazian                            ace                         Achinese                            ach                         Acoli                            ada                         Adangme                            ady                         Adyghe; Adygei                            afa                         Afro-Asiatic (Other)                            afh                         Afrihili                            afr            af            Afrikaans                            ain                         Ainu                            aka            ak            Akan                            akk                         Akkadian                            alb/sqi            sq            Albanian                            ale                         Aleut                            alg                         Algonquian languages                            alt                         Southern Altai                            amh            am            Amharic                            ang                         English, Old (ca.450-1100)                            anp                         Angika                            apa                         Apache languages                            ara            ar            Arabic                            arc                         Aramaic                            arg            an            Aragonese                            arm/hye            hy            Armenian                            arn                         Araucanian                            arp                         Arapaho                            art                         Artificial (Other)                            arw                         Arawak                            asm            as            Assamese                            ast                         Asturian; Bable                            ath                         Athapascan languages                            aus                         Australian languages                            ava            av            Avaric                            ave            ae            Avestan                            awa                         Awadhi                            aym            ay            Aymara                            aze            az            Azerbaijani                            bad                         Banda                            bai                         Bamileke languages                            bak            ba            Bashkir                            bal                         Baluchi                            bam            bm            Bambara                            ban                         Balinese                            baq/eus            eu            Basque                            bas                         Basa                            bat                         Baltic (Other)                            bej                         Beja                            bel            be            Belarusian                            bem                         Bemba                            ben            bn            Bengali                            ber                         Berber (Other)                            bho                         Bhojpuri                            bih            bh                            bik                         Bikol                            bin                         Bini                            bis            bi            Bislama                            bla                         Siksika                            bnt                         Bantu (Other)                            tib/bod            bo            Tibetan                            bos            bs            Bosnian                            bra                         Braj                            bre            br            Breton                            btk                         Batak (Indonesia)                            bua                         Buriat                            bug                         Buginese                            bul            bg            Bulgarian                            bur/mya            my            Burmese                            byn                         Blin; Bilin                            cad                         Caddo                            cai                         Central American Indian (Other)                            car                         Carib                            cat            ca            Catalan; Valencian                            cau                         Caucasian (Other)                            ceb                         Cebuano                            cel                         Celtic (Other)                            cze/ces            cs            Czech                            cha            ch            Chamorro                            chb                         Chibcha                            che            ce            Chechen                            chg                         Chagatai                            chi/zho            zh            Chinese                            chk                         Chuukese                            chm                         Mari                            chn                         Chinook jargon                            cho                         Choctaw                            chp                         Chipewyan                            chr                         Cherokee                            chu            cu            Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic                            chv            cv            Chuvash                            chy                         Cheyenne                            cmc                         Chamic languages                            cop                         Coptic                            cor            kw            Cornish                            cos            co            Corsican                            cpe                         Creoles and pidgins, English based (Other)                            cpf                         Creoles and pidgins, French-based (Other)                            cpp                         Creoles and pidgins, Portuguese-based (Other)                            cre            cr            Cree                            crh                         Crimean Tatar; Crimean Turkish                            crp                         Creoles and pidgins (Other)                            csb                         Kashubian                            cus                         Cushitic (Other)                            wel/cym            cy            Welsh                            cze/ces            cs            Czech                            dak                         Dakota                            dan            da            Danish                            dar                         Dargwa                            day                         Dayak                            del                         Delaware                            den                         Slave (Athapascan)                            ger/deu            de            German                            dgr                         Dogrib                            din                         Dinka                            div            dv            Divehi; Dhivehi; Maldivian                            doi                         Dogri                            dra                         Dravidian (Other)                            dsb                         Lower Sorbian                            dua                         Duala                            dum                         Dutch, Middle (ca.1050-1350)                            dut/nld            nl            Dutch; Flemish                            dyu                         Dyula                            dzo            dz            Dzongkha                            efi                         Efik                            egy                         Egyptian (Ancient)                            eka                         Ekajuk                            gre/ell            el            Greek, Modern (1453-)                            elx                         Elamite                            eng            en            English                            enm                         English, Middle (1100-1500)                            epo            eo            Esperanto                            est            et            Estonian                            baq/eus            eu            Basque                            ewe