[A blog is only a record with poor technical skills. It is best to help visitors. I still hope that you will not give an axe to your mistakes or ambiguity. -- Preface]
The recorded information is not necessarily applicable only to MP4 containers. It is only found when the files of this type of containers are fixed.
1.Fourcc: "avc1" "h264" "h264 "...... What is the difference? From: http://msdn.microsoft.com/en-us/library/dd757808 (V = vs.85). aspx (it is recommended to read the original article directly)
The following media subtypes are definedfor H.264 video.
H.2bitstream with start Codes
H. 264 bitstreams that are transmittedover the air, or contained in MPEG-2 program or transport streams, or recordedon HD-DVD, are formatted as described in Annex B of ITU-T rec. h.264. Accordingto this specification, the bitstream
Consists of a sequence of networkequalaction layer units (nalus), each of which is prefixed with a start codeequal to 0x000001 or 0x00000001.
Specifiedtypes:Mediasubtype_h264,Mediasubtype_h264,Mediasubtype_x264, OrMediasubtype_x264
H.2bitstream without start Codes
The MP4 container format stores H.264 data without start codes. Instead, each NALU is prefixed by a length field, which gives the length of thenalu in bytes. The size of the length field can vary,
Is typically 1, 2, or4 bytes.
Specified types:Mediasubtype_avc1
[Therefore, when parse is used in some containers, such labels are as follows: v_h1__avc, v_h1__1_ B .]
The MP4 container might containsequence parameter sets (SPS) or picture parameter sets (PPS) as Special nalunits in file headers or in a separate stream (distinct from the video stream ). when the format is established, the media
Type can specify SPS and PPS nalunits inDwsequenceheaderArray. IfCbsequenceheaderIsgreater than zero,DwsequenceheaderIsthe start of a byte array containing SPS and PPS nalus, delimited by 2-bytelength
Fields, all in network byte order (big-Endian ). it is possible to haveboth SPS and PPS, only one of these types, or none. the actual type of eachnalu can be determined by examiningNal_unit_typeFieldof the NALU itself.
When this media type is used, eachmedia sample starts at the beginning of a nalu, and NAL units do not spansamples. This enables the decoder to recover from data preview uption or droppedsamples.