SlideShare a Scribd company logo
WebRTC: Mostly the video bits
MY BACKGROUND
1
Pion
Collection of Go RTC libraries


- Building blocks to build your vision


- Designed to be flexible


- Community Owned/Non-Commercial


PeerConnection API in Pure Go


- CreateOffer/AddTrack/….


- User controls media pipeline


- SettingEngine


- Interceptors
2
Pion
TURN as an API in Pure Go


- Callbacks for authentication


- Bring your own logger


- Run TURN and HTTPS on same port


- Embed TURN in application


Ion


- Cluster based system for building RTC


- SFU Instance


- AVP Instance (Processing real-time media)


- LIVE Instance (SIP/RTMP/HLS Endpoints)
3
WebRTC for the Curious
Book on how WebRTC really works


- Not just about the public APIs!


- Deep dive on protocols


History of WebRTC


- Interviews with RFC authors


WebRTC in practice


- Debugging every piece


- Teach the sharp edges
REAL WORLD CONSTRAINTS
4
Everyone notices quality of service
Good UI, Easy signup everything looks good!


Then people get frustrated


- Video freezes or is corrupted


- Audio drops out


- Audio/Video becomes desynchronized


- Quality fluctuates rapidly


- Disconnected….


RTC is the eternal struggle of quality vs latency
5
The real world is cruel
Video is huge


- Uncompressed 1280x720 8-Bit needs ~80 MB/s


Codecs


- Compressed video needs careful transport


- Support differs everywhere


Network


- Congestion


- Errors
7
Video Compression
Compression can be grouped into two categories


- Intraframe (Compression in single frame)


- Interframe (Compression across many frames)


Interframe types


- Intra-code Frame (Keyframe)


- Predicted Frame


- Bi-Directional Predicted Frame


Lots of knobs here


- Disable bframes


- Keyframe interval
8
9
Real World Networks
Congestion


- Can manifest as loss or latency


- Every network hop can have different behaviors


Jitter


Networks are dynamic


Errors can happen at every step


- Wifi/Cellular


- Gateways
HOW DOES RTC SOLVE IT
10
WebRTC Media Transport
Over UDP


RTP (Media Transport)


- SSRC (Session Identifier)


- Sequence Number (Unique ID, rolls over)


- Timestamp (Relative timestamp, random start)


- Extensions


RTCP (Control Messages)


- Flexible, but a common subset is agreed upon
11
Fixing Congestion
Determine available bandwidth and adjust


- Bitrate


- Resolution


- Framerate


Common Congestion Controller Algorithms


- Google Congestion Controller


- NADA


- SCreAM


All this is being actively discussed in RMCAT[0]


[0] https://datatracker.ietf.org/wg/rmcat/documents/
12
Congestion Controller Flow
13
Fixing Jitter
If we play as they arrive we will have stuttering


JitterBuffer


- Trade-off between latency and quality


- This concept will be re-used in the future
14
Fixing Audio/Video Sync
Buffering/Network messes up your timing


Sender Reports to the rescue!


- Map each SSRC Relative Timestamp to NTP


- Then you can join each Relative Timestamp


- Also contains other useful data….
15
Fixing Loss
Some loss is unavoidable, even without congestion


- Wifi


- Cellular


Not all loss is equal


- Do you care about a P-Frame before a I-Frame?
16
Fixing Loss By Reacting
RTCP Negative Acknowledgments (NACK)


- SequenceNumber `I` of SSRC `J` was lost


- Recover small part of video frame


RTCP Picture Loss Indication (PLI)


- SSRC `J` is broken


- In unrecoverable state, request new keyframe


Re-use that JitterBuffer and add a delay to wait
17
Fixing Loss preemptively
Forward Error Correction (FEC)


- Redundant Data is sent in another stream


- Is dynamic/protects the important bits


Less RTT then NACK, but wasting bandwidth


Still in flux, not available everywhere
18
Fixing Loss After Decode
More common with audio


- Play the frame before the missing one


- Use Model-Based methods to extrapolate


Never done this myself!
19
WebRTC Servers
Simulcast


- Send multiple video feeds (high, medium, low)


