1 / 87

Playout Buffer Management

Playout Buffer Management. Encoder. Decoder. Middlebox. Receiver. Sender. Network. You are Here. How to recv and play?. open socket while not done if socket is readable read packet from socket remove RTP header decode play back. What’s Wrong?. packet ordering

stella
Download Presentation

Playout Buffer Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Playout Buffer Management

  2. Encoder Decoder Middlebox Receiver Sender Network You are Here

  3. How to recv and play? open socket while not done if socket is readable read packet from socket remove RTP header decode play back

  4. What’s Wrong? • packet ordering • packet loss • next packet arrive in-time? Especially bad for audio applications

  5. Detour: A Brief Intro to Audio Conferencing

  6. Audio Compression • Normally uncompressed • Telephone quality: • 8-bit audio • 8Khz • 20-30ms per packet

  7. Common Technique • Silence Detection • No need to send if there is no sound at the input • Talkspurt • Sequence of consecutive audio packets (in between silence)

  8. Detecting Talkspurt in RTP • Marker bit • Not reliable as packet with marker bit could be lost • Deduce from timestamp and sequence number

  9. Delay Jitter

  10. What causes Jitter? • Network delay = Propagation Delay (fixed) + Queueing Delay (variable) • Delay jitter is caused by variable queueing delay

  11. Delay Jitter Transit Time small jitter large jitter Time

  12. Spike Transit Time Time

  13. Buffer: The Jitter Absorber

  14. If Zero Jitter Time

  15. With Jitter Time LOSS

  16. With Jitter + Buffer Buffer Size Time Playout Delay

  17. Q: How to set playout delay?

  18. Adapting Playout Delay • When jitter is low, reduce delay • When jitter is high, increase delay

  19. Fundamental Trade-off Latency vs Packet Loss

  20. Playout Delay • Once you set the playout delay, cannot change! • NOT true: can change at beginning of talkspurt

  21. Adapting Playout Delay SEND RECV PLAY

  22. Adaptation Algorithm

  23. Variables and Notations Tnet(i) Tbuffer(i) Tarrive(i) Tplay(i) Tdelay(i) Tsend(i)

  24. First Packet in the Talkspurt Tdelay(i) = Enet(i) + 4 Vnet(i) Tplay(i) = Tsend(i) + Tdelay(i) Tbuffer(i) Tnet(i) Tarrive(i) Tplay(i) Tdelay(i) Tsend(i)

  25. Subsequent Packets Tplay(j) = Tplay(i) + Tsend(j) – Tsend(i) Tbuffer(i) Tnet(i) Tarrive(i) Tplay(i) Tdelay(i) Tsend(i)

  26. How to estimate Enet(i)

  27. Algorithm 1 (Jacobson’s) Enet(i) = aEnet(i-1) + (1-a)Tnet(i)

  28. Algorithm 2 if Tnet(i) > Enet(i) Enet(i) = bEnet(i-1) + (1-b)Tnet(i) else Enet(i) = aEnet(i-1) + (1-a)Tnet(i)

  29. Algorithm 3 Enet(i) = min { Tnet(j) } (over all packets in previous talkspurt)

  30. Algorithm 4 (Ramjee’s) • Ramjee’s Proposal • Observation: Algorithm 1-3 take too long to react to spike.

  31. Spike

  32. Ramjee’s Idea Works in 2 modes SPIKE NORMAL

  33. Three Questions • When to switch from normal to spike mode? • When to switch from spike back to normal? • How to estimate during spike mode?

  34. Normal to Spike • if difference in delays is large

  35. Normal to Spike • if difference in delays is large • difference in delays: Tnet(i) – Tnet(i-1) • large: 800 + 2Vnet(i)

  36. Another View of Spike (ZOOM) Tnet(i) Tarrive(i)

  37. Spike to Normal • slope = slope/2 + |2Tnet(i) – Tnet(i-1) – Tnet(i-2)|/8 • if slope < 64 switch to normal

  38. Estimation in Spike Mode Enet(i) = Enet(i-1) + Tnet(i) – Tnet(i-1)

  39. First Packet in the Talkspurt Tdelay(i) = Enet(i) + 4 Vnet(i) Tplay(i) = Tsend(i) + Tdelay(i)

  40. Tprop(i) Tq(i) Tbuffer(i) Tarrive(i) Tplay(i) Tnet(i) Tdelay(i) Tsend(i) First Packet in the Talkspurt Tdelay(i) = Enet(i) + 4 Vnet(i) Tplay(i) = Tsend(i) + Tdelay(i)

  41. How to estimate Vnet(i)

  42. Variation of Delay • Vnet(i) = aVnet(i-1) + (1-a)|Enet(i) – Tnet(i)|

  43. Comparisons of 4 Algorithms

  44. Playout Delay vs Loss Rate Loss Rate Tdelay(i)

  45. Algorithm 5 (Moon’s)

  46. Problems of Existing Algorithms • Jacobson’s react too slowly • Ramjee’s follow the delay too closely

  47. Moon’s Idea • Collect statistics on packets that have arrived • Find t such that q% of last w packets has Tnet(i) < t • Tdelay(i) = t

  48. Example (w =50, q = 90%) num of packets 1 2 3 4 5 6 7 8 9 10 11 12 delay

  49. Spike Mode • Tdelay(i) = Enet(1) SPIKE NORMAL

  50. Spike Mode

More Related