Adventures in Video Conferencing Part 1: The Wild World of WebRTC
googleprojectzero.blogspot.com
googleprojectzero.blogspot.com
"Can you hear me?"
"I can't hear you."
"Let me change the microphone settings."
"Can you hear me now?"
*horrible audio feedback*
Every single time, even in 2018. Will WebRTC save us? No.Anyway, I don't really get what problem WebRTC solves, except for the non-problem of having to run specialized software on the clients. Instead it adds another set of broken mic settings...
We're building a virtual classroom solution and we now always force every user to go through a wizard which checks their audio and video, clearly marks when there is no sound being received and connects them to a support person to help them resolve their AV issues before they can join the meeting.
It's a little annoying for the person who wants to join, but the experience for the people already in the meeting/classroom is much better.
One interesting part is that, just like in a real classroom, by default everybody is unmuted. So you can have discussions with 80 students and one or multiple teachers. This makes stuff like echo cancellation, reducing the noise floor etc. a big part of the problem we attempt to solve.
Does anyone have suggestions for good learning paths for WebRTC?
quick summary of the acronyms... STUN/TURN/ICE are all related to NAT traversal (ie. when you are behind a router or firewall of some kind and your computer's IP is different from your public IP). The reason you need this is because UDP is not connection-based like TCP. So STUN is a service that helps your computer find its public IP. ICE is a protocol for finding and reporting peer candidates (after they've learned their public IPs via STUN) so they can establish a peer-to-peer connection. TURN is when you reflect the connection off a public server instead of establishing a peer-to-peer connection.
SDP is session description...basically information on what media formats and other things each client will accept.
RTP is how the media (or other data) packets are framed RTCP is out of band reporting for things like packet loss and other info so that each side can adjust media properties
The nice thing about WebRTC is it takes care most of this stuff for you. If you're always connecting to a server with a public IP you'll just need a few things:
1) WebRTC server that can accept media data (like janus or aiortc) 2) Some signalling mechanism, Websockets work well for this 3) you _may_ need a STUN server, google has stun servers available but you could also use coturn for this.
The rest you shouldn't need to worry as much about because webrtc handles it all under the hood
Turn just proxies all the data instead of being p2p. p2p has to overcome NAT, which is why ice and stun exists. If it can't be p2p it'll be turn.
"STUN servers live on the public internet and have one simple task: check the IP:port address of an incoming request (from an application running behind a NAT) and send that address back as a response. In other words, the application uses a STUN server to discover its IP:port from a public perspective." (1)
[1] https://www.html5rocks.com/en/tutorials/webrtc/infrastructur...
And it is annoying, but you can get the stab of it within a week or two. The most confusing thing is figuring out setRemoteDescription vs setLocalDescription - that took a bunch of playing around to finally get it to work.
All said and done, we were able to write a WebRTC adapter in less than 100LOC[1], and it is capable of doing inter-network signaling once peers have established connections. And the "signaling servers" that bootstrap non-WebRTC peers, those servers themselves can be decentralized as well.
If you don't want to deal with the fuss of it all, I highly recommend using EasyRTC, and/or studying their code to learn more:
If you are more interested in a plug and play solution I’ve heard good things about https://tokbox.com/
As for Toolbox, unfortunately there isn't any good competition in the market. Tokbox is "the best" (though I wouldn't say "great").
Their pricing model is better than most. It's not the cheapest, but it's worth the service quality. The low intro price seems deceiving, but I think it's pretty good because a lot of really basic, proof of concept apps can work on that range and not break the bank. You won't find anything much cheaper for the whole kit and caboodle.
I find it interesting that they don't mention Hangouts, given that they're, well, Google Project Zero…
Or maybe they just listed the ones they use. If I did the same, it would look _very_ similar.
By far, the best one is Zoom. It can easily handle with a really great quality 25 people on 1 page, in a conference with 80+ people. It also works smoothly for people in China (without VPN). Anyone has any know the magic behind their tech?
I don't work for Zoom, but do work in the WebRTC space and read an article about it recently.
like: https://github.com/kazuki/mediacodec.wasm
It could also be that they are using websockets to deliver MPEG-DASH/HLS segments for low latency.
are that kind of meetings really useful by videochat ? Even in real life it's a pain.
Like Twitch/Youtube Live, except with access control :)
(Aside from the obvious one that you shouldn't write protocol implementations in unsafe languages... WebRTC is too new to have a legacy excuse even)
Hangouts and Zoom second best.
Worst has been Skype and WhatsApp.
But Skype has been getting better the last months.