- Server then distributes the feed to each viewer


Scalable Video Coding


- Layered coding


- Not as common/Browser Support not great
20
My Time with RTP
It's possible to ship without all this


- Don't let perfect be enemy of the good


- Do a high keyframe interval and ship


Always something you can improve


Moving any knob can effect the others


- Congestion equals more NACKs,


- More NACKs equals more congestion....


Lab/Demos are fun, but not very useful


- Network simulators are deterministic


- User metrics are what really matter
OPEN SOURCE SHOWCASE
ns-remote


21
kerberos.io


22
CloudRetro.io
23
24
Neko


github.com/nurdism/neko
25
TelloGo
26
ascii
27
cloud-morph
28
ssh-p2p
29
Snowflake
webwormhole.io


30
s4y/space
31
Project
Lightspeed
32
33
github.com/pion


pion.ly/slack


twitter.com/_pion


sean@pion.ly

More Related Content

What's hot

Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux DeviceAdding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Samsung Open Source Group
 
WebRTC and Janus intro for FOSS Stockholm January 2019
WebRTC and Janus intro for FOSS Stockholm January 2019WebRTC and Janus intro for FOSS Stockholm January 2019
WebRTC and Janus intro for FOSS Stockholm January 2019
Olle E Johansson
 
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of ThingsJerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
Samsung Open Source Group
 
Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...
Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...
Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...
Paolo Saviano
 
5th tf webrtc-welcome
5th tf webrtc-welcome5th tf webrtc-welcome
5th tf webrtc-welcome
Mihály Mészáros
 
Switch or broker
Switch or brokerSwitch or broker
Switch or broker
pieterh
 
Run Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT NetworkRun Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT Network
Samsung Open Source Group
 
What is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your MicroservicesWhat is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your Microservices
Matt Turner
 
CNIT 140: Flashing Firmware
CNIT 140: Flashing FirmwareCNIT 140: Flashing Firmware
CNIT 140: Flashing Firmware
Sam Bowne
 
pfSense 2.2 Preview - pfSense Hangout November 2014
pfSense 2.2 Preview - pfSense Hangout November 2014pfSense 2.2 Preview - pfSense Hangout November 2014
pfSense 2.2 Preview - pfSense Hangout November 2014
Netgate
 
Ryu SDN Framework
Ryu SDN FrameworkRyu SDN Framework
Ryu SDN Framework
APNIC
 
6LoWPAN: An open IoT Networking Protocol
6LoWPAN: An open IoT Networking Protocol6LoWPAN: An open IoT Networking Protocol
6LoWPAN: An open IoT Networking Protocol
Samsung Open Source Group
 
CrossFIX
CrossFIXCrossFIX
CrossFIX 1.1 presentation
CrossFIX 1.1 presentationCrossFIX 1.1 presentation
CrossFIX 1.1 presentation
Konstantin Dmitriev
 
CurveZMQ, ZMTP and other Dubious Characters
CurveZMQ, ZMTP and other Dubious CharactersCurveZMQ, ZMTP and other Dubious Characters
CurveZMQ, ZMTP and other Dubious Characters
pieterh
 
Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...
Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...
Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...
linuxlab_conf
 
Cisco ios order of operation
Cisco ios order of operationCisco ios order of operation
Cisco ios order of operation
IT Tech
 
WebRTC Identity in SAML Federations
WebRTC Identity in SAML FederationsWebRTC Identity in SAML Federations
WebRTC Identity in SAML Federations
Mihály Mészáros
 
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under LinuxPractical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Samsung Open Source Group
 

What's hot (20)

Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux DeviceAdding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
 
WebRTC and Janus intro for FOSS Stockholm January 2019
WebRTC and Janus intro for FOSS Stockholm January 2019WebRTC and Janus intro for FOSS Stockholm January 2019
WebRTC and Janus intro for FOSS Stockholm January 2019
 
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of ThingsJerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
 
Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...
Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...
Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...
 
5th tf webrtc-welcome
5th tf webrtc-welcome5th tf webrtc-welcome
5th tf webrtc-welcome
 
Switch or broker
Switch or brokerSwitch or broker
Switch or broker
 
