一、协议定义
1、VP8 Payload Descriptor
X:该位为1时,后面这些 OPTIONAL(Ibit、Lbit、Tbit、Kbit)需要进行解析,如果为0的话,则直接忽略这些可选的项目。
R:reserved位。
N:Non-reference帧,当为1时,说明该帧可以被丢弃。目前默认是0,以备后续扩展。
Informative note: This document does not describe how to determine if an encoded frame is non-reference. The reference
status of an encoded frame is preferably provided from the encoder implementation.
S:Start of VP8 partition,如果当前的帧为VP8 partition的起始,则该参数必须被置1,由于keyframe及interframe都是每个partition的起始,所以keyframe及interframe的话,S位肯定是1的,而continuation frame则不一定了。同一时间戳上的图片可能被分成多个的partition,这时候continuation frame中也就会出现S位为1的了。
PartID:partition index,如果S位为1,那么partid肯定是为1了。由于partition不可能会太大,所以这里只用了4位来表示,完全是够用的。
========================================================================================
之后的I bit、L bit、T bit、K bit都是需要X置1才有效。
I:picture id呈现标志位,置1时,必须在后面I所示行呈现picture id。
L:TL0PICIDX呈现标志位,置1时,必须在后面L所示行呈现TL0PICIDX。
T:TID呈现标志位.被置1时,可选的TID/KEYIDX部分必须被呈现。TID|Y部分必须在其之后。如果K被置1但T为0,TID/KEYIDX必须呈现出来,但是TID|Y必须被忽略。T或K都不为1时,TID/KEYIDX都不必呈现!
K:KEYIDX present,这个其实和T说明的差不多了。
RSV:预留位,必须全为0!
========================================================================================
PictureID:8位或16位的长度,其中首位为为1时,则为16位的长度,后15位为picture id,为0,则为8位的长度,后7位为picture id。PictureID为视频帧***。可以以随机数起始,但是必须以1递增。
TL0PICIDX:8位temporal level为0的帧序号。当下面的TID为0时,是temporal level为0的帧序号。否则是当前帧参考前面帧的个数。
TID:2为temporal layer index.目前VPX和264支持最大4层Temporal Scalability。
Y:1 layer sync bit.
Informative note: This document does not describe how to determine the dependency status for a frame; this information is preferably provided from the encoder implementation. In the case of unknown status, the Y bit can safely be set to 0.
KEYIDX:5 bits temporal key frame index.
关于TID、TL0PICIDX、Y参数含义的理解,请参考https://blog.csdn.net/CrystalShaw/article/details/81184531
2、VP8 Payload Header
二、wireshark抓包
三、参考
https://tools.ietf.org/html/rfc7741
http://elkpi.com/topics/vp8-rtp-payload.html