TA的每日心情 | 奋斗 2020-5-6 08:48 |
---|
签到天数: 140 天 [LV.7]常住居民III
|
我一直疑问为什么有些视频解码时显示格式是:H264,大部分又是:AVC1- b/ w1 a& _8 h- {+ e. o4 F
我在搜索编程资料时在微软的msdn上发现的:5 h1 O g L$ R8 d9 |
原文:http://msdn.microsoft.com/en-us/library/dd757808(v=vs.85).aspx v/ v1 k! W6 F. l9 R
FOURCC:AVC1 描述:H.264 bitstream without start codes.
, h! t. W$ ]! p! U FOURCC:H264 描述:H.264 bitstream with start codes.$ d$ d/ g2 `, Q. v
" b; A6 L1 K; v0 N
% j+ N! e# c6 d `% S; }* V4 o5 g) x H.264 Bitstream with Start Codes
8 e4 H( G* k" T7 c0 D, J0 L' o8 B6 ~. N
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.
2 [7 r5 \# ?5 P这段话的大致意思是:带有开始码的H.264视频一般是用于无线发射、有线广播或者HD-DVD中的。这些数据流的开始都有一个开始码:0x000001 或者 0x00000001.* G% g$ i6 h* r" u3 m" F
2 Q9 C. @3 n8 w- {! X/ f
3 D% k, E; T2 p& q/ e. n9 I H.264 Bitstream Without Start Codes' _7 a2 \% K4 G# E. s) C, G3 {% r5 u
; A' C7 b: F, C/ G' F* o 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.8 E- D: `8 s! a, e# {; D; r
这段话的大致意思是:没有开始码的H.264视频主要是存储在MP4格式的文件中的。它的数据流的开始是1、2或者4个字节表示长度数据。
0 Z0 j( V7 L2 b% k) U. V原文中的"NALU"简单说是H.264格式中的最基本的单元,是一个数据包。! @7 |# F5 S) [* y
|
|