Following-up on various requests in the past about how to handle VP8 simulcast streams correctly in a SFU, we would like to share three guidelines for handling picture IDs. WebRTC has no notion of simulcast when receiving a video stream, and it is therefore critical that any switch made by the SFU must be completely transparent to the receiver.
1) In the case of sending an RTP stream without using picture ids the SFU has to rewrite the RTP sequence numbers so that the stream looks continuous, and rewrite the RTP timestamps so that there is no significant jump compared to the last frame. The timestamp may not jump backward.
2) If picture ids are used, besides following the steps outlined in 1), the SFU also has to rewrite the picture ids to make them continuous. Note that it is not possible to suddenly drop picture ids from the stream, as the receiver only keeps state relevant to picture ids, if they are used and therefore won't fall back to RTP sequence numbers.
3) If picture ids, tl0 picture indexes and temporal indexes are used, besides following the steps outlined in 2), the SFU also has to rewrite the tl0 picture indexes. Note that it is possible to drop the tl0 picture indexes and the temporal indexes from the stream, but if they are used again the tl0 picture index has to continue from where it left off. Also note that the state of the tl0 picture indexes is only updated by the receiver when both the tl0 picture index and temporal index is received.
TL0PICIDX gives you full dependency tracking of temporal level 0 frames, and thus long-term decodability. As long as a TL0 frame's TL0PICIDX is one more than the previous TL0 frame's TL0PICIDX, it's decodable. For short-term (for higher temporal level pictures between the tl0 frames), there are three things that can tell you a frame is definitely decodable: 1. If you have RTP sequence number continuity since the last TL0 frame. 2. If you have picture ID continuity since the last TL0 frame or frame. 3. If a frame has the Y bit set and has the same TL0PICIDX as the last TL0 frame. This isn't complete -- it's possible to have a frame be decodable even when none of these three things is true -- but I believe it's the best that can be done.Note that this has quite huge implications for implementing PERC and other end to end encryption proposals where you CAN'T rewrite the pict ids at all o the SFU
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/f5012b3b-bfdd-47f0-a781-d246223da9f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CALiegfkQ3LW%3DoNKJC9BxXsDHgYKSm9GUsMT4Z%2BriK9kdA9%2Bhbw%40mail.gmail.com.
1/ If the SFU is dropping frames (temporal scalability) and you don't rewrite PictureIds there are cases where you won't be able to follow the rule 2 in your description and decode the frame even if the frame is actually decodable.
2/ tl0picdx has to be rewritten even if you switch ssrcs in a keyframe boundary because that keyframe could be lost : https://twitter.com/anarchyco/status/882906846528516096
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/f5012b3b-bfdd-47f0-a781-d246223da9f0%40googlegroups.com.