MP4文件的基本组成单元是box,也就是说MP4文件是由各种各样的box组成的,有parent box,还有children box。因此,这些boxes之间存在一定的层次关系,总结如下表所示,表中标记出了各个box必选或可选特性,√代表Box必选。
ftyp |
|
|
|
|
|
√ |
file type and compatibility |
pdin |
|
|
|
|
|
|
progressive download information |
moov |
|
|
|
|
|
√ |
container for all the metadata |
|
mvhd |
|
|
|
|
√ |
movie header, overall declarations |
|
trak |
|
|
|
|
√ |
container for an individual track or stream |
|
|
tkhd |
|
|
|
√ |
track header, overall information about the track |
|
|
tref |
|
|
|
|
track reference container |
|
|
edts |
|
|
|
|
edit list container |
|
|
|
elst |
|
|
|
an edit list |
|
|
mdia |
|
|
|
√ |
container for the media information in a track |
|
|
|
mdhd |
|
|
√ |
media header, overall information about the media |
|
|
|
hdlr |
|
|
√ |
handler, declares the media (handler) type |
|
|
|
minf |
|
|
√ |
media information container |
|
|
|
|
vmhd |
|
|
video media header, overall information (video track only) |
|
|
|
|
smhd |
|
|
sound media header, overall information (sound track only) |
|
|
|
|
hmhd |
|
|
hint media header, overall information (hint track only) |
|
|
|
|
nmhd |
|
|
Null media header, overall information (some tracks only) |
|
|
|
|
dinf |
|
√ |
data information box, container |
|
|
|
|
|
dref |
√ |
data reference box, declares source(s) of media data in track |
|
|
|
|
stbl |
|
√ |
sample table box, container for the time/space map |
|
|
|
|
|
stsd |
√ |
sample descriptions (codec types, initialization etc.) |
|
|
|
|
|
stts |
√ |
(decoding) time-to-sample |
|
|
|
|
|
ctts |
|
(composition) time to sample |
|
|
|
|
|
stsc |
√ |
sample-to-chunk, partial data-offset information |
|
|
|
|
|
stsz |
|
sample sizes (framing) |
|
|
|
|
|
stz2 |
|
compact sample sizes (framing) |
|
|
|
|
|
stco |
√ |
chunk offset, partial data-offset information |
|
|
|
|
|
co64 |
|
64-bit chunk offset |
|
|
|
|
|
stss |
|
sync sample table (random access points) |
|
|
|
|
|
stsh |
|
shadow sync sample table |
|
|
|
|
|
padb |
|
sample padding bits |
|
|
|
|
|
stdp |
|
sample degradation priority |
|
|
|
|
|
sdtp |
|
independent and disposable samples |
|
|
|
|
|
sbgp |
|
sample-to-group |
|
|
|
|
|
sgpd |
|
sample group description |
|
|
|
|
|
subs |
|
sub-sample information |
|
mvex |
|
|
|
|
|
movie extends box |
|
|
mehd |
|
|
|
|
movie extends header box |
|
|
trex |
|
|
|
√ |
track extends defaults |
|
ipmc |
|
|
|
|
|
IPMP Control Box |
moof |
|
|
|
|
|
|
movie fragment |
|
mfhd |
|
|
|
|
√ |
movie fragment header |
|
traf |
|
|
|
|
|
track fragment |
|
|
tfhd |
|
|
|
√ |
track fragment header |
|
|
trun |
|
|
|
|
track fragment run |
|
|
sdtp |
|
|
|
|
independent and disposable samples |
|
|
sbgp |
|
|
|
|
sample-to-group |
|
|
subs |
|
|
|
|
sub-sample information |
mfra |
|
|
|
|
|
|
movie fragment random access |
|
tfra |
|
|
|
|
|
track fragment random access |
|
mfro |
|
|
|
|
√ |
movie fragment random access offset |
mdat |
|
|
|
|
|
|
media data container |
free |
|
|
|
|
|
|
free space |
skip |
|
|
|
|
|
|
free space |
|
udta |
|
|
|
|
|
user-data |
|
|
cprt |
|
|
|
|
copyright etc. |
meta |
|
|
|
|
|
|
metadata |
|
hdlr |
|
|
|
|
√ |
handler, declares the metadata (handler) type |
|
dinf |
|
|
|
|
|
data information box, container |
|
|
dref |
|
|
|
|
data reference box, declares source(s) of metadata items |
|
ipmc |
|
|
|
|
|
IPMP Control Box |
|
iloc |
|
|
|
|
|
item location |
|
ipro |
|
|
|
|
|
item protection |
|
|
sinf |
|
|
|
|
protection scheme information box |
|
|
|
frma |
|
|
|
original format box |
|
|
|
imif |
|
|
|
IPMP Information box |
|
|
|
schm |
|
|
|
scheme type box |
|
|
|
schi |
|
|
|
scheme information box |
|
iinf |
|
|
|
|
|
item information |
|
xml |
|
|
|
|
|
XML container |
|
bxml |
|
|
|
|
|
binary XML container |
|
pitm |
|
|
|
|
|
primary item reference |
|
fiin |
|
|
|
|
|
file delivery item information |
|
|
paen |
|
|
|
|
partition entry |
|
|
|
fpar |
|
|
|
file partition |
|
|
|
fecr |
|
|
|
FEC reservoir |
|
|
segr |
|
|
|
|
file delivery session group |
|
|
gitn |
|
|
|
|
group id to name |
|
|
tsel |
|
|
|
|
track selection |
meco |
|
|
|
|
|
|
additional metadata container |
|
mere |
|
|
|
|
|
metabox relation |