Mediasoup – WebRTC video conferencing
github.com
github.com
WebRTC is a collection of underlying protocols, SDP, STUN, DTLS, RTP, SCTP. A superficial glance it seems to make sense, each of these RFCs provide some aspect needed in WebRTC.
However. These standards are from a naive happy time when the internet was open and routable, which means it's only some subset of said standards needed. The main WebRTC RFC fails at pinning down which, so it's down to the implementations to find some happy subset that works.
Trying to implement it is so frustrating. At every corner you follow links to some underlying RFC, start reading and coding only to realize "is this even used?!"
SDP is maybe the single worst thing in this mess. It's a terrible flat file description of structured data organized differently depending on "plan-b" or "unified". It would be super easy to convey what SDP tries to convey in any purpose built format.
On a conceptual level there are too many abstractions in the API. MediaStream and RTPTransceiver are my two pet peeves. MediaStream is maybe nice in client code to group some tracks together into a player, but the abstraction should stay on that level. RTPTransceiver is just beyond me. Why do I want it? How does this help?
I personally like WebRTC. Maybe just Stockholm syndrome though :) I see everyone saying QUIC is the answer, but all the complexity scares me. I imagine in 5 years everyone will miss how WebRTC is built with small building blocks.
WebRTC also bridges with a lot existing telephony stuff, which is nice! Since it talks RTP/SRTP I see a lot of people wiring it up to their older systems which is kind of cool!
[0] https://tools.ietf.org/html/draft-rosenbergjennings-dispatch...
It's getting slowly better since the standard introduced concepts from ORTC.
[0] https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/...
https://mediasoup.org/documentation/v3/mediasoup/rtp-paramet...
If you want to know why we don't use SDP (as communication means between client and server) here a good reading: https://webrtchacks.com/webrtc-sdp-inaki-baz-castillo/
Mediasoup has a bit more modern codebase and offers a rather low-level framework to build your own SFU. Whereas Jitsi videobridge is more of a ready-to-go SFU, but less flexible.
Mediasoup has very good node bindings, which may or may not be an advantage to you.
They offer similar (good) performance, although Mediasoup has a slight edge here. They're both very actively being kept up to date with the latest standards (in contrast with Kurento which is now as good as dead after Twilio bought the team). This is very important since both the spec and browser implementations are a fast moving target.
Disadvantage of mediasoup is that it is mainly maintained by just 1 or 2 persons and not yet used as much as Jitsi, so it's a bit of a gamble to start building your product on top of that.
mediasouop is not an application but a set of server and client low level libraries to build whichever kind of audio/video applications (not just meetings). You don't "install mediasoup and configure it". You create your Node app and integrate mediasoup as you do with any other NPM dependency. Same in client side. More here:
https://mediasoup.org/documentation/overview/
Of course, this means that you must build your application, including UI, client-server signaling, etc etc.
Is live streaming a use-case that's under scope? If so, can the client P2P or requires a relay server for all traffic?
webRTC is peer 2 peer, but that doesn't work if you have a lot of peers. That is where an SFU like mediasoup comes into the picture. That's a kind of relay server so you can send to many peers still over webRTC (thus with ultra low latency). Also, if the peers are behind firewalls, peer 2 peer also doesn't work and you need a TURN server to relay the video.
Any question or comment about mediasoup?
Edit : I see Kurento is now assumed dead thanks to Twilio buying them, and I understand Janus doesn't provide any client libraries.
Disclaimer: I'm OpenVidu project lead.
mediasoup overview here: https://mediasoup.org/documentation/overview/
Kurento still the easiest to deploy I think. Used in OpenVidu.
Also, I don't agree with Kurento being dead (off topic, but hey). It is still being maintained and works perfectly well for modern applications.
For restricted environments limited to things you can get from standard repos this is the only way to get NPM deps.