Run Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT NetworkRun Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT Network
 
JavaCro'15 - Reactive I/O - Ivan Turčinović
JavaCro'15 - Reactive I/O - Ivan TurčinovićJavaCro'15 - Reactive I/O - Ivan Turčinović
JavaCro'15 - Reactive I/O - Ivan Turčinović
 
What is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your MicroservicesWhat is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your Microservices
 
CNIT 140: Flashing Firmware
CNIT 140: Flashing FirmwareCNIT 140: Flashing Firmware
CNIT 140: Flashing Firmware
 
pfSense 2.2 Preview - pfSense Hangout November 2014
pfSense 2.2 Preview - pfSense Hangout November 2014pfSense 2.2 Preview - pfSense Hangout November 2014
pfSense 2.2 Preview - pfSense Hangout November 2014
 
Ryu SDN Framework
Ryu SDN FrameworkRyu SDN Framework
Ryu SDN Framework
 
6LoWPAN: An open IoT Networking Protocol
6LoWPAN: An open IoT Networking Protocol6LoWPAN: An open IoT Networking Protocol
6LoWPAN: An open IoT Networking Protocol
 
CrossFIX
CrossFIXCrossFIX
CrossFIX
 
CrossFIX 1.1 presentation
CrossFIX 1.1 presentationCrossFIX 1.1 presentation
CrossFIX 1.1 presentation
 
CurveZMQ, ZMTP and other Dubious Characters
CurveZMQ, ZMTP and other Dubious CharactersCurveZMQ, ZMTP and other Dubious Characters
CurveZMQ, ZMTP and other Dubious Characters
 
Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...
Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...
Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...
 
Cisco ios order of operation
Cisco ios order of operationCisco ios order of operation
Cisco ios order of operation
 
WebRTC Identity in SAML Federations
WebRTC Identity in SAML FederationsWebRTC Identity in SAML Federations
WebRTC Identity in SAML Federations
 
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under LinuxPractical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
 

Similar to WebRTC: Mostly Video Bits

Demuxed 2020
Demuxed 2020Demuxed 2020
Demuxed 2020
SeanDuBois3
 
High perf-networking
High perf-networkingHigh perf-networking
High perf-networking
mtimjones
 
Designing an 4K/UHD1 HDR OB Truck as 12G-SDI or IP-based
Designing an 4K/UHD1 HDR OB Truck as 12G-SDI or IP-basedDesigning an 4K/UHD1 HDR OB Truck as 12G-SDI or IP-based
Designing an 4K/UHD1 HDR OB Truck as 12G-SDI or IP-based
Dr. Mohieddin Moradi
 
Internet Video
Internet VideoInternet Video
Internet Video
Salvatore Loreto
 
RIP RTCP RTSP
RIP RTCP RTSPRIP RTCP RTSP
RIP RTCP RTSP
Dev Heba
 
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE
 
WebRTC Standards from Tim Panton
WebRTC Standards from Tim PantonWebRTC Standards from Tim Panton
WebRTC Standards from Tim Panton
Alan Quayle
 
PLNOG16: Usługi w sieciach operatorskich, Marcin Aronowski
PLNOG16: Usługi w sieciach operatorskich, Marcin AronowskiPLNOG16: Usługi w sieciach operatorskich, Marcin Aronowski
PLNOG16: Usługi w sieciach operatorskich, Marcin Aronowski
PROIDEA
 
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitchDPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
Jim St. Leger
 
WebRTC overview
WebRTC overviewWebRTC overview
WebRTC overview
Rouyun Pan
 
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE
 
6TiSCH @Telecom Bretagne 2015
6TiSCH @Telecom Bretagne 20156TiSCH @Telecom Bretagne 2015
6TiSCH @Telecom Bretagne 2015
Pascal Thubert
 
Rtsp
RtspRtsp
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics WorkshopLagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus SDN/OpenFlow switch
 
ITSPA May 2013 - WebRTC, TURN, and WebSocket
ITSPA May 2013 - WebRTC, TURN, and WebSocketITSPA May 2013 - WebRTC, TURN, and WebSocket
ITSPA May 2013 - WebRTC, TURN, and WebSocket
Crocodile WebRTC SDK and Cloud Signalling Network
 
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE
 
