0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|V=2|P|X| CC |M| PT | sequence number | RTP
| timestamp | Header
| synchronization source (SSRC) identifier |
| contributing source (CSRC) identifiers |
| .... |
| | RTP
| VP8 stream (byte aligned) | Pay-
| | load
Figure 1 - An RTP packet for VP8 stream
3.1 Use of RTP header fields.
Payload Type (PT): The assignment of an RTP payload type for this
new packet format is outside the scope of this document, and will
not be specified here. It is expected that the RTP profile for a
particular class of applications will assign a payload type for this
encoding, if that is not done then a payload type in the dynamic range
SHALL be chosen by means of an out of band signaling protocol (e.g.,
Extension (X) bit: Defined by the RTP profile used.
Sequence Number: Incremented by one for each RTP data packet sent,
starting, for security reasons, with a random initial value.
Marker (M) bit: The marker bit is set to one to indicate the last
RTP packet (or only RTP packet) of a VP8 frame.
Timestamp: The timestamp indicates the sampling instance of the
media sample whose data begins within this RTP packet. A constant
offset, which is random, is added for security reasons.
- There is at most one media sample or partial media sample per RTP packet.
- Media samples may be split across multiple RTP packets.
- The resolution of the timestamp is set to its default value of
90kHz,unless specified by an out-of-band means (I.E. SDP parameter).
3.2 Format of VP8 payload descriptors.
0 1 2 3 4 5 6 7 8
- K = Key frame bit. This bit is set to one to indicate that this
RTP packet contains the beginning of a key-frame.
- S = Start frame bit. This bit is set to one to indicate that this
RTP packet contains the beginning of any frame.
3.3 Lost VP8 RTP packets
If a lost packet is detected in the RTP stream, the transport layer
MUST throw out the current partial VP8 frame (if there is one) and
all subsequent RTP packets until a VP8 payload descriptor with the
key-frame bit is set.
As you can see this was intentionally kept very simple so we can start from a relatively clean slate. I also think as defined above will not work well for low bandwidth and trying to send the optimal packet size.