Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Pion's Bandwidth Estimation Journey

Avatar for Sean DuBois Sean DuBois
December 12, 2023
490

Pion's Bandwidth Estimation Journey

This talk is the story/evolution of my understanding of Congestion Control. When I started Pion the only thing I understood was 'UDP can drop packets'. We then went through the steps of

* Implementing Feedback
* Implementing Congestion Control Algorithms
* Designing one for SFUs

Avatar for Sean DuBois

Sean DuBois

December 12, 2023
Tweet

Transcript

  1. Thank You Aaron France Adam Kiss Aleksandr Razumov Alex Browne

    Alex Harford AlexWoo(武杰) Antoine Baché Ato Araki Atsushi Watanabe Brendan Rius Cecylia Bocovich Chao Yuan Chris Hiszpanski Christopher Fry CloudWebRTC Daniele Sluijters Denis Gareth Hayes Guilherme Hongchao Ma Hugo Arregui Igor German Ingmar Wittkau Jadon Bennett Jake B Jason Maldonis John Bradley Justin Okamoto Konstantin Itskov Lander Noterman Lukas Herman Lukas Rezek Luke Curley Marouane Max Hawkins Michael MacDonald Michiel De Backker Mike Coleman Mészáros Mihály Oleg Kovalov Rafael Viscarra Raphael Derosso Pereira Raphael Randschau Robert Eperjesi RunningMan Ryan Gordon Sean DuBois Sebastian Waisbrot Slugalisk Stefan Tatschner Steve Suhas Gaddam Tobias Fridén Vicken Simonian Will Watson Woodrow Douglass Yutaka Takeda Zizheng Tai adwpc chenkaiC4 earle feixiao frank igolaizola imalic3 jinleileiking jose nazario mchlrhw mxmCherry notedit rob-deutsch ronan simonacca-fotokite songjiayang spaceCh1mp sylba2050 wattanakorn495 xsbchen zigazeljko Clayton McCray Hendrik Hofstadt Luke S Bao Nguyen Konstantin Chugalinskiy
  2. 1 What is this talk Go programmer fi guring out

    real-time networking This is the evolution of my understanding If you are familiar with these topics please reach out! I still have a lot to learn
  3. 2 What is WebRTC RTP (rfc1889) over ICE (rfc8445) Media

    packetized for UDP Datagrams Needs to be sub-second, minimal bu ff ering
  4. 3 Avoiding The Problem WebRTC can mostly be implemented via

    RFCs - SDP, ICE, SRTP, RTP/RTCP all in IETF Bandwidth Estimation isn’t as clear IETF RMCAT exists, but didn’t fi nd a conclusion Space is still evolving/more complicated problem?
  5. 4 Pion doesn’t work in X network Users are complaining

    sharing screenshots of broken video. At this point all I knew was ‘UDP drops packets’
  6. libwebrtc does the work 7 libwebrtc sends ‘Receiver Estimated Max

    Bitrate’ Pion can read that packet and act upon it Great all fi xed….
  7. Only solves half the problem 8 What if Chrome is

    sending the video? I don’t know what numbers to send in a REMB
  8. libwebrtc does all the work (again) 9 Use RTCP to

    send ‘Receiver Reports’ - Number of Packets Lost - Jitter (Is one way trip time smooth) If we generate Chrome adjusts as a Sender
  9. Transport Wide Congestion Control 12 Sender knows how long it

    took for each packet Users are ‘mostly’ happy
  10. False Starts 13 Was told that GCC is best thing

    to use - Spec was out of date - SCReAM and NADA are not ‘as good’? Maybe BBR is better since it is documented/widely implemented? I have no idea what I am doing….
  11. Watch his talk 17 Bandwidth Estimation from Scratch - Mathis

    Engelbart https://www.youtube.com/watch?v=zQsJeHUc2TQ
  12. Increase/Decrease Test 19 Loss-Based - Loss < 2% Increase Bitrate

    - Loss > 10% Decrease Bitrate Delay-based - Delay Increasing, Delay Bitrate - Delay Decreasing, Increase Bitrate
  13. Try it out! 20 We have a easy to use

    example - bandwidth-estimation-from-disk Code is in pion/interceptor - Needs things like fast start, but works!
  14. GCC on Simulcast 23 Can’t adjust the encoder - We

    can add probing packets Do we run the state machine per publisher? - Large CPU overhead - Large network overhead
  15. 26 Pion needs you Empower those helping the internet! Gain

    deep WebRTC knowledge A fun challenge where you pick the goals