questions about vp8 RTP format

104 views
Skip to first unread message

Yang Song

unread,
May 17, 2013, 4:26:21 AM5/17/13
to webm-d...@webmproject.org
Hi everyone, now i have trouble parsing RTP for vp8.
i have doubt about vp8 payload descriptor.

         0 1 2 3 4 5 6 7
        +-+-+-+-+-+-+-+-+
        |X|R|N|S|PartID | (REQUIRED)
        +-+-+-+-+-+-+-+-+
   X:   |I|L|T|K| RSV   | (OPTIONAL 1)
        +-+-+-+-+-+-+-+-+
   I:   |M| PictureID   | (OPTIONAL 2)
        +-+-+-+-+-+-+-+-+
   L:   |   TL0PICIDX   | (OPTIONAL 3)
        +-+-+-+-+-+-+-+-+
   T/K: |TID|Y| KEYIDX  | (OPTIONAL 4)
        +-+-+-+-+-+-+-+-+

if bit X is 0, then will the OPTIONAL 1 be given but considered useless or not given(not exist)?
What about the bit I and L and T/K bit in OPTIONAL 1? 

here is an example, these are the bytes of the first RTP payload i got.
90  1001 0000
80  1000 0000
A6  1010 0110
B0  1011 0000
30   tag
85   tag
00   tag
9D
01
2A

9D 01 2A is of course the start code of key frame.
but how can i parse the first four bytes? 

I will be grateful for any help. Thank you all.

Patrik Westin

unread,
May 17, 2013, 12:10:10 PM5/17/13
to webm-d...@webmproject.org
The header seems invalid to me; more bits should be set in the X field OPTIONAL 1 

If I interpret you example correct the X bit is set and the I bit is set within the X field; this should result in a 3 byte header not 4

For a open source implementation see 
https://code.google.com/p/webrtc/source/browse/trunk/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc

Yang Song

unread,
May 17, 2013, 1:20:26 PM5/17/13
to webm-d...@webmproject.org
Thank you so much for your information.
It is really helpful to me.
Thank you again!

在 2013年5月18日星期六UTC+8上午12时10分10秒,Patrik Westin写道:

Boris Grozev

unread,
May 18, 2013, 2:59:10 AM5/18/13
to webm-d...@webmproject.org
Hello,

On Fri, May 17, 2013 at 7:10 PM, Patrik Westin <pwe...@google.com> wrote:
> The header seems invalid to me; more bits should be set in the X field
> OPTIONAL 1
>
> If I interpret you example correct the X bit is set and the I bit is set
> within the X field; this should result in a 3 byte header not 4

Please correct me if I'm wrong, but unless I'm reading the draft
incorrectly, this could result in either a 3- or a 4-byte header,
depending on the PictureID field. Since the first bit of PictureID is
a 1, the PictureID field spans 2 bytes, making the whole header 4
bytes. Am I missing something?


Regards,
Boris
Reply all
Reply to author
Forward
0 new messages