SlideShare a Scribd company logo
WebRTC broadcasting with WHIP
Lorenzo Miniero
@elminiero
FOSDEM 2022 Real Time Communications
5th February 2022, Brussels My couch
Who am I?
Lorenzo Miniero
• Ph.D @ UniNA
• Chairman @ Meetecho
• Main author of Janus
Contacts and info
• lorenzo@meetecho.com
• https://twitter.com/elminiero
• https://www.slideshare.net/LorenzoMiniero
• https://lminiero.bandcamp.com
MCU as a WebRTC topology
SFU as a WebRTC topology
A slightly variation on the theme
How “traditional” broadcasting typically works
What if we want more interactivity, though?
What if we want more interactivity, though?
What if we want more interactivity, though?
What if we want more interactivity, though?
Why not WebRTC instead?
• Traditional broadcasting efficient but higher latency
• At best (live), delay will typically be in the range of a few seconds
• Besides, different users may experience different delays (buffering)
• WebRTC natively conceived for very low latency, instead
• Born for conversational audio/video/data
• Can be (and often is) easily used for monodirectional streaming as well
• Strangely not really considered by the industry up until recently, though
• Topic of my Ph.D years ago (“Streaming Of Large scale Events over Internet cLouds”)
• Clearing the industry FUD: https://webrtcbydralex.com/index.php/2020/04/14/
• Tooling an important aspect to foster WebRTC adoption, here
• e.g., a standard way to send media, and tools à la OBS, XSplit, or others
Why not WebRTC instead?
• Traditional broadcasting efficient but higher latency
• At best (live), delay will typically be in the range of a few seconds
• Besides, different users may experience different delays (buffering)
• WebRTC natively conceived for very low latency, instead
• Born for conversational audio/video/data
• Can be (and often is) easily used for monodirectional streaming as well
• Strangely not really considered by the industry up until recently, though
• Topic of my Ph.D years ago (“Streaming Of Large scale Events over Internet cLouds”)
• Clearing the industry FUD: https://webrtcbydralex.com/index.php/2020/04/14/
• Tooling an important aspect to foster WebRTC adoption, here
• e.g., a standard way to send media, and tools à la OBS, XSplit, or others
Why not WebRTC instead?
• Traditional broadcasting efficient but higher latency
• At best (live), delay will typically be in the range of a few seconds
• Besides, different users may experience different delays (buffering)
• WebRTC natively conceived for very low latency, instead
• Born for conversational audio/video/data
• Can be (and often is) easily used for monodirectional streaming as well
• Strangely not really considered by the industry up until recently, though
• Topic of my Ph.D years ago (“Streaming Of Large scale Events over Internet cLouds”)
• Clearing the industry FUD: https://webrtcbydralex.com/index.php/2020/04/14/
• Tooling an important aspect to foster WebRTC adoption, here
• e.g., a standard way to send media, and tools à la OBS, XSplit, or others
Why not WebRTC instead?
• Traditional broadcasting efficient but higher latency
• At best (live), delay will typically be in the range of a few seconds
• Besides, different users may experience different delays (buffering)
• WebRTC natively conceived for very low latency, instead
• Born for conversational audio/video/data
• Can be (and often is) easily used for monodirectional streaming as well
• Strangely not really considered by the industry up until recently, though
• Topic of my Ph.D years ago (“Streaming Of Large scale Events over Internet cLouds”)
• Clearing the industry FUD: https://webrtcbydralex.com/index.php/2020/04/14/
• Tooling an important aspect to foster WebRTC adoption, here
• e.g., a standard way to send media, and tools à la OBS, XSplit, or others
WebRTC audio: Opus
• WebRTC mandates Opus, and it’s a good thing
• High quality audio codec designed for the Internet
• Very flexible in sampling rates, bitrates, FEC, etc.
• Different profiles for voice and music/other
• Both encoding and decoding vary, in case
• Can be mono and stereo, with dynamic sampling rates and bitrates
• Multiopus (5.1 and 7.1)1
• Each packet is basically OGG with multiple stereo Opus streams
• Number of streams determines number of channels
• Not documented, but used by Google for Stadia
1
https://webrtcbydralex.com/index.php/2020/04/08/surround-sound-5-1-and-7-1-in-libwebrtc-and-chrome/
WebRTC audio: Opus
• WebRTC mandates Opus, and it’s a good thing
• High quality audio codec designed for the Internet
• Very flexible in sampling rates, bitrates, FEC, etc.
• Different profiles for voice and music/other
• Both encoding and decoding vary, in case
• Can be mono and stereo, with dynamic sampling rates and bitrates
• Multiopus (5.1 and 7.1)1
• Each packet is basically OGG with multiple stereo Opus streams
• Number of streams determines number of channels
• Not documented, but used by Google for Stadia
1
https://webrtcbydralex.com/index.php/2020/04/08/surround-sound-5-1-and-7-1-in-libwebrtc-and-chrome/
WebRTC audio: Opus
• WebRTC mandates Opus, and it’s a good thing
• High quality audio codec designed for the Internet
• Very flexible in sampling rates, bitrates, FEC, etc.
• Different profiles for voice and music/other
• Both encoding and decoding vary, in case
• Can be mono and stereo, with dynamic sampling rates and bitrates
• Multiopus (5.1 and 7.1)1
• Each packet is basically OGG with multiple stereo Opus streams
• Number of streams determines number of channels
• Not documented, but used by Google for Stadia
1
https://webrtcbydralex.com/index.php/2020/04/08/surround-sound-5-1-and-7-1-in-libwebrtc-and-chrome/
WebRTC video: Simulcasting & SVC
https://webrtchacks.com/sfu-simulcast/
WebRTC video: Simulcasting & SVC
https://webrtchacks.com/chrome-vp9-svc/
Two main challenges: ingestion...
Two main challenges: ... and distribution
(and yeah, maybe scaling too! )
Making WebRTC ingestion easy: WISH / WHIP!
https://www.meetecho.com/blog/whip-janus/ (September 2020)
Making WebRTC ingestion easy: WISH / WHIP!
https://www.meetecho.com/blog/whip-janus-part-ii/
There would be no WHIP without Dr. Alex r
A new Working Group in the IETF...
https://datatracker.ietf.org/wg/wish/about/
... and a new draft for the WHIP specification!
https://www.ietf.org/archive/id/draft-ietf-wish-whip-01.html
WebRTC-HTTP ingestion protocol (WHIP)
• HTTP-based signalling to create sendonly PeerConnections
• HTTP POST to send SDP offer, and get an SDP answer in the response
• Teardown of sessions using HTTP DELETE
• Authentication and authorization via Bearer tokens
• https://www.rfc-editor.org/rfc/rfc6750.html
• Trickle and ICE restart via HTTP PATCH and SDP fragments
• https://www.rfc-editor.org/rfc/rfc8840.html
• Everything else is your usual WebRTC!
• ICE, DTLS, etc.
WebRTC-HTTP ingestion protocol (WHIP)
• HTTP-based signalling to create sendonly PeerConnections
• HTTP POST to send SDP offer, and get an SDP answer in the response
• Teardown of sessions using HTTP DELETE
• Authentication and authorization via Bearer tokens
• https://www.rfc-editor.org/rfc/rfc6750.html
• Trickle and ICE restart via HTTP PATCH and SDP fragments
• https://www.rfc-editor.org/rfc/rfc8840.html
• Everything else is your usual WebRTC!
• ICE, DTLS, etc.
WebRTC-HTTP ingestion protocol (WHIP)
• HTTP-based signalling to create sendonly PeerConnections
• HTTP POST to send SDP offer, and get an SDP answer in the response
• Teardown of sessions using HTTP DELETE
• Authentication and authorization via Bearer tokens
• https://www.rfc-editor.org/rfc/rfc6750.html
• Trickle and ICE restart via HTTP PATCH and SDP fragments
• https://www.rfc-editor.org/rfc/rfc8840.html
• Everything else is your usual WebRTC!
• ICE, DTLS, etc.
WebRTC-HTTP ingestion protocol (WHIP)
• HTTP-based signalling to create sendonly PeerConnections
• HTTP POST to send SDP offer, and get an SDP answer in the response
• Teardown of sessions using HTTP DELETE
• Authentication and authorization via Bearer tokens
• https://www.rfc-editor.org/rfc/rfc6750.html
• Trickle and ICE restart via HTTP PATCH and SDP fragments
• https://www.rfc-editor.org/rfc/rfc8840.html
• Everything else is your usual WebRTC!
• ICE, DTLS, etc.
A few sequence diagrams
A few sequence diagrams
A few sequence diagrams
A WHIP server based on Janus
• Janus is a popular WebRTC server, so good option for WHIP
• It implements its own JSON-based API, though (Janus API)
• Simple (and transparent) solution: basic API translator in front of Janus
• WHIP API maps quite simply to set of Janus API primitives
• No need to change anything in the WebRTC stack
• Implemented simple prototype using node.js and Express
• REST server that implements the WHIP API, and talks to Janus accordingly
• Only takes care of ingest: distribution out of scope (e.g., via SOLEIL)
Simple WHIP Server
https://github.com/lminiero/simple-whip-server/
A WHIP server based on Janus
• Janus is a popular WebRTC server, so good option for WHIP
• It implements its own JSON-based API, though (Janus API)
• Simple (and transparent) solution: basic API translator in front of Janus
• WHIP API maps quite simply to set of Janus API primitives
• No need to change anything in the WebRTC stack
• Implemented simple prototype using node.js and Express
• REST server that implements the WHIP API, and talks to Janus accordingly
• Only takes care of ingest: distribution out of scope (e.g., via SOLEIL)
Simple WHIP Server
https://github.com/lminiero/simple-whip-server/
A WHIP server based on Janus
• Janus is a popular WebRTC server, so good option for WHIP
• It implements its own JSON-based API, though (Janus API)
• Simple (and transparent) solution: basic API translator in front of Janus
• WHIP API maps quite simply to set of Janus API primitives
• No need to change anything in the WebRTC stack
• Implemented simple prototype using node.js and Express
• REST server that implements the WHIP API, and talks to Janus accordingly
• Only takes care of ingest: distribution out of scope (e.g., via SOLEIL)
Simple WHIP Server
https://github.com/lminiero/simple-whip-server/
A WHIP server based on Janus
• Janus is a popular WebRTC server, so good option for WHIP
• It implements its own JSON-based API, though (Janus API)
• Simple (and transparent) solution: basic API translator in front of Janus
• WHIP API maps quite simply to set of Janus API primitives
• No need to change anything in the WebRTC stack
• Implemented simple prototype using node.js and Express
• REST server that implements the WHIP API, and talks to Janus accordingly
• Only takes care of ingest: distribution out of scope (e.g., via SOLEIL)
Simple WHIP Server
https://github.com/lminiero/simple-whip-server/
Mapping WHIP interactions to the Janus API
Mapping WHIP interactions to the Janus API
Mapping WHIP interactions to the Janus API
Mapping WHIP interactions to the Janus API
Mapping WHIP interactions to the Janus API
Simple WHIP Server in action
Basic UI to create/manage endpoints
Writing a WHIP client for testing
• Needs to support HTTP (WHIP API) and have a WebRTC stack
• Browsers are the obvious choice, but what about a native solution?
• Many broadcasters today use custom tools (e.g., OBS)
• Unfortunately OBS-WebRTC is not currently an option
• Used legacy WHIP API, and currently only supports Millicast ingestion
• Chose GStreamer’s webrtcbin2 for the purpose
• Used it already with success in other applications (e.g., JamRTC)
• Modular and very powerful, so easy to feed with external sources
Simple WHIP Client
https://github.com/lminiero/simple-whip-client/
2
https://gstreamer.freedesktop.org/documentation/webrtc/
Writing a WHIP client for testing
• Needs to support HTTP (WHIP API) and have a WebRTC stack
• Browsers are the obvious choice, but what about a native solution?
• Many broadcasters today use custom tools (e.g., OBS)
• Unfortunately OBS-WebRTC is not currently an option
• Used legacy WHIP API, and currently only supports Millicast ingestion
• Chose GStreamer’s webrtcbin2 for the purpose
• Used it already with success in other applications (e.g., JamRTC)
• Modular and very powerful, so easy to feed with external sources
Simple WHIP Client
https://github.com/lminiero/simple-whip-client/
2
https://gstreamer.freedesktop.org/documentation/webrtc/
Writing a WHIP client for testing
• Needs to support HTTP (WHIP API) and have a WebRTC stack
• Browsers are the obvious choice, but what about a native solution?
• Many broadcasters today use custom tools (e.g., OBS)
• Unfortunately OBS-WebRTC is not currently an option
• Used legacy WHIP API, and currently only supports Millicast ingestion
• Chose GStreamer’s webrtcbin2 for the purpose
• Used it already with success in other applications (e.g., JamRTC)
• Modular and very powerful, so easy to feed with external sources
Simple WHIP Client
https://github.com/lminiero/simple-whip-client/
2
https://gstreamer.freedesktop.org/documentation/webrtc/
Writing a WHIP client for testing
• Needs to support HTTP (WHIP API) and have a WebRTC stack
• Browsers are the obvious choice, but what about a native solution?
• Many broadcasters today use custom tools (e.g., OBS)
• Unfortunately OBS-WebRTC is not currently an option
• Used legacy WHIP API, and currently only supports Millicast ingestion
• Chose GStreamer’s webrtcbin2 for the purpose
• Used it already with success in other applications (e.g., JamRTC)
• Modular and very powerful, so easy to feed with external sources
Simple WHIP Client
https://github.com/lminiero/simple-whip-client/
2
https://gstreamer.freedesktop.org/documentation/webrtc/
Simple WHIP Client options
Usage:
whip-client [OPTION?] -- Simple WHIP client
Help Options:
-h, --help Show help options
Application Options:
-u, --url Address of the WHIP endpoint (required)
-t, --token Authentication Bearer token to use (optional)
-A, --audio GStreamer pipeline to use for audio (optional, required if audio-only)
-V, --video GStreamer pipeline to use for video (optional, required if video-only)
-n, --no-trickle Don‘t trickle candidates, but put them in the SDP offer (default: false)
-f, --follow-link Use the Link headers returned by the WHIP server to automatically configure STUN/TURN servers to
use (default: false)
-S, --stun-server STUN server to use, if any (stun://hostname:port)
-T, --turn-server TURN server to use, if any; can be called multiple times
(turn(s)://username:password@host:port?transport=[udp,tcp])
-F, --force-turn In case TURN servers are provided, force using a relay (default: false)
-l, --log-level Logging level (0=disable logging, 7=maximum log level; default: 4)
Simple WHIP Client example
./whip-client -u http://localhost:7080/whip/endpoint/abc123 
-t verysecret 
-A "audiotestsrc is-live=true wave=red-noise ! audioconvert !
audioresample ! queue ! opusenc ! rtpopuspay pt=100 ! queue !
application/x-rtp,media=audio,encoding-name=OPUS,payload=100" 
-V "videotestsrc is-live=true pattern=ball ! videoconvert ! queue !
vp8enc deadline=1 ! rtpvp8pay pt=96 ! queue !
application/x-rtp,media=video,encoding-name=VP8,payload=96" 
-S stun.l.google.com:19302
WHIP client and server + Janus
Simple WHIP Client in action
Testing my WHIP client with Janus
Other WHIP implementations: servers
• Lorenzo Miniero – Simple WHIP Server (Janus)
• https://github.com/lminiero/simple-whip-server
• Juliusz Chroboczek – Galene
• https://github.com/jech/galene/tree/whip
• Sergio Garcia Murillo – Millicast integration
• https://millicast.com/
• Cameron Elliott – Deadsfu
• https://github.com/x186k/deadsfu
Other WHIP implementations: clients
• Lorenzo Miniero – Simple WHIP Client (GStreamer)
• https://github.com/lminiero/simple-whip-client
• Sergio Garcia Murillo – whip-js (JavaScript)
• https://github.com/medooze/whip-js/
• Gustavo Garcia – whip-go (Go)
• https://github.com/ggarber/whip-go/
• Tim Panton – whipi (Java / Raspberry Pi)
• https://github.com/pipe/whipi
• Alberto Gonzalez Trastoy – free-whip (Python)
• https://github.com/agonza1/free-whip/
• Cameron Elliott – whip-whap-js (JavaScript)
• https://github.com/x186k/whip-whap-js
WHIP interop tests @ IETF 112 Hackathon!
https://github.com/IETF-Hackathon/ietf112-project-presentations/blob/main/ietf112-hackathon-whip.pdf
WHIP interop tests @ IETF 112 Hackathon!
Simple WHIP Server Galene Millicast deadsfu
Simple WHIP Client
whip-js
whip-go
whipi
free-whip
whip-whap-js
Integration WHIP in broadcasting workflows
• Old version of OBS-WebRTC did have WHIP support
• Tested for my blog post from last year
• Implemented legacy WHIP API, and used libwebrtc
• No popular streamer tool supports WHIP yet, though
• WHIP will make it easy for the signalling part...
• ... but they’ll still need a working WebRTC stack
• Why not start with a more “loose” integration then?
• Keeping on using existing tools as they work today
• Somehow get them to work with my GStreamer-based WHIP client
Integration WHIP in broadcasting workflows
• Old version of OBS-WebRTC did have WHIP support
• Tested for my blog post from last year
• Implemented legacy WHIP API, and used libwebrtc
• No popular streamer tool supports WHIP yet, though
• WHIP will make it easy for the signalling part...
• ... but they’ll still need a working WebRTC stack
• Why not start with a more “loose” integration then?
• Keeping on using existing tools as they work today
• Somehow get them to work with my GStreamer-based WHIP client
Integration WHIP in broadcasting workflows
• Old version of OBS-WebRTC did have WHIP support
• Tested for my blog post from last year
• Implemented legacy WHIP API, and used libwebrtc
• No popular streamer tool supports WHIP yet, though
• WHIP will make it easy for the signalling part...
• ... but they’ll still need a working WebRTC stack
• Why not start with a more “loose” integration then?
• Keeping on using existing tools as they work today
• Somehow get them to work with my GStreamer-based WHIP client
Enter NDI!
https://www.meetecho.com/blog/webrtc-ndi/
https://www.meetecho.com/blog/webrtc-ndi-part-2/
What is NDI?
• Network Device Interface (NDI)
• Royalty-free software standard developed by NewTek
• https://www.ndi.tv/
• Live exchange of multimedia streams within the same LAN
• Multichannel and uncompressed media streams (high quality)
• mDNS used for service discovery
• Easy to use (and integrate) native SDK
• Available on Windows, Linux, MacOS, Android, etc.
• VLC team working on an alternative implementation
• Widely used in the broadcasters industry
• Natively supported by many devices and streamer tools
What is NDI?
• Network Device Interface (NDI)
• Royalty-free software standard developed by NewTek
• https://www.ndi.tv/
• Live exchange of multimedia streams within the same LAN
• Multichannel and uncompressed media streams (high quality)
• mDNS used for service discovery
• Easy to use (and integrate) native SDK
• Available on Windows, Linux, MacOS, Android, etc.
• VLC team working on an alternative implementation
• Widely used in the broadcasters industry
• Natively supported by many devices and streamer tools
What is NDI?
• Network Device Interface (NDI)
• Royalty-free software standard developed by NewTek
• https://www.ndi.tv/
• Live exchange of multimedia streams within the same LAN
• Multichannel and uncompressed media streams (high quality)
• mDNS used for service discovery
• Easy to use (and integrate) native SDK
• Available on Windows, Linux, MacOS, Android, etc.
• VLC team working on an alternative implementation
• Widely used in the broadcasters industry
• Natively supported by many devices and streamer tools
What is NDI?
• Network Device Interface (NDI)
• Royalty-free software standard developed by NewTek
• https://www.ndi.tv/
• Live exchange of multimedia streams within the same LAN
• Multichannel and uncompressed media streams (high quality)
• mDNS used for service discovery
• Easy to use (and integrate) native SDK
• Available on Windows, Linux, MacOS, Android, etc.
• VLC team working on an alternative implementation
• Widely used in the broadcasters industry
• Natively supported by many devices and streamer tools
We’ve talked about WebRTC-to-NDI before...
What about NDI-to-WebRTC, though?
• There’s a cool NDI plugin for GStreamer
• Makes it easy to use NDI sources in GStreamer pipelines
• https://github.com/teltek/gst-plugin-ndi
• Hey, our WHIP client is based on GStreamer too!
• Audio and video pipelines are customizable (command line)
• NDI plugin as source for the media −→ encoders/WebRTC will do the rest
• Of course, we need something that generates NDI
• OBS has an NDI plugin, for NDI input and output
• https://github.com/Palakis/obs-ndi
What about NDI-to-WebRTC, though?
• There’s a cool NDI plugin for GStreamer
• Makes it easy to use NDI sources in GStreamer pipelines
• https://github.com/teltek/gst-plugin-ndi
• Hey, our WHIP client is based on GStreamer too!
• Audio and video pipelines are customizable (command line)
• NDI plugin as source for the media −→ encoders/WebRTC will do the rest
• Of course, we need something that generates NDI
• OBS has an NDI plugin, for NDI input and output
• https://github.com/Palakis/obs-ndi
What about NDI-to-WebRTC, though?
• There’s a cool NDI plugin for GStreamer
• Makes it easy to use NDI sources in GStreamer pipelines
• https://github.com/teltek/gst-plugin-ndi
• Hey, our WHIP client is based on GStreamer too!
• Audio and video pipelines are customizable (command line)
• NDI plugin as source for the media −→ encoders/WebRTC will do the rest
• Of course, we need something that generates NDI
• OBS has an NDI plugin, for NDI input and output
• https://github.com/Palakis/obs-ndi
1. Configure NDI output in OBS
2. Create your scenes in OBS
3. Setup the WHIP client to capture NDI
Ready for our demo!
Ready for our demo!
Ready for our demo!
More details in a recent CommCon talk
https://2021.commcon.xyz/talks/whip-ndi-and-janus-genesis-of-a-broadcasting-demo
Next step: broadcasting the stream
• WHIP server + Janus get you in a VideoRoom, and it’s a good starting point
• That’s the whole point of WebRTC ingest!
• Already “consumable” via VideoRoom itself (SFU)
• Janus VideoRoom plugin not really optimized for broadcasting, though
• Conceived for videoconferencing use cases
• Will not work well if you have to feed, e.g., 100’s or 1000’s
• Janus Streaming plugin a much better choice
• Natively optimized for doing one-to-many
• Can receive media from VideoRoom (and so WHIP) via “RTP forwarders”
• Even better, multiple Janus instances can work together
Next step: broadcasting the stream
• WHIP server + Janus get you in a VideoRoom, and it’s a good starting point
• That’s the whole point of WebRTC ingest!
• Already “consumable” via VideoRoom itself (SFU)
• Janus VideoRoom plugin not really optimized for broadcasting, though
• Conceived for videoconferencing use cases
• Will not work well if you have to feed, e.g., 100’s or 1000’s
• Janus Streaming plugin a much better choice
• Natively optimized for doing one-to-many
• Can receive media from VideoRoom (and so WHIP) via “RTP forwarders”
• Even better, multiple Janus instances can work together
Next step: broadcasting the stream
• WHIP server + Janus get you in a VideoRoom, and it’s a good starting point
• That’s the whole point of WebRTC ingest!
• Already “consumable” via VideoRoom itself (SFU)
• Janus VideoRoom plugin not really optimized for broadcasting, though
• Conceived for videoconferencing use cases
• Will not work well if you have to feed, e.g., 100’s or 1000’s
• Janus Streaming plugin a much better choice
• Natively optimized for doing one-to-many
• Can receive media from VideoRoom (and so WHIP) via “RTP forwarders”
• Even better, multiple Janus instances can work together
Ph.D Thesis on WebRTC broadcasting (2015)
Using SOLEIL for the purpose
• “Streaming Of Large scale Events over Internet cLouds” (Ph.D Thesis)
• In a nutshell, tree-based distribution of WebRTC feeds
• Ingest and edges are WebRTC (Janus), everything in the middle just RTP
• Working with RTP in intermediate layers has many advantages
• No WebRTC overhead, and easier to route/manipulate by non-WebRTC tools
• You can even take advantage of multicast, here
• Just needs RTP forwarding to start everything
• PR available in WHIP server to do RTP forwarding (merged)
• https://github.com/lminiero/simple-whip-server/pull/2
Using SOLEIL for the purpose
• “Streaming Of Large scale Events over Internet cLouds” (Ph.D Thesis)
• In a nutshell, tree-based distribution of WebRTC feeds
• Ingest and edges are WebRTC (Janus), everything in the middle just RTP
• Working with RTP in intermediate layers has many advantages
• No WebRTC overhead, and easier to route/manipulate by non-WebRTC tools
• You can even take advantage of multicast, here
• Just needs RTP forwarding to start everything
• PR available in WHIP server to do RTP forwarding (merged)
• https://github.com/lminiero/simple-whip-server/pull/2
Using SOLEIL for the purpose
• “Streaming Of Large scale Events over Internet cLouds” (Ph.D Thesis)
• In a nutshell, tree-based distribution of WebRTC feeds
• Ingest and edges are WebRTC (Janus), everything in the middle just RTP
• Working with RTP in intermediate layers has many advantages
• No WebRTC overhead, and easier to route/manipulate by non-WebRTC tools
• You can even take advantage of multicast, here
• Just needs RTP forwarding to start everything
• PR available in WHIP server to do RTP forwarding (merged)
• https://github.com/lminiero/simple-whip-server/pull/2
To learn more about RTP forwarders...
https://archive.fosdem.org/2020/schedule/event/janus/
To learn more about RTP forwarders...
https://archive.fosdem.org/2020/schedule/event/janus/
To learn more about RTP forwarders...
https://archive.fosdem.org/2020/schedule/event/janus/
Distributing WHIP Janus streams via SOLEIL
Distributing WHIP Janus streams via SOLEIL
Distributing WHIP Janus streams via SOLEIL
Distributing WHIP Janus streams via SOLEIL
Distributing WHIP Janus streams via SOLEIL
Leveraging multicast internally for RTP
Leveraging multicast internally for RTP
Thanks! Questions? Comments?
Contacts
• https://twitter.com/elminiero
• https://twitter.com/meetecho
• https://www.meetecho.com

More Related Content

PDF
Scaling WebRTC applications with Janus
PDF
Janus + Audio @ Open Source World
PDF
Janus SFU cascading @ IIT-RTC 2022
PDF
Janus RTP forwarders @ FOSDEM 2020
PDF
Janus & docker: friends or foe
PPTX
FastNetMon Advanced DDoS detection tool
PDF
14 palo alto quality of service(qos) concept
PPTX
BGP Graceful Shutdown - IOS XR
Scaling WebRTC applications with Janus
Janus + Audio @ Open Source World
Janus SFU cascading @ IIT-RTC 2022
Janus RTP forwarders @ FOSDEM 2020
Janus & docker: friends or foe
FastNetMon Advanced DDoS detection tool
14 palo alto quality of service(qos) concept
BGP Graceful Shutdown - IOS XR

What's hot (20)

PDF
Janus: an open source and general purpose WebRTC (gateway) server
PDF
Scaling WebRTC deployments with multicast @ IETF 110 MBONED
PDF
Scaling server side web rtc applications the janus challenge by lorenzo miniero
PPT
VPN presentation - moeshesh
PDF
Introduction to FreeSWITCH
PPT
PDF
Ansible ネットワーク自動化チュートリアル (JANOG42)
PPTX
Virtual Private Network
PDF
ライブストリーミングの基礎知識その2
PDF
An SFU/MCU integration for heterogeneous environments
PDF
Write a SocialTV app @ OpenSIPS 2021
PPTX
Architecture IPTV
DOCX
Data power Performance Tuning
PDF
EtherChannel
PPTX
WebRTC overview
PDF
Protocole OSPF
PPT
Server configuration
PDF
Virtualisation
PDF
Implementing BGP Flowspec at IP transit network
PPT
Iptables in linux
Janus: an open source and general purpose WebRTC (gateway) server
Scaling WebRTC deployments with multicast @ IETF 110 MBONED
Scaling server side web rtc applications the janus challenge by lorenzo miniero
VPN presentation - moeshesh
Introduction to FreeSWITCH
Ansible ネットワーク自動化チュートリアル (JANOG42)
Virtual Private Network
ライブストリーミングの基礎知識その2
An SFU/MCU integration for heterogeneous environments
Write a SocialTV app @ OpenSIPS 2021
Architecture IPTV
Data power Performance Tuning
EtherChannel
WebRTC overview
Protocole OSPF
Server configuration
Virtualisation
Implementing BGP Flowspec at IP transit network
Iptables in linux
Ad

Similar to WHIP WebRTC Broadcasting @ FOSDEM 2022 (20)

PDF
WebRTC Broadcasting @ TADSummit 2023
PDF
WHIP and Janus @ IIT-RTC 2021
PDF
WebRTC and SIP not just audio and video @ OpenSIPS 2024
PDF
Janus/SIP @ OpenSIPS 2019
PDF
WebRTC, RED and Janus @ ClueCon21
PPTX
Bridging_WebRTC_with_SIP_Alberto_WebRTCventures_Cluecon2023_NoVideo.pptx
PDF
Torino js
PDF
Fuzzing Janus @ IPTComm 2019
PDF
Janus/Asterisk @ Astricon 2017
PDF
Can WebRTC help musicians? @ FOSDEM 2021
PDF
Insertable Streams and E2EE @ ClueCon2020
PDF
Multistream in Janus @ CommCon 2019
PPTX
Upperside Webinar - WebRTC Standards Update
PDF
Can SFUs and MCUs be friends @ IIT-RTC 2020
PDF
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
PPTX
WebRTC & Asterisk 11
PPTX
KazooCon 2014 - WebRTC
PDF
Janus Workshop pt.2 @ ClueCon 2021
PDF
WebRTC and QUIC: how hard can it be? @ RTC.ON 2024
PDF
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
WebRTC Broadcasting @ TADSummit 2023
WHIP and Janus @ IIT-RTC 2021
WebRTC and SIP not just audio and video @ OpenSIPS 2024
Janus/SIP @ OpenSIPS 2019
WebRTC, RED and Janus @ ClueCon21
Bridging_WebRTC_with_SIP_Alberto_WebRTCventures_Cluecon2023_NoVideo.pptx
Torino js
Fuzzing Janus @ IPTComm 2019
Janus/Asterisk @ Astricon 2017
Can WebRTC help musicians? @ FOSDEM 2021
Insertable Streams and E2EE @ ClueCon2020
Multistream in Janus @ CommCon 2019
Upperside Webinar - WebRTC Standards Update
Can SFUs and MCUs be friends @ IIT-RTC 2020
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
WebRTC & Asterisk 11
KazooCon 2014 - WebRTC
Janus Workshop pt.2 @ ClueCon 2021
WebRTC and QUIC: how hard can it be? @ RTC.ON 2024
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Ad

More from Lorenzo Miniero (14)

PDF
SIP trunking in Janus @ Kamailio World 2024
PDF
Getting AV1/SVC to work in the Janus WebRTC Server
PDF
BWE in Janus
PDF
The challenges of hybrid meetings @ CommCon 2023
PDF
Real-Time Text and WebRTC @ Kamailio World 2023
PDF
Become a rockstar using FOSS!
PDF
SIP transfer with Janus/WebRTC @ OpenSIPS 2022
PDF
JamRTC @ Wonder WebRTC unConference
PDF
Janus + NDI @ ClueCon 2021
PDF
Virtual IETF meetings with WebRTC @ IETF 109 MOPS
PDF
Janus Workshop @ ClueCon 2020
PDF
Turning live events to virtual with Janus
PDF
Janus workshop @ RTC2019 Beijing
PDF
Simulcast/SVC @ IIT-RTC 2019
SIP trunking in Janus @ Kamailio World 2024
Getting AV1/SVC to work in the Janus WebRTC Server
BWE in Janus
The challenges of hybrid meetings @ CommCon 2023
Real-Time Text and WebRTC @ Kamailio World 2023
Become a rockstar using FOSS!
SIP transfer with Janus/WebRTC @ OpenSIPS 2022
JamRTC @ Wonder WebRTC unConference
Janus + NDI @ ClueCon 2021
Virtual IETF meetings with WebRTC @ IETF 109 MOPS
Janus Workshop @ ClueCon 2020
Turning live events to virtual with Janus
Janus workshop @ RTC2019 Beijing
Simulcast/SVC @ IIT-RTC 2019

Recently uploaded (20)

PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Empathic Computing: Creating Shared Understanding
PDF
Electronic commerce courselecture one. Pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Machine learning based COVID-19 study performance prediction
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Cloud computing and distributed systems.
NewMind AI Monthly Chronicles - July 2025
Empathic Computing: Creating Shared Understanding
Electronic commerce courselecture one. Pdf
Building Integrated photovoltaic BIPV_UPV.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Unlocking AI with Model Context Protocol (MCP)
Machine learning based COVID-19 study performance prediction
NewMind AI Weekly Chronicles - August'25 Week I
Per capita expenditure prediction using model stacking based on satellite ima...
Review of recent advances in non-invasive hemoglobin estimation
Reach Out and Touch Someone: Haptics and Empathic Computing
Network Security Unit 5.pdf for BCA BBA.
Diabetes mellitus diagnosis method based random forest with bat algorithm
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Digital-Transformation-Roadmap-for-Companies.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation theory and applications.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Cloud computing and distributed systems.

WHIP WebRTC Broadcasting @ FOSDEM 2022

  • 1. WebRTC broadcasting with WHIP Lorenzo Miniero @elminiero FOSDEM 2022 Real Time Communications 5th February 2022, Brussels My couch
  • 2. Who am I? Lorenzo Miniero • Ph.D @ UniNA • Chairman @ Meetecho • Main author of Janus Contacts and info • lorenzo@meetecho.com • https://twitter.com/elminiero • https://www.slideshare.net/LorenzoMiniero • https://lminiero.bandcamp.com
  • 3. MCU as a WebRTC topology
  • 4. SFU as a WebRTC topology
  • 5. A slightly variation on the theme
  • 7. What if we want more interactivity, though?
  • 8. What if we want more interactivity, though?
  • 9. What if we want more interactivity, though?
  • 10. What if we want more interactivity, though?
  • 11. Why not WebRTC instead? • Traditional broadcasting efficient but higher latency • At best (live), delay will typically be in the range of a few seconds • Besides, different users may experience different delays (buffering) • WebRTC natively conceived for very low latency, instead • Born for conversational audio/video/data • Can be (and often is) easily used for monodirectional streaming as well • Strangely not really considered by the industry up until recently, though • Topic of my Ph.D years ago (“Streaming Of Large scale Events over Internet cLouds”) • Clearing the industry FUD: https://webrtcbydralex.com/index.php/2020/04/14/ • Tooling an important aspect to foster WebRTC adoption, here • e.g., a standard way to send media, and tools à la OBS, XSplit, or others
  • 12. Why not WebRTC instead? • Traditional broadcasting efficient but higher latency • At best (live), delay will typically be in the range of a few seconds • Besides, different users may experience different delays (buffering) • WebRTC natively conceived for very low latency, instead • Born for conversational audio/video/data • Can be (and often is) easily used for monodirectional streaming as well • Strangely not really considered by the industry up until recently, though • Topic of my Ph.D years ago (“Streaming Of Large scale Events over Internet cLouds”) • Clearing the industry FUD: https://webrtcbydralex.com/index.php/2020/04/14/ • Tooling an important aspect to foster WebRTC adoption, here • e.g., a standard way to send media, and tools à la OBS, XSplit, or others
  • 13. Why not WebRTC instead? • Traditional broadcasting efficient but higher latency • At best (live), delay will typically be in the range of a few seconds • Besides, different users may experience different delays (buffering) • WebRTC natively conceived for very low latency, instead • Born for conversational audio/video/data • Can be (and often is) easily used for monodirectional streaming as well • Strangely not really considered by the industry up until recently, though • Topic of my Ph.D years ago (“Streaming Of Large scale Events over Internet cLouds”) • Clearing the industry FUD: https://webrtcbydralex.com/index.php/2020/04/14/ • Tooling an important aspect to foster WebRTC adoption, here • e.g., a standard way to send media, and tools à la OBS, XSplit, or others
  • 14. Why not WebRTC instead? • Traditional broadcasting efficient but higher latency • At best (live), delay will typically be in the range of a few seconds • Besides, different users may experience different delays (buffering) • WebRTC natively conceived for very low latency, instead • Born for conversational audio/video/data • Can be (and often is) easily used for monodirectional streaming as well • Strangely not really considered by the industry up until recently, though • Topic of my Ph.D years ago (“Streaming Of Large scale Events over Internet cLouds”) • Clearing the industry FUD: https://webrtcbydralex.com/index.php/2020/04/14/ • Tooling an important aspect to foster WebRTC adoption, here • e.g., a standard way to send media, and tools à la OBS, XSplit, or others
  • 15. WebRTC audio: Opus • WebRTC mandates Opus, and it’s a good thing • High quality audio codec designed for the Internet • Very flexible in sampling rates, bitrates, FEC, etc. • Different profiles for voice and music/other • Both encoding and decoding vary, in case • Can be mono and stereo, with dynamic sampling rates and bitrates • Multiopus (5.1 and 7.1)1 • Each packet is basically OGG with multiple stereo Opus streams • Number of streams determines number of channels • Not documented, but used by Google for Stadia 1 https://webrtcbydralex.com/index.php/2020/04/08/surround-sound-5-1-and-7-1-in-libwebrtc-and-chrome/
  • 16. WebRTC audio: Opus • WebRTC mandates Opus, and it’s a good thing • High quality audio codec designed for the Internet • Very flexible in sampling rates, bitrates, FEC, etc. • Different profiles for voice and music/other • Both encoding and decoding vary, in case • Can be mono and stereo, with dynamic sampling rates and bitrates • Multiopus (5.1 and 7.1)1 • Each packet is basically OGG with multiple stereo Opus streams • Number of streams determines number of channels • Not documented, but used by Google for Stadia 1 https://webrtcbydralex.com/index.php/2020/04/08/surround-sound-5-1-and-7-1-in-libwebrtc-and-chrome/
  • 17. WebRTC audio: Opus • WebRTC mandates Opus, and it’s a good thing • High quality audio codec designed for the Internet • Very flexible in sampling rates, bitrates, FEC, etc. • Different profiles for voice and music/other • Both encoding and decoding vary, in case • Can be mono and stereo, with dynamic sampling rates and bitrates • Multiopus (5.1 and 7.1)1 • Each packet is basically OGG with multiple stereo Opus streams • Number of streams determines number of channels • Not documented, but used by Google for Stadia 1 https://webrtcbydralex.com/index.php/2020/04/08/surround-sound-5-1-and-7-1-in-libwebrtc-and-chrome/
  • 18. WebRTC video: Simulcasting & SVC https://webrtchacks.com/sfu-simulcast/
  • 19. WebRTC video: Simulcasting & SVC https://webrtchacks.com/chrome-vp9-svc/
  • 20. Two main challenges: ingestion...
  • 21. Two main challenges: ... and distribution
  • 22. (and yeah, maybe scaling too! )
  • 23. Making WebRTC ingestion easy: WISH / WHIP! https://www.meetecho.com/blog/whip-janus/ (September 2020)
  • 24. Making WebRTC ingestion easy: WISH / WHIP! https://www.meetecho.com/blog/whip-janus-part-ii/
  • 25. There would be no WHIP without Dr. Alex r
  • 26. A new Working Group in the IETF... https://datatracker.ietf.org/wg/wish/about/
  • 27. ... and a new draft for the WHIP specification! https://www.ietf.org/archive/id/draft-ietf-wish-whip-01.html
  • 28. WebRTC-HTTP ingestion protocol (WHIP) • HTTP-based signalling to create sendonly PeerConnections • HTTP POST to send SDP offer, and get an SDP answer in the response • Teardown of sessions using HTTP DELETE • Authentication and authorization via Bearer tokens • https://www.rfc-editor.org/rfc/rfc6750.html • Trickle and ICE restart via HTTP PATCH and SDP fragments • https://www.rfc-editor.org/rfc/rfc8840.html • Everything else is your usual WebRTC! • ICE, DTLS, etc.
  • 29. WebRTC-HTTP ingestion protocol (WHIP) • HTTP-based signalling to create sendonly PeerConnections • HTTP POST to send SDP offer, and get an SDP answer in the response • Teardown of sessions using HTTP DELETE • Authentication and authorization via Bearer tokens • https://www.rfc-editor.org/rfc/rfc6750.html • Trickle and ICE restart via HTTP PATCH and SDP fragments • https://www.rfc-editor.org/rfc/rfc8840.html • Everything else is your usual WebRTC! • ICE, DTLS, etc.
  • 30. WebRTC-HTTP ingestion protocol (WHIP) • HTTP-based signalling to create sendonly PeerConnections • HTTP POST to send SDP offer, and get an SDP answer in the response • Teardown of sessions using HTTP DELETE • Authentication and authorization via Bearer tokens • https://www.rfc-editor.org/rfc/rfc6750.html • Trickle and ICE restart via HTTP PATCH and SDP fragments • https://www.rfc-editor.org/rfc/rfc8840.html • Everything else is your usual WebRTC! • ICE, DTLS, etc.
  • 31. WebRTC-HTTP ingestion protocol (WHIP) • HTTP-based signalling to create sendonly PeerConnections • HTTP POST to send SDP offer, and get an SDP answer in the response • Teardown of sessions using HTTP DELETE • Authentication and authorization via Bearer tokens • https://www.rfc-editor.org/rfc/rfc6750.html • Trickle and ICE restart via HTTP PATCH and SDP fragments • https://www.rfc-editor.org/rfc/rfc8840.html • Everything else is your usual WebRTC! • ICE, DTLS, etc.
  • 32. A few sequence diagrams
  • 33. A few sequence diagrams
  • 34. A few sequence diagrams
  • 35. A WHIP server based on Janus • Janus is a popular WebRTC server, so good option for WHIP • It implements its own JSON-based API, though (Janus API) • Simple (and transparent) solution: basic API translator in front of Janus • WHIP API maps quite simply to set of Janus API primitives • No need to change anything in the WebRTC stack • Implemented simple prototype using node.js and Express • REST server that implements the WHIP API, and talks to Janus accordingly • Only takes care of ingest: distribution out of scope (e.g., via SOLEIL) Simple WHIP Server https://github.com/lminiero/simple-whip-server/
  • 36. A WHIP server based on Janus • Janus is a popular WebRTC server, so good option for WHIP • It implements its own JSON-based API, though (Janus API) • Simple (and transparent) solution: basic API translator in front of Janus • WHIP API maps quite simply to set of Janus API primitives • No need to change anything in the WebRTC stack • Implemented simple prototype using node.js and Express • REST server that implements the WHIP API, and talks to Janus accordingly • Only takes care of ingest: distribution out of scope (e.g., via SOLEIL) Simple WHIP Server https://github.com/lminiero/simple-whip-server/
  • 37. A WHIP server based on Janus • Janus is a popular WebRTC server, so good option for WHIP • It implements its own JSON-based API, though (Janus API) • Simple (and transparent) solution: basic API translator in front of Janus • WHIP API maps quite simply to set of Janus API primitives • No need to change anything in the WebRTC stack • Implemented simple prototype using node.js and Express • REST server that implements the WHIP API, and talks to Janus accordingly • Only takes care of ingest: distribution out of scope (e.g., via SOLEIL) Simple WHIP Server https://github.com/lminiero/simple-whip-server/
  • 38. A WHIP server based on Janus • Janus is a popular WebRTC server, so good option for WHIP • It implements its own JSON-based API, though (Janus API) • Simple (and transparent) solution: basic API translator in front of Janus • WHIP API maps quite simply to set of Janus API primitives • No need to change anything in the WebRTC stack • Implemented simple prototype using node.js and Express • REST server that implements the WHIP API, and talks to Janus accordingly • Only takes care of ingest: distribution out of scope (e.g., via SOLEIL) Simple WHIP Server https://github.com/lminiero/simple-whip-server/
  • 39. Mapping WHIP interactions to the Janus API
  • 40. Mapping WHIP interactions to the Janus API
  • 41. Mapping WHIP interactions to the Janus API
  • 42. Mapping WHIP interactions to the Janus API
  • 43. Mapping WHIP interactions to the Janus API
  • 44. Simple WHIP Server in action
  • 45. Basic UI to create/manage endpoints
  • 46. Writing a WHIP client for testing • Needs to support HTTP (WHIP API) and have a WebRTC stack • Browsers are the obvious choice, but what about a native solution? • Many broadcasters today use custom tools (e.g., OBS) • Unfortunately OBS-WebRTC is not currently an option • Used legacy WHIP API, and currently only supports Millicast ingestion • Chose GStreamer’s webrtcbin2 for the purpose • Used it already with success in other applications (e.g., JamRTC) • Modular and very powerful, so easy to feed with external sources Simple WHIP Client https://github.com/lminiero/simple-whip-client/ 2 https://gstreamer.freedesktop.org/documentation/webrtc/
  • 47. Writing a WHIP client for testing • Needs to support HTTP (WHIP API) and have a WebRTC stack • Browsers are the obvious choice, but what about a native solution? • Many broadcasters today use custom tools (e.g., OBS) • Unfortunately OBS-WebRTC is not currently an option • Used legacy WHIP API, and currently only supports Millicast ingestion • Chose GStreamer’s webrtcbin2 for the purpose • Used it already with success in other applications (e.g., JamRTC) • Modular and very powerful, so easy to feed with external sources Simple WHIP Client https://github.com/lminiero/simple-whip-client/ 2 https://gstreamer.freedesktop.org/documentation/webrtc/
  • 48. Writing a WHIP client for testing • Needs to support HTTP (WHIP API) and have a WebRTC stack • Browsers are the obvious choice, but what about a native solution? • Many broadcasters today use custom tools (e.g., OBS) • Unfortunately OBS-WebRTC is not currently an option • Used legacy WHIP API, and currently only supports Millicast ingestion • Chose GStreamer’s webrtcbin2 for the purpose • Used it already with success in other applications (e.g., JamRTC) • Modular and very powerful, so easy to feed with external sources Simple WHIP Client https://github.com/lminiero/simple-whip-client/ 2 https://gstreamer.freedesktop.org/documentation/webrtc/
  • 49. Writing a WHIP client for testing • Needs to support HTTP (WHIP API) and have a WebRTC stack • Browsers are the obvious choice, but what about a native solution? • Many broadcasters today use custom tools (e.g., OBS) • Unfortunately OBS-WebRTC is not currently an option • Used legacy WHIP API, and currently only supports Millicast ingestion • Chose GStreamer’s webrtcbin2 for the purpose • Used it already with success in other applications (e.g., JamRTC) • Modular and very powerful, so easy to feed with external sources Simple WHIP Client https://github.com/lminiero/simple-whip-client/ 2 https://gstreamer.freedesktop.org/documentation/webrtc/
  • 50. Simple WHIP Client options Usage: whip-client [OPTION?] -- Simple WHIP client Help Options: -h, --help Show help options Application Options: -u, --url Address of the WHIP endpoint (required) -t, --token Authentication Bearer token to use (optional) -A, --audio GStreamer pipeline to use for audio (optional, required if audio-only) -V, --video GStreamer pipeline to use for video (optional, required if video-only) -n, --no-trickle Don‘t trickle candidates, but put them in the SDP offer (default: false) -f, --follow-link Use the Link headers returned by the WHIP server to automatically configure STUN/TURN servers to use (default: false) -S, --stun-server STUN server to use, if any (stun://hostname:port) -T, --turn-server TURN server to use, if any; can be called multiple times (turn(s)://username:password@host:port?transport=[udp,tcp]) -F, --force-turn In case TURN servers are provided, force using a relay (default: false) -l, --log-level Logging level (0=disable logging, 7=maximum log level; default: 4)
  • 51. Simple WHIP Client example ./whip-client -u http://localhost:7080/whip/endpoint/abc123 -t verysecret -A "audiotestsrc is-live=true wave=red-noise ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay pt=100 ! queue ! application/x-rtp,media=audio,encoding-name=OPUS,payload=100" -V "videotestsrc is-live=true pattern=ball ! videoconvert ! queue ! vp8enc deadline=1 ! rtpvp8pay pt=96 ! queue ! application/x-rtp,media=video,encoding-name=VP8,payload=96" -S stun.l.google.com:19302
  • 52. WHIP client and server + Janus
  • 53. Simple WHIP Client in action
  • 54. Testing my WHIP client with Janus
  • 55. Other WHIP implementations: servers • Lorenzo Miniero – Simple WHIP Server (Janus) • https://github.com/lminiero/simple-whip-server • Juliusz Chroboczek – Galene • https://github.com/jech/galene/tree/whip • Sergio Garcia Murillo – Millicast integration • https://millicast.com/ • Cameron Elliott – Deadsfu • https://github.com/x186k/deadsfu
  • 56. Other WHIP implementations: clients • Lorenzo Miniero – Simple WHIP Client (GStreamer) • https://github.com/lminiero/simple-whip-client • Sergio Garcia Murillo – whip-js (JavaScript) • https://github.com/medooze/whip-js/ • Gustavo Garcia – whip-go (Go) • https://github.com/ggarber/whip-go/ • Tim Panton – whipi (Java / Raspberry Pi) • https://github.com/pipe/whipi • Alberto Gonzalez Trastoy – free-whip (Python) • https://github.com/agonza1/free-whip/ • Cameron Elliott – whip-whap-js (JavaScript) • https://github.com/x186k/whip-whap-js
  • 57. WHIP interop tests @ IETF 112 Hackathon! https://github.com/IETF-Hackathon/ietf112-project-presentations/blob/main/ietf112-hackathon-whip.pdf
  • 58. WHIP interop tests @ IETF 112 Hackathon! Simple WHIP Server Galene Millicast deadsfu Simple WHIP Client whip-js whip-go whipi free-whip whip-whap-js
  • 59. Integration WHIP in broadcasting workflows • Old version of OBS-WebRTC did have WHIP support • Tested for my blog post from last year • Implemented legacy WHIP API, and used libwebrtc • No popular streamer tool supports WHIP yet, though • WHIP will make it easy for the signalling part... • ... but they’ll still need a working WebRTC stack • Why not start with a more “loose” integration then? • Keeping on using existing tools as they work today • Somehow get them to work with my GStreamer-based WHIP client
  • 60. Integration WHIP in broadcasting workflows • Old version of OBS-WebRTC did have WHIP support • Tested for my blog post from last year • Implemented legacy WHIP API, and used libwebrtc • No popular streamer tool supports WHIP yet, though • WHIP will make it easy for the signalling part... • ... but they’ll still need a working WebRTC stack • Why not start with a more “loose” integration then? • Keeping on using existing tools as they work today • Somehow get them to work with my GStreamer-based WHIP client
  • 61. Integration WHIP in broadcasting workflows • Old version of OBS-WebRTC did have WHIP support • Tested for my blog post from last year • Implemented legacy WHIP API, and used libwebrtc • No popular streamer tool supports WHIP yet, though • WHIP will make it easy for the signalling part... • ... but they’ll still need a working WebRTC stack • Why not start with a more “loose” integration then? • Keeping on using existing tools as they work today • Somehow get them to work with my GStreamer-based WHIP client
  • 63. What is NDI? • Network Device Interface (NDI) • Royalty-free software standard developed by NewTek • https://www.ndi.tv/ • Live exchange of multimedia streams within the same LAN • Multichannel and uncompressed media streams (high quality) • mDNS used for service discovery • Easy to use (and integrate) native SDK • Available on Windows, Linux, MacOS, Android, etc. • VLC team working on an alternative implementation • Widely used in the broadcasters industry • Natively supported by many devices and streamer tools
  • 64. What is NDI? • Network Device Interface (NDI) • Royalty-free software standard developed by NewTek • https://www.ndi.tv/ • Live exchange of multimedia streams within the same LAN • Multichannel and uncompressed media streams (high quality) • mDNS used for service discovery • Easy to use (and integrate) native SDK • Available on Windows, Linux, MacOS, Android, etc. • VLC team working on an alternative implementation • Widely used in the broadcasters industry • Natively supported by many devices and streamer tools
  • 65. What is NDI? • Network Device Interface (NDI) • Royalty-free software standard developed by NewTek • https://www.ndi.tv/ • Live exchange of multimedia streams within the same LAN • Multichannel and uncompressed media streams (high quality) • mDNS used for service discovery • Easy to use (and integrate) native SDK • Available on Windows, Linux, MacOS, Android, etc. • VLC team working on an alternative implementation • Widely used in the broadcasters industry • Natively supported by many devices and streamer tools
  • 66. What is NDI? • Network Device Interface (NDI) • Royalty-free software standard developed by NewTek • https://www.ndi.tv/ • Live exchange of multimedia streams within the same LAN • Multichannel and uncompressed media streams (high quality) • mDNS used for service discovery • Easy to use (and integrate) native SDK • Available on Windows, Linux, MacOS, Android, etc. • VLC team working on an alternative implementation • Widely used in the broadcasters industry • Natively supported by many devices and streamer tools
  • 67. We’ve talked about WebRTC-to-NDI before...
  • 68. What about NDI-to-WebRTC, though? • There’s a cool NDI plugin for GStreamer • Makes it easy to use NDI sources in GStreamer pipelines • https://github.com/teltek/gst-plugin-ndi • Hey, our WHIP client is based on GStreamer too! • Audio and video pipelines are customizable (command line) • NDI plugin as source for the media −→ encoders/WebRTC will do the rest • Of course, we need something that generates NDI • OBS has an NDI plugin, for NDI input and output • https://github.com/Palakis/obs-ndi
  • 69. What about NDI-to-WebRTC, though? • There’s a cool NDI plugin for GStreamer • Makes it easy to use NDI sources in GStreamer pipelines • https://github.com/teltek/gst-plugin-ndi • Hey, our WHIP client is based on GStreamer too! • Audio and video pipelines are customizable (command line) • NDI plugin as source for the media −→ encoders/WebRTC will do the rest • Of course, we need something that generates NDI • OBS has an NDI plugin, for NDI input and output • https://github.com/Palakis/obs-ndi
  • 70. What about NDI-to-WebRTC, though? • There’s a cool NDI plugin for GStreamer • Makes it easy to use NDI sources in GStreamer pipelines • https://github.com/teltek/gst-plugin-ndi • Hey, our WHIP client is based on GStreamer too! • Audio and video pipelines are customizable (command line) • NDI plugin as source for the media −→ encoders/WebRTC will do the rest • Of course, we need something that generates NDI • OBS has an NDI plugin, for NDI input and output • https://github.com/Palakis/obs-ndi
  • 71. 1. Configure NDI output in OBS
  • 72. 2. Create your scenes in OBS
  • 73. 3. Setup the WHIP client to capture NDI
  • 74. Ready for our demo!
  • 75. Ready for our demo!
  • 76. Ready for our demo!
  • 77. More details in a recent CommCon talk https://2021.commcon.xyz/talks/whip-ndi-and-janus-genesis-of-a-broadcasting-demo
  • 78. Next step: broadcasting the stream • WHIP server + Janus get you in a VideoRoom, and it’s a good starting point • That’s the whole point of WebRTC ingest! • Already “consumable” via VideoRoom itself (SFU) • Janus VideoRoom plugin not really optimized for broadcasting, though • Conceived for videoconferencing use cases • Will not work well if you have to feed, e.g., 100’s or 1000’s • Janus Streaming plugin a much better choice • Natively optimized for doing one-to-many • Can receive media from VideoRoom (and so WHIP) via “RTP forwarders” • Even better, multiple Janus instances can work together
  • 79. Next step: broadcasting the stream • WHIP server + Janus get you in a VideoRoom, and it’s a good starting point • That’s the whole point of WebRTC ingest! • Already “consumable” via VideoRoom itself (SFU) • Janus VideoRoom plugin not really optimized for broadcasting, though • Conceived for videoconferencing use cases • Will not work well if you have to feed, e.g., 100’s or 1000’s • Janus Streaming plugin a much better choice • Natively optimized for doing one-to-many • Can receive media from VideoRoom (and so WHIP) via “RTP forwarders” • Even better, multiple Janus instances can work together
  • 80. Next step: broadcasting the stream • WHIP server + Janus get you in a VideoRoom, and it’s a good starting point • That’s the whole point of WebRTC ingest! • Already “consumable” via VideoRoom itself (SFU) • Janus VideoRoom plugin not really optimized for broadcasting, though • Conceived for videoconferencing use cases • Will not work well if you have to feed, e.g., 100’s or 1000’s • Janus Streaming plugin a much better choice • Natively optimized for doing one-to-many • Can receive media from VideoRoom (and so WHIP) via “RTP forwarders” • Even better, multiple Janus instances can work together
  • 81. Ph.D Thesis on WebRTC broadcasting (2015)
  • 82. Using SOLEIL for the purpose • “Streaming Of Large scale Events over Internet cLouds” (Ph.D Thesis) • In a nutshell, tree-based distribution of WebRTC feeds • Ingest and edges are WebRTC (Janus), everything in the middle just RTP • Working with RTP in intermediate layers has many advantages • No WebRTC overhead, and easier to route/manipulate by non-WebRTC tools • You can even take advantage of multicast, here • Just needs RTP forwarding to start everything • PR available in WHIP server to do RTP forwarding (merged) • https://github.com/lminiero/simple-whip-server/pull/2
  • 83. Using SOLEIL for the purpose • “Streaming Of Large scale Events over Internet cLouds” (Ph.D Thesis) • In a nutshell, tree-based distribution of WebRTC feeds • Ingest and edges are WebRTC (Janus), everything in the middle just RTP • Working with RTP in intermediate layers has many advantages • No WebRTC overhead, and easier to route/manipulate by non-WebRTC tools • You can even take advantage of multicast, here • Just needs RTP forwarding to start everything • PR available in WHIP server to do RTP forwarding (merged) • https://github.com/lminiero/simple-whip-server/pull/2
  • 84. Using SOLEIL for the purpose • “Streaming Of Large scale Events over Internet cLouds” (Ph.D Thesis) • In a nutshell, tree-based distribution of WebRTC feeds • Ingest and edges are WebRTC (Janus), everything in the middle just RTP • Working with RTP in intermediate layers has many advantages • No WebRTC overhead, and easier to route/manipulate by non-WebRTC tools • You can even take advantage of multicast, here • Just needs RTP forwarding to start everything • PR available in WHIP server to do RTP forwarding (merged) • https://github.com/lminiero/simple-whip-server/pull/2
  • 85. To learn more about RTP forwarders... https://archive.fosdem.org/2020/schedule/event/janus/
  • 86. To learn more about RTP forwarders... https://archive.fosdem.org/2020/schedule/event/janus/
  • 87. To learn more about RTP forwarders... https://archive.fosdem.org/2020/schedule/event/janus/
  • 88. Distributing WHIP Janus streams via SOLEIL
  • 89. Distributing WHIP Janus streams via SOLEIL
  • 90. Distributing WHIP Janus streams via SOLEIL
  • 91. Distributing WHIP Janus streams via SOLEIL
  • 92. Distributing WHIP Janus streams via SOLEIL
  • 95. Thanks! Questions? Comments? Contacts • https://twitter.com/elminiero • https://twitter.com/meetecho • https://www.meetecho.com