5 ms·
I was pretty unimpressed by Zoom as I used to think along the lines of "bro just open up a WebRTC connection. You can use socket.io it's super simple" Then...
by SeeDave 6y ago
I was pretty unimpressed by Zoom as I used to think along the lines of "bro just open up a WebRTC connection. You can use socket.io it's super simple"
Then... I attended a "Zoom Nightclub" and saw over 200 attendees streaming video to one another. All encryption, routed through China, etc. issues aside; I was very very impressed.
- dudus 6y agoI don't think zoom is p2p. It just routes through a media server. So the media server merges all streams and distributes it.
- noobermin 6y agoThat's their point. P2P doesn't scale to 100s of people. For even more than 10 you need a server. One service I've used forever is whereby.com (used to be appear.in) but even they acquiesced with their professional option for more than 4 people to ditching pure P2P using WebRTC.
- api 6y agoNaive P2P doesn't scale like that. You'd have to do something much more advanced like a tree based multicast algorithm. That's hard to get right. Seems like the engineering there is more expensive than just paying for a ton of bandwidth and doing a simple centralized aggregator. Of course there could also be a surveillance motive.
- phamilton 6y agoLatency is also a factor in a tree based algo.
- tgsovlerkhgsel 6y agoAlso a privacy issue. If your app reveals the IP of other users, it will lead to "interesting" effects like someone DoSing the home internet connection of a presenter whose stream they want to disrupt.
- api 6y agoThat's such a flaw in the Internet's architecture. IP was never designed for such a hostile environment.
- mycall 6y agoDoS could be handled by stateful multicast firewalls, yes?
- api 6y agoThat requires infrastructure changes, which is pretty much impossible as nobody has a vested interest and its herding cats. P2P means over existing networks. I forgot to write though: I am not convinced this is that big a problem in the real world, and there are other mitigations. One would be a "poor man's Tor," onion routing over just 1-2 hops. Since you are propagating and aggregating P2P anyway, its not going to be that expensive. Doesn't make DOS impossible but makes it tough enough to deter amateurs.
- zumachase 6y agoWe have experimented with a P2P multicast setup and WebRTC makes this very difficult to do. Ultimately what we’re rolling out soon, and what others like Zoom have done, is to send media over WebRTC data channels. The media channels are amazing if you’re building a demo project, but for anything serious the spec does not allow enough low level control. Also latency in P2P multicast starts to become a real problem.
- londons_explore 6y agoHow do you decode video from a data channel? Getting encoded video bytes from a buffer onto the screen while using hardware video decoding and without a multi-second lag I haven't been able to do in either safari or chrome - any tips?
- zumachase 6y agowasm ffmpeg -> canvas Granted, not tested on Safari
- londons_explore 6y agoCan you do 1080p60 video on mobile with wasm ffmpeg? I'd imagine it to have severe performance issues, since WASM is pretty bad for vector and bit twiddling operations heavily used in video codecs, and writing to a canvas on every frame requires the javascript (main) thread rather than being possible to do on the compositor thread (where videos normally decode and run) which means it'll end up janky if any other javascript runs at all. Even basic canvas animations on the main thread like the dinosaur game (chrome offline page) are pretty janky, and they aren't doing much per frame at all.
- paxys 6y agoZoom can supposedly handle up to 1000 people video calls.
- TACIXAT 6y agoYou could just use WebRTC with a selective forwarding unit.