TA的每日心情 | 奋斗 2020-5-6 08:48 |
---|
签到天数: 140 天 [LV.7]常住居民III
|
我一直疑问为什么有些视频解码时显示格式是:H264,大部分又是:AVC1- \3 {( \! A; y/ J4 q/ V4 ]
我在搜索编程资料时在微软的msdn上发现的:
0 t6 H. Y! `8 q9 X- U- ? 原文:http://msdn.microsoft.com/en-us/library/dd757808(v=vs.85).aspx
. J; b. T+ Q b8 W FOURCC:AVC1 描述:H.264 bitstream without start codes.
$ a+ t" Z, y; |. g6 l) {: h( j, @( q FOURCC:H264 描述:H.264 bitstream with start codes.2 i- n9 E; }2 P% z0 E( B
9 X: G0 U G7 M ]% _4 d+ h7 b" |1 Y# J2 K" S) q$ ]
H.264 Bitstream with Start Codes5 v* e, b' j/ t
1 E9 A% N0 d Y" {0 X
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.
+ u3 s1 s# c9 l" T" g) J这段话的大致意思是:带有开始码的H.264视频一般是用于无线发射、有线广播或者HD-DVD中的。这些数据流的开始都有一个开始码:0x000001 或者 0x00000001.9 U' @% f, c2 ~; D. U3 S
1 Q! F& g# P; [
: u* y. X b8 O2 w+ ` L2 @
H.264 Bitstream Without Start Codes9 J3 d+ a1 f7 m' @" T& q! d3 _
M( _9 h& s# u( H1 {0 l* d3 e 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.
* G( Q& z- V3 Z7 Z& O5 ^( s( a1 ?这段话的大致意思是:没有开始码的H.264视频主要是存储在MP4格式的文件中的。它的数据流的开始是1、2或者4个字节表示长度数据。5 a% R0 |4 T9 O0 L$ h
原文中的"NALU"简单说是H.264格式中的最基本的单元,是一个数据包。 \6 U6 k7 M$ o6 }' X
|
|