JT1078.FMp4 avcC avcC length:EntryCount stco stco length:EntryCount clap clap 4, 8 or 16 length:SampleCount DepOn:field_size=>DataType ctts ctts version == 1 16-1 16-15 ISO-639-2/T language code dinf dinf dref dref dref length:EntryCount sample_count is taken from the sample_count in the Sample Size Box ('stsz'). length:EntryCount length:EntryCount length:NumChannelsInSessionGroup 以null结尾 ftyp 盒子相当于就是该 mp4 的纲领性说明。即,告诉解码器它的基本解码版本,兼容格式。简而言之,就是用来告诉客户端,该 MP4 的使用的解码标准。通常,ftyp 都是放在 MP4 的开头。 ftyp 因为兼容性一般可以分为推荐兼容性和默认兼容性。这里 major_brand 就相当于是推荐兼容性。通常,在 Web 中解码,一般而言都是使用 isom 这个万金油即可。如果是需要特定的格式,可以自行定义。 4位 最低兼容版本 4位 和MajorBrand类似,通常是针对 MP4 中包含的额外格式,比如,AVC,AAC 等相当于的音视频解码格式。 4位*n moof mdat 填充值 填充数量 hdlr hdlr 0, 4, 8 0, 4, 8 0, 4, 8 version == 1 if (version == 1) 16-12 if (version == 1) 16-4 1byte 8-1 1byte 8-7 AssignmentType == 0 || assignment_type == 1 assignment_type == 1 assignment_type == 4 mdia mdia mdhd hdlr minf mdat mdat 过滤掉AUD/SPS/PPS NAL
然后将其他NAL写入Data中
Filter out AUD/SPS/PPS NAL units from your stream
Write you converted NAL units into the MDAT box
mdhd mdhd ISO-639-2/T language code ref:doc\fmp4\ISO Language Codes.txt und-undetermined minf minf vmhd dinf stbl moov moov mvhd trak mvex mvex mvex mehd trex mehd mehd moof moof mfhd traf mfhd mfhd mfra mfra tfra mfro mfro mfro mvhd mvhd btrt btrt pasp pasp if (version==0) length:entry_count length:entry_count default_sample_info_size==0 length:sample_count sdtp sdtp is taken from the sample_count in the Sample Size Box ('stsz') or Compact Sample Size Box(‘stz2’). stsd stsd if (version==1) stsz stsz if (sample_size==0) length:sample_count stbl stbl stsd stts ctts stsc stsz stco stsc stsc sbgp sbgp version == 1 if(version==0) if (version==0) 4byte 32 - 1 4byte 32 - 31 4byte 32 - 1 4byte 32 - 3 4byte 32 - 28 4btye 32 - 30 4btye 32 - 2 length:Length subs subs version == 1 uint32 version != 1 uint16 length:SubSegmentCount length:RangesCount 32 - 8 32 - 4 length:ItemCount stts stts trak trak tkhd mdia trex trex tfdt tfdt traf traf tfhd sdtp trun tfdt sbgp subs tfhd tfhd tfhd tfra tfra 26bit 2bit 2bit 2bit tkhd tkhd trun trun 可选的 可选的 可选的 length:SampleCount version == 0 uri uri uriI uriI vmhd vmhd null Video track Audio track Hint track Timed Metadata track Auxiliary Video track fmp4 ftyp moov fboxs mfra 日期限制于2000年 unsigned int(8) bit(24) ref 盒子大小 盒子类型 avc1 avc1 avcC btrt HintSampleEntry HintSampleEntry SampleEntry SampleEntry mett mett optional btrt optional urim urim uri uriI optional btrt optional VisualSampleEntry VisualSampleEntry clap optional pasp optional metx metx optional Namespace optional optional