Bitmovin Low Latency CMAF Presentation_Streaming Media East by Paul MacDougall
Bitmovin Low Latency CMAF Presentation_Streaming Media East by Paul MacDougallBitmovin Low Latency CMAF Presentation_Streaming Media East by Paul MacDougall
Bitmovin Low Latency CMAF Presentation_Streaming Media East by Paul MacDougall
Bitmovin Inc
 
Movi presentation Singapore video tech meetup
Movi presentation Singapore video tech meetupMovi presentation Singapore video tech meetup
Movi presentation Singapore video tech meetup
Lars-Erik M Ravn
 
Approaching hyperconvergedopenstack
Approaching hyperconvergedopenstackApproaching hyperconvergedopenstack
Approaching hyperconvergedopenstack
Ikuo Kumagai
 

Similar to WebRTC: Mostly Video Bits (20)

Demuxed 2020
Demuxed 2020Demuxed 2020
Demuxed 2020
 
High perf-networking
High perf-networkingHigh perf-networking
High perf-networking
 
Designing an 4K/UHD1 HDR OB Truck as 12G-SDI or IP-based
Designing an 4K/UHD1 HDR OB Truck as 12G-SDI or IP-basedDesigning an 4K/UHD1 HDR OB Truck as 12G-SDI or IP-based
Designing an 4K/UHD1 HDR OB Truck as 12G-SDI or IP-based
 
Internet Video
Internet VideoInternet Video
Internet Video
 
RIP RTCP RTSP
RIP RTCP RTSPRIP RTCP RTSP
RIP RTCP RTSP
 
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
 
WebRTC Standards from Tim Panton
WebRTC Standards from Tim PantonWebRTC Standards from Tim Panton
WebRTC Standards from Tim Panton
 
PLNOG16: Usługi w sieciach operatorskich, Marcin Aronowski
PLNOG16: Usługi w sieciach operatorskich, Marcin AronowskiPLNOG16: Usługi w sieciach operatorskich, Marcin Aronowski
PLNOG16: Usługi w sieciach operatorskich, Marcin Aronowski
 
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitchDPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
 
WebRTC overview
WebRTC overviewWebRTC overview
WebRTC overview
 
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
 
6TiSCH @Telecom Bretagne 2015
6TiSCH @Telecom Bretagne 20156TiSCH @Telecom Bretagne 2015
6TiSCH @Telecom Bretagne 2015
 
Rtsp
RtspRtsp
Rtsp
 
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics WorkshopLagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
 
ITSPA May 2013 - WebRTC, TURN, and WebSocket
ITSPA May 2013 - WebRTC, TURN, and WebSocketITSPA May 2013 - WebRTC, TURN, and WebSocket
ITSPA May 2013 - WebRTC, TURN, and WebSocket
 
Streaming
StreamingStreaming
Streaming
 
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
 
Bitmovin Low Latency CMAF Presentation_Streaming Media East by Paul MacDougall
Bitmovin Low Latency CMAF Presentation_Streaming Media East by Paul MacDougallBitmovin Low Latency CMAF Presentation_Streaming Media East by Paul MacDougall
Bitmovin Low Latency CMAF Presentation_Streaming Media East by Paul MacDougall
 
Movi presentation Singapore video tech meetup
Movi presentation Singapore video tech meetupMovi presentation Singapore video tech meetup
Movi presentation Singapore video tech meetup
 
Approaching hyperconvergedopenstack
Approaching hyperconvergedopenstackApproaching hyperconvergedopenstack
Approaching hyperconvergedopenstack
 

Recently uploaded

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 

Recently uploaded (20)

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 

