MP4(MPEG-4 Part 14)是一种常见的多媒体容器格式,它是在“ISO/IEC 14496-14”标准文件中定义的。

1.最小组成单元 BOX

像FLV的tag、MKV的EBML、ASF文件中的 ASF object.mp4 是由一系列的box组成,他的最小组成单元就是box.



size;指明了整个box所占用的大小,包括header部分.
type;表示这个box的类型。(附表1)
largesize;如果box很大超过了uint32的最大数值,size就被设置为1,并用接下来的  largesize来存放大小。

2.mp4文件整体结构


mp4文件说白了就是一系列box组成,大box里面有小box。
接下来会深入到具体的box里面,来具体分析mp4格式
未完待续.....


附表1

CodeAbstractDefined in/by
ainfAsset information to identify, license and playDECE
albmAlbum title and track number (user-data)3GPP
authMedia author name (user-data)3GPP
avcnAVC NAL Unit Storage BoxDECE
blocBase location and purchase location for license acquisitionDECE
bpccBits per componentJP2
buffBuffering informationAVC
bxmlbinary XML containerISO
ccidOMA DRM Content IDOMA DRM 2.1
cdeftype and ordering of the components within the codestreamJP2
clsfMedia classification (user-data)3GPP
cmapmapping between a palette and codestream componentsJP2
co6464-bit chunk offsetISO
colrspecifies the colourspace of the imageJP2
cprtcopyright etc. (user-data)ISO
crhdreserved for ClockReferenceStream headerMP4V1
cslgcomposition to decode timeline mappingISO
ctts(composition) time to sampleISO
cvruOMA DRM Cover URIOMA DRM 2.1
dcfDMarlin DCF Duration, user-data atom typeOMArlin
dinfdata information box, containerISO
drefdata reference box, declares source(s) of media data in trackISO
dscpMedia description (user-data)3GPP
dsgdDVB Sample Group Description BoxDVB
dstgDVB Sample to Group BoxDVB
edtsedit list containerISO
elstan edit listISO
feciFEC InformatiomISO
fecrFEC ReservoirISO
fiinFD Item InformationISO
fireFile ReservoirISO
fparFile PartitionISO
freefree spaceISO
frmaoriginal format boxISO
ftypfile type and compatibilityJP2ISO
gitnGroup ID to nameISO
gnreMedia genre (user-data)3GPP
grpiOMA DRM Group IDOMA DRM 2.0
hdlrhandler, declares the media (handler) typeISO
hmhdhint media header, overall information (hint track only)ISO
hpixHipix Rich Picture (user-data or meta-data)HIPIX
icnuOMA DRM Icon URIOMA DRM 2.0
ID32ID3 version 2 containerinline
idatItem dataISO
ihdrImage HeaderJP2
iinfitem informationISO
ilocitem locationISO
imifIPMP Information boxISO
infuOMA DRM Info URLOMA DRM 2.0
iodsObject Descriptor container boxMP4V1
iphdreserved for IPMP Stream headerMP4V1
ipmcIPMP Control BoxISO
iproitem protectionISO
irefItem referenceISO
jP$20$20JPEG 2000 SignatureJP2
jp2cJPEG 2000 contiguous codestreamJP2
jp2hHeaderJP2
jp2iintellectual property informationJP2
kywdMedia keywords (user-data)3GPP
lociMedia location information (user-data)3GPP
lrcuOMA DRM Lyrics URIOMA DRM 2.1
m7hdreserved for MPEG7Stream headerMP4V1
mdatmedia data containerISO
mdhdmedia header, overall information about the mediaISO
mdiacontainer for the media information in a trackISO
mdriMutable DRM informationOMA DRM 2.0
mecoadditional metadata containerISO
mehdmovie extends header boxISO
meremetabox relationISO
metaMetadata containerISO
mfhdmovie fragment headerISO
mfraMovie fragment random accessISO
mfroMovie fragment random access offsetISO
minfmedia information containerISO
mjhdreserved for MPEG-J Stream headerMP4V1
moofmovie fragmentISO
moovcontainer for all the meta-dataISO
mvcgMultiview groupAVC
mvciMultiview InformationAVC
mvexmovie extends boxISO
mvhdmovie header, overall declarationsISO
mvraMultiview Relation AttributeAVC
nmhdNull media header, overall information (some tracks only)ISO
ochdreserved for ObjectContentInfoStream headerMP4V1
odafOMA DRM Access Unit FormatOMA DRM 2.0
oddaOMA DRM Content ObjectOMA DRM 2.0
odhdreserved for ObjectDescriptorStream headerMP4V1
odheOMA DRM Discrete Media HeadersOMA DRM 2.0
odrbOMA DRM Rights ObjectOMA DRM 2.0
odrmOMA DRM ContainerOMA DRM 2.0
odttOMA DRM Transaction TrackingOMA DRM 2.0
ohdrOMA DRM Common headersOMA DRM 2.0
padbsample padding bitsISO
paenPartition EntryISO
pclrpalette which maps a single component in index space to a multiple- component imageJP2
pdinProgressive download informationISO
perfMedia performer name (user-data)3GPP
pitmprimary item referenceISO
res$20grid resolutionJP2
rescgrid resolution at which the image was capturedJP2
resddefault grid resolution at which the image should be displayedJP2
rtngMedia rating (user-data)3GPP
sbgpSample to Group boxAVC, ISO
schischeme information boxISO
schmscheme type boxISO
sdepSample dependencyAVC
sdhdreserved for SceneDescriptionStream headerMP4V1
sdtpIndependent and Disposable Samples BoxAVC, ISO
sdvpSD Profile BoxSDV
segrfile delivery session groupISO
sencSample specific encryption dataDECE
sgpdSample group definition boxAVC, ISO
sidxSegment Index Box3GPP
sinfprotection scheme information boxISO
skipfree spaceISO
smhdsound media header, overall information (sound track only)ISO
srmbSystem Renewability MessageDVB
srmcSystem Renewability Message containerDVB
srppSTRP ProcessISO
stblsample table box, container for the time/space mapISO
stcochunk offset, partial data-offset informationISO
stdpsample degradation priorityISO
sthdSubtitle Media Header BoxDECE
stscsample-to-chunk, partial data-offset informationISO
stsdsample descriptions (codec types, initialization etc.)ISO
stshshadow sync sample tableISO
stsssync sample table (random access points)ISO
stszsample sizes (framing)ISO
stts(decoding) time-to-sampleISO
stypSegment Type Box3GPP
stz2compact sample sizes (framing)ISO
subsSub-sample informationISO
swtcMultiview Group RelationAVC
tfadTrack fragment adjustment box3GPP
tfhdTrack fragment headerISO
tfmaTrack fragment media adjustment box3GPP
tfraTrack fragment radom accessISO
tibrTier Bit rateAVC
tiriTier InformationAVC
titlMedia title (user-data)3GPP
tkhdTrack header, overall information about the trackISO
trafTrack fragmentISO
trakcontainer for an individual track or streamISO
treftrack reference containerISO
trextrack extends defaultsISO
trgrTrack grouping informationISO
trikFacilitates random access and trick play modesDECE
truntrack fragment runISO
tselTrack selection (user-data)3GPP
udtauser-dataISO
uinfa tool by which a vendor may provide access to additional information associated with a UUIDJP2
UITSUnique Identifier Technology SolutionUniversal Music
ulsta list of UUID’sJP2
url$20a URLJP2
uuiduser-extension boxISOJP2
vmhdvideo media header, overall information (video track only)ISO
vwdiMultiview Scene InformationAVC
xml$20a tool by which vendors can add XML formatted informationJP2
xml$20XML containerISO
yrrcYear when media was recorded (user-data)3GPP

QuickTime Codes

CodeAbstractDefined in/by
clipVisual clipping region containerQT
crgnVisual clipping region definitionQT
ctabTrack color-tableQT
elngExtended Language TagQT
imapTrack input map definitionQT
kmatCompressed visual track matteQT
loadTrack pre-load definitionsQT
mattVisual track matte for compositingQT
pnotPreview containerQT
wideExpansion space reservationQT





Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