我一直疑問為什麼有些視頻解碼時顯示格式是:H264,大部分又是:AVC1
我在搜尋編程資料時在微軟的msdn上發現的:
原文:http://msdn.microsoft.com/en-us/library/dd757808(v=vs.85).aspx
FOURCC:AVC1 描述:H.264 bitstream without start codes.
FOURCC:H264 描述:H.264 bitstream with start codes.
H.264 Bitstream with Start Codes
H.264 bitstreams that are transmitted over the air, or contained in MPEG-2 program or transport streams, or recorded on HD-DVD, are formatted as described in Annex B of ITU-T Rec. H.264. According to this specification, the bitstream consists of a sequence
of network abstraction layer units (NALUs), each of which is prefixed with a start code equal to 0x000001 or 0x00000001.
這段話的大致意思是:帶有開始碼的H.264視頻一般是用於無線發射、有線廣播或者HD-DVD中的。這些資料流的開始都有一個開始碼:0x000001 或者 0x00000001.
H.264 Bitstream 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 the NALU in bytes. The size of the length field can vary, but is typically 1, 2, or 4 bytes.
這段話的大致意思是:沒有開始碼的H.264視頻主要是儲存在MP4格式的檔案中的。它的資料流的開始是1、2或者4個位元組表示長度資料。
原文中的"NALU"簡單說是H.264格式中的最基本的單元,是一個資料包。
http://www.mysilu.com/archiver/?tid-721741.html