73 points · by ofrzeta · 6y ago · 66 comments
In my very humble opinion, I would suggest to reserve some address space in IPv6 for rtc, so that a peer is able to adopt a new special ip reserved for rtc. Nothing new under the sun, in 2014 someone comment along this line of thought (2) and (3).
So what are we waiting for?
(1) https://webrtcglossary.com/ (2) https://www.quora.com/Will-the-IPv6-result-in-the-death-of-S...
(3) 2014, AshleysBrain, https://news.ycombinator.com/item?id=7496986 I think the solution is IPv6. Once every device on the Internet is uniquely addressable again, we can do away with these NAT hacks and two endpoints should be able to reliably connect to each other again, no matter where they are. Of course, that's assuming we don't get more short-sighted engineering that breaks things again...
IPv6 will certainly REDUCE the need for STUN, but there are still (many) cases where you don't want to be "reachable by default", in which case you need a stable reference for negotiating routing and reachability (e.g. STUN).
It might not be obvious but I am not using WebRTC for video conferencing. My use case is basically regular live streaming but with latencies in the 100ms range.
Edit: I just compared the docs https://raw.githubusercontent.com/versatica/mediasoup/v3/art... vs https://doc-kurento.readthedocs.io/en/6.13.0/features/kurent... This is exactly what I need!
* How good is this compared to other alternatives? (Or why choose this instead of something else?)
* Where are the client apps for this, more importantly on mobile?
And it is very actively developed, which is arguably the most important metric in the current webRTC environment. Since the spec and browser implementations are a fast moving target right now and for the years to come.
Comparing Jitsi with mediasoup is like comparing Netflix (backend + apps) with Express.js + libcurl.
Jitsi developers may replace their RTC core internals (including the SFU) with mediasoup + mediasoup-client and you wouldn't even realize of it. Hope this helps.
And here's the source code for the demo: https://github.com/versatica/mediasoup-demo/
Libs for native apps: https://github.com/haiyangwu/mediasoup-client-android
Those libs for native apps are not official mediasoup components. We deliver libmediasoupclient[1] which is a native C++ implementation of the JS mediadiasoup-client[2] and uses libwebrtc[3] C++ native code directly.
Those two libs for native apps make use of libmediasoupclient, but they are not written nor maintained by us. Having said that, to the moment there is no official Android or IOS native client but there is libmediasoupclient which will be the core for both.
[1]: https://github.com/versatica/libmediasoupclient [2]: https://github.com/versatica/mediasoup-client [3]: http://webrtc.github.io/webrtc-org/native-code/
In general, i recommend it. Only media server that i saw working (slightly) better is Jitsi, but it is 10x more cumbersome and time-consuming to learn.
TL'DR': Pornhub uses mediasoup.
I've read many comments here asking about "how mediasoup is different than XXX" or about "mobile apps". I think the Overview in the website should be self explanatory, I'll just paste a fragment here:
https://mediasoup.org/documentation/overview/
--------------------- Design goals of mediasoup and its client side libraries:
- Be a SFU (Selective Forwarding Unit). - Support both WebRTC and plain RTP input and output. - Be a Node.js module in server side. - Be a tiny JavaScript and C++ libraries in client side. - Be minimalist: just handle the media layer. - Be signaling agnostic: do not mandate any signaling protocol. - Be super low level API. - Support all existing WebRTC endpoints. - Enable integration with well known multimedia libraries/tools.
Use cases:
- Group video chat applications. - One-to-many (or few-to-many) broadcasting applications in real-time. - RTP streaming.
Without considerable hacks (patent-encumbered unaccelerated wasm ffmpeg encoding of pixel data, rolling your own SRTP-like encrypted stream over datachannels and full mesh distribution of keys) this is not currently possible for anything other than a full mesh. Whenever an SFU (effectively a MITM) is involved (needed for more than a small number of participants) e2e encryption is lost.
If/when Insertable Streams are commonplace, this will be possible without so many hacks.
Edit: I see I was downvoted for correcting you, but there was an article on this very subject yesterday: https://webrtchacks.com/you-dont-have-end-to-end-encryption-...
jitsi has been production tested far longer i suppose, through its freely available videoconferencing service https://meet.jit.si/
Mediasoup has a c++ core with node api. Jitsi is java.
If you're experienced with webRTC, you will probably like mediasoup better. Otherwise I'd stick with jitsi.
Comparing Jitsi with mediasoup is like comparing Netflix (backend + apps) with Express.js + libcurl.
Jitsi developers may replace their RTC core internals (including the SFU) with mediasoup + mediasoup-client and you wouldn't even realize of it. Hope this helps.
https://mediasoup.org/documentation/v3/mediasoup/api/#WebRtc...
> TCP candidate so a TURN server isn't needed at all?
This is not true. A router may still block TCP traffic different than TLS or traffic that does not have destinatiuon port 80 or 443. So ICE TCP candidates do not avoid the need for a TURN server in certain cases.
It works fine on the same wifi network, but won't connect if one of the devices is using 4G network - is this because the TURN server is not setup? Is it easy to implement that?