7 ms·
Mediasoup – WebRTC video conferencing
- monkeydust 6y agoWhat kind of hardware would I need to setup this to run a private video chat server for say 10 users?
- ibc 6y ago10 users? the cheapest one.
- Recursing 6y agoWhat advantages would this offer over jitsi meet?
- kabes 6y agoJitsi meet is a conferencing app. You likely mean jitsi videobridge. That's the SFU part and comparable to mediasoup. 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.
- ibc 6y agoYep, two active developers but being just a set of libraries it's good enough. We also get nice contributions (C++ fixes and optimizations) via PR in GitHub. And we use mediasoup in different commercial products.
- micaelgallego 6y agoKurento is not dead. Main contributions are on OpenVidu project, that somehow is part of Kurento (but with other name)
- ibc 6y agoJitsi is a full application (web app, backend servers) with a specific use case: meetings (similar to Zoom or Google Meet). 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/ https://mediasoup.org/documentation/overview/ Of course, this means that you must build your application, including UI, client-server signaling, etc etc.
- ignoramous 6y ago> ...build whichever kind of audio/video applications... Is live streaming a use-case that's under scope? If so, can the client P2P or requires a relay server for all traffic?
- microcolonel 6y agoI think there's nothing stopping you from attempting that, but you would need some pretty complex client software to get a good experience with P2P live streaming.
- ibc 6y agoPornHub uses mediasoup for live cams.
- toomuchtodo 6y agoThat’s quite the endorsement.
- jagannathtech 6y agoexactly what I was thinking :)
- kabes 6y agoWell, it's webRTC. So the main use case is live video streaming. But one would need to define 'live'. webRTC is really made for sub-second latency, which you need for conversations. If you don't require this you're better of using HLS streaming. Because achieving ultra-low latency does come with tradeoffs in complexity and quality. 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.
- telesilla 6y agoThe demo is nice and clean. How does this compare to Kurento, or Janus? Edit : I see Kurento is now assumed dead thanks to Twilio buying them, and I understand Janus doesn't provide any client libraries.
- mandaputtra 6y agoIt is more like building block than one off video mettings solution. Kurento still the easiest to deploy I think. Used in OpenVidu.
- ibc 6y agomediasoup (in server side) is a Node.js library or a NPM dependency that you integrate into your Node.js app. Of course it comes with tons of C++ lines but, from the point of view of the user, it's just yet another NPM dependency into your Node.js project. mediasoup overview here: https://mediasoup.org/documentation/overview/ https://mediasoup.org/documentation/overview/
- detaro 6y agoSo no documented c++ library to bind other languages through? server side needs to be node.js?
- microcolonel 6y agoIf you want that, probably Janus is something worth looking at.
- ibc 6y agoIt's a Node library, yes.
- lilolmilkjug 6y agoJanus works pretty well, the endpoints are well documented and allowed me to write a small web app in python for connecting peers through janus. It's not too complicated
- 6y ago
- throwawaybbqed 6y agoI've looked at WebRTC a few times, and every time I've been overwhelmed by the complexity of the protocol. I understand video streaming is hampered by codec patents, etc. but in 2020, the situation seems to be getting better with open source codecs unencumbered of patents (VP8,VP9, AV1, etc.) Why is the best we have still WebRTC? Seems it could be simplified as a protocol .. is this inherently hard or just a result of being designed in a committee?
- ibc 6y agoI thought that this news was about mediasoup, not about generic WebRTC questions.
- VWWHFSfQ 6y agoI think you're misunderstanding what WebRTC is. It's only loosely related to specific video codecs. It can carry H.264, VP8, and VP9.
- algesten 6y agoIt's way too complicated. I suspect it's some design by committee with large backer interests interfering. 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?
- andrethegiant 6y agoYou can use WebRTC for emitting raw data p2p, not just audio/video streams, right? Or would websockets be preferred if you wanted to, say, broadcast JSON objects to whoever was listening?
- ibc 6y agoYes, you can use WebRTC DataChannels for sending custom text/binary data on top of a ICE+DTLS connection. BTW mediasoup supports DataChannels. Any question or comment about mediasoup?
- andrethegiant 6y agoWhat advantages does sending data over WebRTC have over sending data over websockets?
- kabes 6y agoYou said it yourself: it can be done peer 2 peer. A websocket will have a server in between.
- ibc 6y agoDataChannels are transmitted over the same UDP/ICE "connection" that is used to transmit audio and video packets. So if you plan to send real-time data (for example: real-time subtitles, metadata related to the current video position, etc) by sending such a data over DataChannel it will reach the remote without delay over the audio/video. If you use WebSocket to transmit the data, there may desynchronization between audio/video and data because they use a different network path.
- Snelius 6y agoIt's a best we have as wrtc SFU today. Thank you guys.
- webel0 6y agoCan someone explain how mediasoup differs from the RTCPeerConnection object (and related events) discussed in this Mozilla webrtc tutorial [0]? Given that it uses c++ I figure that mediasoup is more than just a wrapper around this? Any usability or reliability benefits of either? [0] https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Signaling_and_video_calling https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/...
- ibc 6y agomediasoup (server side, so the Node + C++ component you mean) does not implement "RTCPeerConnection". That's just needed for browsers. In mediasoup we don't use SDP but specific RTP parameters as defined here: https://mediasoup.org/documentation/v3/mediasoup/rtp-parameters-and-capabilities/ 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/ https://webrtchacks.com/webrtc-sdp-inaki-baz-castillo/
- webel0 6y agoAh, okay, whenever I think webrtc I assume p2p with no server but I am now actually reading into what SFU is, etc. Makes sense. Thanks for pointer to these resources.
- tomasyany 6y agoHas anybody compared MediaSoup with Kurento? https://www.kurento.org/ https://www.kurento.org/
- kabes 6y agoThe team behind kurento got hired by twilio some years ago. Now it's basically dead with some very minimal maintenance being done.
- tomasyany 6y agoI was asking about differences in the features they support, and results in real life experiences. 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.
- stragies 6y agoNeither is available in Debian repos.
- ibc 6y agomediasoup is not an application, is a Node.js library. It's yet nother NPM dependency in your Node.js application. No reason to have a DEB package.
- stragies 6y agoFair point, but there are standard ways to package npm deps in Debian: https://packages.debian.org/buster-backports/npm2deb https://packages.debian.org/buster-backports/npm2deb For restricted environments limited to things you can get from standard repos this is the only way to get NPM deps.
- ibc 6y agoYep, I know. However the effort required to make and maintain DEB/RPM packages for different architectures (mediasoup has a C++ component) is huge.
- goroutine 6y agoHow does mediasoup compare Pion project in terms advantages, performance and effort to build a simple conference app? Why I choose one over the other?