WebRTC: Mostly Video Bits

  • 1. WebRTC: Mostly the video bits
  • 3. 1 Pion Collection of Go RTC libraries - Building blocks to build your vision - Designed to be flexible - Community Owned/Non-Commercial PeerConnection API in Pure Go - CreateOffer/AddTrack/…. - User controls media pipeline - SettingEngine - Interceptors
  • 4. 2 Pion TURN as an API in Pure Go - Callbacks for authentication - Bring your own logger - Run TURN and HTTPS on same port - Embed TURN in application Ion - Cluster based system for building RTC - SFU Instance - AVP Instance (Processing real-time media) - LIVE Instance (SIP/RTMP/HLS Endpoints)
  • 5. 3 WebRTC for the Curious Book on how WebRTC really works - Not just about the public APIs! - Deep dive on protocols History of WebRTC - Interviews with RFC authors WebRTC in practice - Debugging every piece - Teach the sharp edges
  • 7. 4 Everyone notices quality of service Good UI, Easy signup everything looks good! Then people get frustrated - Video freezes or is corrupted - Audio drops out - Audio/Video becomes desynchronized - Quality fluctuates rapidly - Disconnected…. RTC is the eternal struggle of quality vs latency
  • 8. 5 The real world is cruel Video is huge - Uncompressed 1280x720 8-Bit needs ~80 MB/s Codecs - Compressed video needs careful transport - Support differs everywhere Network - Congestion - Errors
  • 9. 7 Video Compression Compression can be grouped into two categories - Intraframe (Compression in single frame) - Interframe (Compression across many frames) Interframe types - Intra-code Frame (Keyframe) - Predicted Frame - Bi-Directional Predicted Frame Lots of knobs here - Disable bframes - Keyframe interval
  • 10. 8
  • 11. 9 Real World Networks Congestion - Can manifest as loss or latency - Every network hop can have different behaviors Jitter Networks are dynamic Errors can happen at every step - Wifi/Cellular - Gateways
  • 12. HOW DOES RTC SOLVE IT
  • 13. 10 WebRTC Media Transport Over UDP RTP (Media Transport) - SSRC (Session Identifier) - Sequence Number (Unique ID, rolls over) - Timestamp (Relative timestamp, random start) - Extensions RTCP (Control Messages) - Flexible, but a common subset is agreed upon
  • 14. 11 Fixing Congestion Determine available bandwidth and adjust - Bitrate - Resolution - Framerate Common Congestion Controller Algorithms - Google Congestion Controller - NADA - SCreAM All this is being actively discussed in RMCAT[0] [0] https://datatracker.ietf.org/wg/rmcat/documents/
  • 16. 13 Fixing Jitter If we play as they arrive we will have stuttering JitterBuffer - Trade-off between latency and quality - This concept will be re-used in the future
  • 17. 14 Fixing Audio/Video Sync Buffering/Network messes up your timing Sender Reports to the rescue! - Map each SSRC Relative Timestamp to NTP - Then you can join each Relative Timestamp - Also contains other useful data….
  • 18. 15 Fixing Loss Some loss is unavoidable, even without congestion - Wifi - Cellular Not all loss is equal - Do you care about a P-Frame before a I-Frame?
  • 19. 16 Fixing Loss By Reacting RTCP Negative Acknowledgments (NACK) - SequenceNumber `I` of SSRC `J` was lost - Recover small part of video frame RTCP Picture Loss Indication (PLI) - SSRC `J` is broken - In unrecoverable state, request new keyframe Re-use that JitterBuffer and add a delay to wait
  • 20. 17 Fixing Loss preemptively Forward Error Correction (FEC) - Redundant Data is sent in another stream - Is dynamic/protects the important bits Less RTT then NACK, but wasting bandwidth Still in flux, not available everywhere
  • 21. 18 Fixing Loss After Decode More common with audio - Play the frame before the missing one - Use Model-Based methods to extrapolate Never done this myself!
  • 22. 19 WebRTC Servers Simulcast - Send multiple video feeds (high, medium, low) - Server then distributes the feed to each viewer Scalable Video Coding - Layered coding - Not as common/Browser Support not great
  • 23. 20 My Time with RTP It's possible to ship without all this - Don't let perfect be enemy of the good - Do a high keyframe interval and ship Always something you can improve Moving any knob can effect the others - Congestion equals more NACKs, - More NACKs equals more congestion.... Lab/Demos are fun, but not very useful - Network simulators are deterministic - User metrics are what really matter