WebRTC video quality requires some tweaking to get done properly. Lets see what levels we have in the form of bitrate, resolution and frame rate available to us.
Real time video is tough. WebRTC might make things a bit easier, but there are things you still need to take care of. Especially if what you’re aiming for is to squeeze every possible ounce of WebRTC video quality for your application to improve the user’s experience.
This time, I want to cover what levers we have at our disposal that affect video quality – and how to use them properly.Table of contents
Video plays a big role in communication these days. A video call/session/meeting is going to heavily rely on the video quality. Obviously…
But what is it then that affects the video quality? Lets try and group them into 3 main buckets: out of our control, service related and device related. This will enable us to focus on what we can control and where we should put our effort.Out of our control From my workshop on WebRTC innovation and differentiation
There are things that are out of our control. We have the ability to affect them, but only a bit and only up to a point. To look at the extreme, if the user is sitting in Antarctica, inside an elevator, in the basement level somewhere, with no Internet connection and no cellular reception – in all likelihood, even if he complains that calls aren’t get connected – there’s nothing anyone will be able to do about it besides suggesting he moves himself closer to the Wifi access point.
The main two things we can’t really control? Bandwidth and the transport protocol that will be used.
We can’t control the user’s device and its capabilities either, but most of the time, people tend to understand this.Bandwidth
Bandwidth is how much data can we send or receive over the network. The higher this value is, the better.
The thing is, we have little to no control over it:
None of this is in our control.
And while we can do minor things to improve this, such as positioning our servers as close as possible to the users, there’s not much else.
Our role with bandwidth is to as accurately as possible estimate it. WebRTC has mechanisms for bandwidth estimation. Why is this important? If we know how much bandwidth is available to us, we can try to make better use of it –
Over-estimating bandwidth means we might end up sending more than the network can handle, which in turn is going to cause congestion (=bad)
Under-estimating bandwidth means we will be sending out less data than we could have, which will end up reducing the media quality we could have provided to the users (=bad)Transport protocol
I’ve already voiced my opinion about using TCP for WebRTC media and why this isn’t a good idea.
The thing is, you don’t really control what gets selected. For the most part, this is how the distribution of your sessions is going to look like:From my Advanced WebRTC Architecture Course
Why is that? Just because networks are configured differently. And you have no control over it.
You can and should make sure the chart looks somewhat like this one. 90% of the sessions done over TURN/TCP should definitely raise a few red flags for you.
But once you reach a distribution similar to the above, or once you know how to explain what you’re seeing when it comes to the distribution of sessions, then there’s not much else for you to optimize.Service related
Service related are things that are within our control and are handled in our infrastructure usually.This is where differentiation based on how we decided to architect and deploy our backend will come into play.Bitrate
While bandwidth isn’t something we can control, bitrate is. Where bandwidth is the upper limit of what the network can send or receive, bitrate is what we actually send and receive over the network.
We can’t send more than what the bandwidth allows, and we might not always want to send the maximum bitrate that we can either.
Our role here is to pick the bitrate that is most suitable for our needs. What does that mean to me?
It is important to remember to understand that increasing bitrate doesn’t always increase quality. It can cause detrimental decreases in quality as well.
Here are a few examples:
There are a lot of other such cases as well.
So what do we do? I know, I am repeating myself, but this is critical –
Codecs affect media quality.
With video, this is a lot more nuanced. You have a selection of VP8, VP9, H.264, HEVC and AV1.
Here are a few things to consider when selecting a video codec for your WebRTC application:
Choosing a video codec for your service isn’t a simple task. If you don’t know what you’re doing, just stick with VP8 or H.264. Experimenting with codecs is a great time waster unless you know your way with them.Latency How you design your WebRTC infrastructure will affect the latency
While we don’t control where users are – we definitely control where our servers are located. Which means that we can place the servers closer to the users, which in turn can reduce the latency (among other things).
Here are some things to consider here:
Measure the latency of your sessions (through rtt). Try to reduce it for your users as much as possible. And assume this is an ongoing never-ending process
Here’s a session from Kranky Geek discussing latencies and media servers:Looking at scale and servers
There’s a lot to be said about the infrastructure side in WebRTC. I tried to place these insights in an ebook that is relevant today more than ever – Best practices in scaling WebRTC deploymentsDevice related
You don’t get to choose the device your users are going to use to join their meetings. But you do control how your application is going to behave on these devices.
There are several things to keep in mind here that are going to improve the media quality for your users if done right on their device.Available CPU
This should be your top priority. To understand how much CPU is being used on the user’s device and deciding when you’ve gone too far.
What happens when the device is “out of CPU”?
So what did we have here?
You end up with poor video quality and video freezes
The network gets more congested due to frequent requests for I-frames
Your device heats up and battery life suffers
Your role here is to monitor and make sure CPU use isn’t too high, and if it is, reduce it. Your best tool for reducing CPU use is by reducing the bitrates you’re either sending and/or receiving.
Sadly, monitoring the CPU directly is impossible in the browser itself and you’ll need to find out other means of figuring out the state of the CPU.Content type
With video, content and placement matter.
Let’s say you have 1,000kbps of “budget” to spend. That’s because the bandwidth estimator gives you that amount and you know/assume the CPU of both the sender and receiver(s) can handle that bitrate.
How do you spend that budget?
WebRTC makes its own decisions. These are based on the bitrate available. It will automatically decide to increase or reduce resolution and frame rate to accommodate for what it feels is the best quality. You can even pass hints on your content type – do you value motion over sharpness or vice versa.
There are things that WebRTC doesn’t know on its own through:
It is going to be your job to figure out these things and place/remove certain restrictions of what you want from your video.Optimizing large group calls
The bigger the meeting the more challenging and optimized your code will need to be in order to support it. WebRTC gives you a lot of powerful tools to scale a meeting, but it leaves a lot to you to figure out. This ebook will reveal these tools to you and enable you to increase your meeting sizes – Optimizing Group Video Calling in WebRTCThe 3-legged stool of WebRTC video quality
Video quality in WebRTC is like a 3-legged stool. With all things considered equal, you can tweak the bitrate, frame rate and resolution. At least that’s what you have at your disposal dynamically in real-time when you are in the middle of a session and need to make a decision.
Bitrate can be seen as the most important leg of the stool (more on that below).
The other two, frame rate and resolution are quite dependent on one another. A change in one will immediately force a change in the other if we wish to keep the image quality. Increasing or decreasing the bitrate can cause a change in both frame rate and resolution.Follow the bitrate
I see a lot of developers start tweaking frame rates or resolutions. While this is admirable and even reasonable at times, it is the wrong starting point.
What you should be doing is follow the bitrate in WebRTC. Start by figuring out and truly understanding how much bitrate you have in your budget. Then decide how to allocate that bitrate based on your constraints:
Always start with bitrate.
Then figure out the constraints you have on resolution and frame rate based on CPU, devices, screen resolution, content type, … and in general on the context of your session.
The rest (resolution and frame rate) should follow.
And in most cases, it will be preferable to “hint” WebRTC on the type of content you have and let WebRTC figure out what it should be doing. It is rather good at that, otherwise, what would be the point of using it in the first place?Making a choice between resolution and frame rate
Once we have the bitrate nailed down – should you go for a higher resolution or a higher frame rate?
Here are a few guidelines for you to use:
I’ve had my fair share of discussions lately with vendors who were working with WebRTC but didn’t have enough of an understanding of WebRTC. Often the results aren’t satisfactory, falling short with what is considered good media quality these days. All because of wrong assumptions or bad optimizations that backfired.
If you are planning to use WebRTC or even using WebRTC, then you should get to know it better. Understand how it works and make sure you’re using it properly. You can achieve that by enrolling in my WebRTC training courses for developers.Learn more about my WebRTC training
The post Tweaking WebRTC video quality: unpacking bitrate, resolution and frame rates appeared first on BlogGeek.me.
Introduction to capture handle - a new Chrome Origin Trial that lets a WebRTC screen sharing application communicate with the tab it is capturing. Examples use case discussed include detecting self-capture, improving the use of collaboration apps that are screen shared, and optimizing stream parameters of the captured content.
The post Identifying Shared Tabs using Capture Handle (Elad Alon) appeared first on webrtcHacks.
How to seperate multiple people in the same camera feed into their own unique video streams that can be individually transmitted Google's MediaPipe and the W3C's new MediaStreamTrack API
The post Making Zoom’s Smart Gallery on the Web with MediaPipe and BreakoutBox appeared first on webrtcHacks.
When using WebRTC you should always strive to send media over UDP instead of TCP. at least if you care about media quality
Every once in a while I bump into a person (or a company) that for some unknown reason made a decision to use TCP for its WebRTC sessions. By that I mean prioritizing TURN/TCP or ICE-TCP connections over everything else – many times even barring or ignoring the existence of UDP. The ensuing conversation is usually long and arduous – and not always productive I am afraid.
So I decided to write this article, to explain why for the most part, WebRTC over UDP is far superior to WebRTC over TCP.Table of contents
Since the dawn of time the internet, we had UDP and TCP as the underlying transport protocols that carry data across the network. While there are other transports, these are by far the most common ones.
And they are different from one another in every way.
UDP is the minimal must that a transport protocol can offer (you can get lower than that, but what would be the point?).
With UDP you get the ability to send data packets from one point to another over the network. There are no guarantees whatsoever:
No guarantees. Did I mention that part?
With TCP you get the ability to send a stream of data from one point to another over a “connection”. And it comes with everything:
That guaranteed delivery requires the concept of retransmissions – what gets lost along the way needs to be retransmitted. More on that fact later on.
We end up with two extremes of the same continuum. But we need to choose one or the other.TCP rules the web
Reading this page? You’re doin’ that over HTTPS.
HTTPS runs over a TLS connection (I know, there’s HTTP/3 but bear with me here).
And TLS is just TCP with security.
And if you are using a WebSocket instead, then that’s also TCP (or TLS if it is a secure WebSocket).
No escaping that fact, at least not until HTTP/3 becomes common place (which is slightly different than running on top of TCP, but that’s for another article).
Up until WebRTC came to our lives, everything you did inside a web browser was based on TCP in one way or another.UDP rules VoIP
VoIP or Voice over IP or Video over IP or Real Time Communications (RTC) or… well… WebRTC – that takes place over UDP.
Why? Because this whole thing around guaranteed delivery isn’t good for the health of something that needs to be real time.
Let’s assume a latency of 50 milliseconds in each direction over the network, which is rather good. This translates to a round trip time of 100 milliseconds.
If a packet is lost, then it will take us at least a 100 milliseconds until the one who sent that packet will know about that – anything lower than that won’t allow the receiver to complain. Usually, it will take a bit more than 100 milliseconds.
For VoIP, we are looking to lower the latency. Otherwise, the call will sound unnatural – people will overtalk each other (happens from time to time in long distance calls for example). Which means we can’t really wait for these retransmissions to take place.
Which is why VoIP, in general, and WebRTC in particular, chose to use UDP to send its media streams. The concept here is that waiting will cause a delay for the whole duration of the session reducing the experience altogether, while the need to deal with lost packets, trying to conceal that fact would cause minor issues for the most part.
With WebRTC, you want and PREFER to use UDP for media traffic over TCP or TLS.WebRTC ICE: Preferences and best effort
We don’t always get what we want. Which is why sometimes our sessions won’t open with WebRTC over UDP. Not because we don’t want them to. But because they can’t. Something is blocking that alternative from us.
That something is called a firewall. One with nasty rules that… well… don’t allow UDP traffic. The reasons for that are varied:
This means that you’ll be needing TCP or TLS to be able to connect your users on that WebRTC session.
But – and that’s a big BUT. You don’t always want to use TCP or TLS. Just when it is necessary. Which brings us to ICE.
ICE is a procedure that enables WebRTC to negotiate the best way to connect a session by conducting connectivity checks.
In broad strokes, we will be using this type of logic (or strive to do so):
The diagram above shows the type of preferences we’d have while negotiating a session with ICE.
UDP comes first.When is TCP (or TLS) good for WebRTC media?
The one and only reason to use TCP or TLS as your transport for WebRTC media is because UDP isn’t available.
There. Is. No. Other. Reason. Whatsoever.
And yes. It deserved a whole section of its own here so you don’t miss it.
TCP for me is a last resort for WebRTC. When all else failsWhen will TCP break as a media transport for WebRTC?
The moment you’ll have packet loss on the network, TCP will break. By breaking I don’t mean the connection will be lost, but the media quality you’ll experience will degrade a lot farther than what it would with UDP.
Packet loss due to congestion is going to be the worst. Why? Because it occurs due to a switch or router along the route of your data getting clogged and starting to throw packets it needs to handle.
Here are all the things that will go wrong at such a point:
Bottom line – TCP causes packet loss issues to worsen the situation a lot further than they are, with a lot less leeway on how to solve them than we have running on top of UDP.
The assumptions TCP makes over the data being sent are all wrong for real time communications requirements that we have in protocols like WebRTCTime to learn WebRTC
I’ve had my fair share of discussions lately with vendors who were working with WebRTC but didn’t have enough of an understanding of WebRTC. Often that ends up badly – with solutions that don’t work at all or seem to work until they hit the realities of real networks, real users and real devices.
I just completed a massive update to my Advanced WebRTC Architecture training course for developers. In this round, I also introduced a new lesson about bandwidth estimation in WebRTC.
Next week, we will start another round of office hours as part of the course, letting those taking this WebRTC training ask questions openly as well as join live lessons on top of all the recorded and written materials found in the course.
If you are planning to use WebRTC or even using WebRTC, there isn’t going to be any better timing to join than this week.Learn more about my WebRTC training
The post Why you should prefer UDP over TCP for your WebRTC sessions appeared first on BlogGeek.me.
It seems like CPaaS vendors have grown complacent compared to the rapid innovation coming from UCaaS vendors. This makes no sense.
CPaaS has been leading the innovation when it comes to how developers build communication products. This has been the case ever since CPaaS was coined. But now, the trend is changing. This is doubly true for WebRTC and video communication services. UCaaS vendors have taken the lead in innovation and setting the pace of the market, leaving CPaaS vendors behind.
Can this trend be reversed? Is this a bad omen for CPaaS vendors competing in video use cases?Table of contents
I used to work at RADVISION. The company specialized in video conferencing equipment but was split into two business units. The one I was a part of licensed VoIP software stacks to developers. You could say that what we did predates CPaaS. We didn’t have the cloud or server APIs but we sure did have SDKs.
In each and every townhall the company had, the CEO used to mention that our business unit was a precursor of the industry. Whatever requirements we’ve seen, whatever trend we experienced in sales (increase or decrease) was just an indicator of what is to come in the market in 3 years or so. The reasoning was simple – we licensed to developers, which then built their products and put them to market. Development cycles being as they were, 3 years was a good estimate.
Fast forward to today, and you have CPaaS vendors (the technology licensors of communication development tools) and the rest of the industry. And the large part of the rest of the industry is UCaaS.
The thing is, UCaaS vendors are no longer waiting for CPaaS vendors to innovate – they are just doing it on their own.The promise of CPaaS
Communication Platform as a Service. What is it for anyways?
The whole purpose of CPaaS is to reduce the time to market for developers. Make it easier to get things done with communications by developing all the nasty little details for you.
Call it low code. Call it SDK or API or whatever.
I did an interview with Jeff Lawson, CEO of Twilio years ago. There Jeff explains the essence of Twilio – why he started the company. And the reason is to solve the communication problem for companies so they can focus on building great customer experiences.
Remember this one. We will be back to this interview a wee bit later.Pandemic requirement shifts
Then the pandemic hit. And with it, a change in what communication requirements looked like around the world for all use cases.
4 distinct changes took place:#1 – meetings became larger
We had large meetings before. The difference was that we connected rooms with groups of people in each room. Now? Everyone’s joining from his own place.
A meeting with 20 people in 3 rooms became a meeting with 20 people from 20 rooms. We will be back in the office, but the requirement for bigger meetings, with more people joining remotely will still be there with us.
Look at the start of this session from last year’s Kranky Geek virtual event.
Here Li-Tal Mashiach, Senior Engineering Manager at Facebook in the Messenger team explains what they’ve seen as changes in the usage of video calls in Messenger. Look at around the 2:40 mark in that video.#2 – more meetings for longer periods of time
This one is obvious. Or is it?
Almost all vendors have seen a significant growth in both the number of video sessions conducted on their platforms as well the length of these sessions.
Scale had to be dealt with across these two axes.
You need to make sure you can carry conversations that now take hours on end instead of minutes:
In both cases, much of the interaction is just ambient video. They do things together or apart and just have these social interactions take place because they can’t meet. Funny enough, my son and his cousin aren’t stopping it now even though everything is open – that’s because meeting physically requires a 20 minute car ride…
How does that change the focus? How do you maintain servers, upgrade and update them when sessions can take hours on end on a machine? Does it mean the media servers also need to be stabler in how they operate?
And what about the number of sessions? Is it that easy to scale 10x or more your current traffic? This isn’t a simple question to contend with. Google shared their own challenges with scaling Meet which makes for a fascinating read. I had my share of vendors to help with best practices in scaling their WebRTC infrastructure during the last 15 months as well.#3 – more networks
Back to that Kranky Geek video by Facebook. They saw an increase in desktop access. More than they had expected being mobile first.
I’d argue that we’ve all seen more variety in devices and networks. My apartment went from 1 video calling user to 4 video calling users in a matter of a day. Billion people or more who never went on a video call have done so and will continue to do so at least some of the time.
What devices do these billion people have? What does their home network look like?
If you look at the technology adoption curve, these aren’t the innovators or early adopters. They aren’t even the early majority. They include both the late majority and the laggards.
This means we’re facing a lot more variance in devices and networks. In the need to deal with lower end capabilities and resources available. And to deal with having these large groups take place with a larger variety of the differences across devices.#4 – more places
The best part of video calling during the lockdowns and up until today is taking a peak at other people’s home office. You get to see a piece of who they really are outside “work”.
These places are almost always less than ideal.
Everything you can think of that affects the audio and video quality due to external sources will be there. And you can’t always ask the user to go purchase a better camera, change where he is sitting or replace his device.
It becomes a technical problem to solve many of these issues, especially when the service offers ad-hoc connectivity for its users.CPaaS during the pandemic
CPaaS were supposed to help vendors build their products. Look at future needs and cater for them. And for the most part they do. But somehow during this pandemic, it seems that many of them have failed to do so.
I’ll look at Twilio here – and not because they are the only vendor with these issues – but because they are the biggest CPaaS vendor and the precursor of the industry.
Last year after Twilio’s Signal 2020 event I wrote that I expected more of them:
For me this says that Twilio hasn’t invested in video as much in the last year or two. If they had, they would have announced something more thrilling and interesting. Maybe larger meetings, above 50 participants? Broadcasting capabilities? Noise suppression? Something…
Since I wrote that, 8 months have passed. Meeting sizes for Twilio Programmable Video are still limited to 50 participants. There are no broadcasting capabilities. No noise suppression. No background blurring. Nothing.
I can’t even recall any real additional feature that Twilio introduced for Twilio Programmable Video since that Signal event. Maybe updates and improvements to their React reference app, but nothing more.
Most other vendors showed similar inclination and introduction of new features throughout the pandemic. It seems like the trend now for video APIs is to focus on embedded iframes for faster development. These have been discussed and experimented with years ago, and now seem to be finding new traction and interest.
It takes more time to develop features in CPaaS than it does on other platforms. The reason for that is the CPaaS vendors need to do 2 things others don’t have to deal with:
But let’s face it. These new requirements have been around for 15 months now…
There are obviously a few caveats here:
I am griping here about video
CPaaS has grown during the pandemic, so this hasn’t hurt them. Yet
Video is usually a small percentage of traffic and income for a CPaaS vendorUCaaS during the pandemic
UCaaS shows a stark contrast to how CPaaS responded.
Many of the leading vendors have added background blurring and replacement, noise suppression and other features and capabilities. They have done so in breakneck speeds and they seem to be spewing out new features every week or so.
This isn’t limited to a single vendor. Out of the top of my head: Zoom, Microsoft Teams, WebEx, Google Meet and RingCentral all introduced these features in the past year. And all of them seem to be investing further into these areas while pushing forward other initiatives they have, each with its own focus.
Remember Jeff’s interview? I asked him if he believed UC vendors should develop their services on top of CPaaS. This is what he answered:
Yeah. I believe that companies whose primary business is communications can and definitely should and would get competitive advantage by using a platform like Twilio to build upon. The reason why is this. It used to be when those UC companies started, their core competency was making the phone ring. Then they’d add some software functionality on top of it, sure, but the vast majority of what they worried about was how do I make the phone ring? The problem is Twilio has democratized that ability.
The existing UCaaS vendors, they would be wise to build on top of the same platform that any developer in the world can come and start to compete with them on. If they don’t, those independent software developers, they can actually start and build companies that are really compelling competitors, because they don’t have to focus on the low level bits. They’re focused on the things customers really care about, which is features, functionality, and the user experience that matters.
While mostly true, this doesn’t hold water these days for video communications. Relying on CPaaS vendors means you need to figure out the feature set that is necessary to be a compelling competitor yourself – larger groups, background replacement, noise suppression, …
CPaaS vendors need to put their act together in the video domain, or start losing customers that will just go build this on their own. Especially when we see Zoom coming up with their Video SDK and becoming a direct competitor to CPaaS vendors.
UCaaS vendors are having their own headaches in the market due to the dramatic changes that Microsoft and Google are bringing into this domain. I’ll leave that for a future article.Pandemic valuations
The pandemic also changed the dynamics in communication vendor valuations, shifting the focus to slightly different domains.
Hopin and Clubhouse, which I already touched on in my previous article about the new era in WebRTC.
Agora (video CPaaS vendor) had a hugely successful IPO, followed by another spike due to the popularity of Clubhouse (who is using them). They are now back to roughly their initial IPO price point.
Twilio (CPaaS) increased in their valuation throughout the pandemic. My guess is that this is mostly due to the increased use in voice and SMS. Less so in video, where they invest a lot less.
Zoom. Need I say more?The differentiation dilemma & Build vs Buy
How does one differentiate then?
I am seeing the following trends in CPaaS adoption and use. They used to be related to pricing, but now they are becoming more and more related to feature sets and differentiation needs:
Most enterprises stick with the use of CPaaS vendors. They rely on them for their communication needs. They will switch from a CPaaS vendor to another CPaaS vendor if they can get better pricing or if their current vendor is lacking features (or provides poor support).
Technology vendors and startups will pick either CPaaS vendors as their starting point or prefer going it alone from the get go. Those that become hugely successful will end up actively working on replacing the CPaaS vendor with their own infrastructure. They will see that as an imperative a lot more than their enterprise brethrens.
Unified communication vendors will continue as they are. Assuming that communication infrastructure is core to their business and will work towards maintaining their own knowledge and experience in the area – doubly so after the pandemic.Wake up and smell the coffee
CPaaS vendors should wake up and smell the coffee.
The world has changed. Drastically.
There’s no going back to the old ways – even without quarantines.
I believe that there’s a competitive advantage waiting here. CPaaS vendors have been shying away from these requirements. The first ones to come out with actual solutions and feature capabilities that will ease the development of customers will win due to this differentiation.
The reason this hasn’t happened so far is that traditionally, such things weren’t catered for directly by CPaaS vendors – it is out of their comfort zone. This leads to an opportunity that is up for the taking.
On a similar note, after running successfully the Future of Communications workshop with Dean Bubley, we decided that it is both information packed and fun to do. If you are interested in a private session for your company – let us know.
The post FaceTime finally faces WebRTC – implementation deep dive appeared first on webrtcHacks.
After 10 years, we are at the dawn of a new era for WebRTC. This one is going to focus on differentiation and will bring with it new dominant players into the field.
There’s a change in the air. I think it started towards the end of 2019, but now it is quite obvious to see. WebRTC is changing – not the specification but rather who is using it and how it is used.Table of contents
There’s a slide I showed last week in the workshop of the future of video and real-time communications. It resonated with me with the latest news of Justin Uberti leaving Google. So much so, that I decided to record it separately and share it here as well:
We’ve moved from exploration to growth and now into differentiation when it comes to WebRTC.
What got us there exactly?WebRTC 1.0
We’ve got that WebRTC 1.0 milestone behind us now.
I haven’t written any special article about WebRTC 1.0, because the main question you need to ask yourself is what changed?
And the real answer is nothing.
The work towards WebRTC 1.0 was important and this is an important milestone. But browser vendors already implemented WebRTC. And vendors already used WebRTC in browsers and native applications as if this was a done deal already.
If you were using WebRTC before, then nothing has changed for you since the announcement of WebRTC 1.0.
And if you haven’t used WebRTC yet, then why start now? What was holding you back so long? The fact that you weren’t sure if it is here to stay???
Having WebRTC 1.0 out is an important milestone. More a symbol and a signpost than anything else.The pandemic The pandemic had a positive effect on WebRTC adoption
The pandemic got us all quarantined and changed everything.
There’s no new normal to talk about yet, but if you’re believing things are “going back to normal” then you’re wrong.
To put simply:
These changes are bringing with them a lot of new demand, new use cases and new requirements.
What we focused on with WebRTC up until 2020 was suitable for the “old” pre-pandemic world. What we need to focus on now is on the “new” post-pandemic world, one which has slightly different requirements.Zoom Is Zoom the exception to prove the rule?
Even before the pandemic, Zoom’s IPO has been phenomenal.
After the pandemic, Zoom has become a household name.
Pick any communication service you wish from any vendor in the globe. Randomly pick 100 people from the world’s population. How many of them will know that vendor or service, and how many of them will know Zoom?
Zoom doesn’t really use WebRTC, so why should you?
This is an important question. The appropriate answer is probably one of context. Your context is different from Zoom’s.
And yet the WebRTC industry, its stack, the browsers and vendors are consistently being compared to Zoom.
Your ability to compete with Zoom on quality and connectivity is greatly dependent on Google, and what they decide to do with WebRTC.
You are not in full control over your destiny.WebRTC musical chairs
There were a few changes in the people who are working and dealing with WebRTC directly recently. I want to discuss 3 specific cases that I think mark the end of an era.Dr Alex Gouaillard, CoSMo and Millicast
Alex has been a known figure in the WebRTC community. His voice on subjects, his passion and his work has made its mark on our industry. He will be sorely missed.
In recent years, Alex focused heavily in the area of live streaming, trying to solve the challenge of broadcasting a WebRTC stream to many participants. He has been a vocal proponent of the use of AV1.
It will be interesting to see who will pick the mantle here and fill the void in explaining and promoting these use cases now.Nils Ohlmeier, Mozilla (now 8×8)
Nils Ohlmeier has been “the guy” from Mozilla who represented WebRTC in Firefox.
He shared the work Mozilla is doing in Firefox for WebRTC in last year’s virtual Kranky Geek event as part of the browsers panel we did:
Nils switched employers this month, starting to work at 8×8 in the role of Principal Engineer. He will be contributing to the Jitsi codebase and its growth. While Jitsi has a large and vibrant ecosystem, is it anywhere near the size and complexity Mozilla had to deal with?
Who is going to take this role at Mozilla?
Is Firefox interesting as a browser for WebRTC developers and users anymore?
Was it time to move on now that the biggest challenges of WebRTC for browser vendors is “behind” us?
To me, these questions more than anything else mark the change in times.Justin Uberti, Google Stadia (now Clubhouse)
Justin Uberti was there from the start when it came to WebRTC.
He is considered by many the lead engineer behind the Google Chrome team of WebRTC, and he was part of the original duo (not only the app) – Serge Lachapelle & Justin Uberti.
Justin moved on from the WebRTC team to Google Stadia at the end of 2019. He worked on Stadia related features before that as well.
This month, he decided to move on, leaving Google altogether, pursuing new activities. Justin is staying in the WebRTC industry, as his new role is Head of Streaming Technology at Clubhouse.
Here’s what Justin had to say at Kranky Geek 2018 during Google’s WebRTC update session:
It is truer today than it was in 2018…
Definitely the end of an era.WebRTC “winners” of 2021
In 2017 I’ve written about 10 Massive Applications Using WebRTC.
That was 3.5 years ago and before anyone thought about quarantines or Zoom.
Fast forward to today, and that list is going to look different.
Two vendors I want to highlight here are Hopin and Clubhouse. They are different from the other vendors we’ve seen in the past who are making use of WebRTC.Hopin
Hopin is a virtual events platform founded in June 2019, a bit less than two years ago. They couldn’t ask for a better timing (maybe start 6 months earlier?).
Within that timespan, Hopin managed to raise a whopping $571.4M in total and made 4 acquisitions (including StreamYard, Streamable and Jamm).
There are many virtual events platforms ever since the pandemic started but Hopin seems to be the biggest and most widely known one. They have shown that they aren’t shy of acquiring the technologies they need in order to get their feature set where they want it to be.
In 2019, who would have thought a virtual events vendor would be worth $5.65B in valuation by 2021?
Hopin has a nice warchest that they can use to grow their business, attract top notch developers and acquire or acquihire their way to success.Clubhouse
Another interesting vendor is definitely Clubhouse.
Everyone wants to be Clubhouse these days, but there’s still only a single Clubhouse out there.
Clubhouse started life with the pandemic, in March 2020. After only 14 months it has a valuation of $4B and has been funded well over $100M ($110M by series B in January this year, and another undisclosed series C in April). That’s quite a feat for a voice only, iOS only (until recently) service.
It has a warchest to rival that of Hopin and the same kind of hype behind it to allow it to do practically anything it wanted.
Clubhouse still lacks a real business case, but it doesn’t seem to be stopping it.
Clubhouse is known to be using Agora as their CPaaS vendor, but that may soon change. They hired Justin Uberti from Google, and the only reason for that to me seems to be the desire to own and control their infrastructure.Google
Google is still the big winner of WebRTC.
If you look at what features are added to WebRTC, then the answer to that is whatever Google needs for its own uses.
These uses now include Google Meet, Google Stadia and Google Assistant.
If your use case has the same requirements in general then you’re in good shape. If you are going “off the reservation”, then prepare for a life of misery if there’s something missing that you need and isn’t in Google’s own set of requirements.
WebRTC is open source up to a point. Not because the code isn’t open and available to all, but because the main implementation is owned and controlled by Google and the main browser you’ll need to work with is Chrome.Welcome to the new WebRTC
From now on, WebRTC is going to be different.
Talking heads are still an important part of it, but the focus is shifting from a “video chat” or “video conferencing” service into a communication service that is unique. What that is exactly is hard to say, but suffice to say that WebRTC is there in the background.
And fading to the background is exactly what we wanted from WebRTC – the technology is only great once we start forgetting it is there.
The post WebRTC: The end of an era (and the dawn of a new one) appeared first on BlogGeek.me.
How to use the AWS API Gateway WebSocket API functionality with Lamdba functions to implement a serverless WebRTC signaling architecture
The post How to Leverage the AWS WebSocket API for Serverless WebRTC signaling appeared first on webrtcHacks.
Rethink the way we look at interoperability and standardization in communications, now that we live in a WebRTC & Zoom world.
We live in a different world. This video popped up in my Facebook as something I shared a year ago:
It is in Hebrew, but there are enough words in English there to make it quite apparent. This comedian is trying to explain to his mother over the phone how to use Zoom.
Today? Everyone knows how to use Zoom. Or WebRTC.The transformation of communication technology
I started my professional adult life in a video conferencing company. There, I lived and breathed interoperability and standards for the better part of 13 years. I have a few contributions that got approved at the ITU and 3GPP. I’ve been to interoperability events and even hosted two of those in Israel.
At the time, the mindset was a telephony one:
There were two main reasons why we wanted such a world to live in:
Then Apple came with the iPhone and changed. Everything.
From embedded platforms, the smartphones became open programming platforms (open even within the closed gardens of their app stores).
Today, many of the embedded devices include an Android operating system, making it ever easier to develop software for them.
This brought with it a new kind of openness:
This didn’t mean standards were unimportant. It meant that interoperability became less interesting. Vendors could now bake their own proprietary additions on top of the standards that give extra features without the need to think too much about interoperability with other vendors – that’s because your client now brings his own device (BYOD) and you supply the software application to connect to the infrastructure.
Oh, and by the way – that infrastructure? It is now built in the cloud. And the cloud enables rapid development and hyper growth. Which again means that caring about interoperability becomes less of an issue between the client device and the cloud infrastructure – vendors are more interested in interoperability between their infrastructure components or with external service providers – via gateways.
This turned communications from a service into just another application on our phones.A new way to look at communication standards: WebRTC WebRTC brought communications to the browser, making it into a feature
WebRTC came to our world about 10 years ago and changed the paradigm again.
Where the smartphone and the cloud reduced our dependency and need for interoperability, WebRTC reduced our dependency and need for standardization.
We still need standardization – after all, WebRTC is a standard.
But the standardization we care about is mostly the browser implementations versus the specification (and interoperability between browsers). Other than that? We couldn’t care less.
If we need standardization and interoperability, we let gateways do it. As we did in the era of the smartphone.
WebRTC also made communications more accessible. Web developers could now use it, and you could easily embed and stitch it right into your application as a seamless part of your business process flow.
This turned communications from a service or an application into a feature in another service or application.Zoom and the pandemic The pandemic made video communication commonplace, enabling Zoom to turn it into a platform
Then the pandemic came and made a world a lot smaller. It made sure we all know how to use video communications.
Zoom became a household name across the globe and turned into a noun.
Zoom is proprietary. It doesn’t even use WebRTC.
No standards. Which lead to a lot of security missteps.
But it worked. And now Zoom has a Client SDK a Video SDK and Zoom Apps. With the intent of making their infrastructure and technology integratable with anything and everything.
This is an attempt to turn communications from a service or an application or a feature into… a platform.Workshop: The Future of Video & Realtime Communications
A few weeks ago, I had a conversation with Dean Bubley. We wanted to do something together, and decided to create a joint workshop.
The question of the role of standardization and interoperability is one of those we are going to tackle in the upcoming workshop.
If you are interested in joining the workshop, register below. There’s an early bird discount that is available only until the end of this month.REGISTER TO THE WORKSHOP
The post Interoperability and standardization in a world dominated by WebRTC & Zoom appeared first on BlogGeek.me.
There are new audio codecs in town: Google Lyra and Microsoft Satin. Both banking on AI-based voice coding, and both will be fighting for inclusion in WebRTC.
Right on the heels of the changes we see in video codecs in WebRTC, with AV1 coming into the stage, and HEVC making an entrance in Apple devices, we now have a similar (?) story with voice codecs. Microsoft announced its AI-powered voice codec Satin in February. A week later, Google reciprocated in kind, announcing its low bitrate codec for speech compression Lyra.
Why now? What are the similarities and differences between these codecs? Where are they headed? And what does that mean to WebRTC and to you?Table of contents
It makes sense to start this by explaining a bit about audio codecs in WebRTC.
For all intent and purposes G.711 is there as a legacy codec, to deal with narrowband audio. The result of which is low quality, unresilient audio. Using G.711 is mostly reserved to connect it with the telephony networks, and even there, I wouldn’t recommend it as a solution.
Opus is the main voice codec in WebRTC. It offers a highly flexible solution capable of handling anything from narrowband to fullband stereo and at low bitrates. You can read more in this article I’ve written years ago: The Rise of Opus to HD Voice Domination.
Opus is almost 10 years old. It has been created by meshing two separate codecs: SILK (for speech) and CELT (for music). The pandemic of 2020, and the increased reliance on virtual meetings has started to show its age and its limitations. Opus is a great codec, but these days, we can probably do better.How Opus works, from my Advanced WebRTC Architecture Course The two extremes in audio codecs: Low bitrate vs lossless
So what are the missing pieces? The things that Opus can’t get done on its own? There are two such areas that are actively being explored, and they are two extremes: highest possible audio quality and lowest possible bitrate.Highest possible quality: Lossless audio coding
One extreme (unrelated to Lyra and Satin), is the strive for the highest possible audio quality. Getting there requires the use of lossless audio coding.
For all intent and purpose, what we do in VoIP today, and by extension in WebRTC, is use lossy coding. This means that we compress the audio and video in ways that don’t really allow us to reconstruct the original audio or video accurately, but instead it gets us “close enough” to there. It does that by trying to “get rid” only of information that we humans can’t discern – things the human eye and human ear would miss anyways.
As a crude example, I never did hear the difference between vinyl, cassettes and CDs – at least not enough for it to matter for me. On the other hand, I had a friend who complained that CDs don’t have the audio quality of vinyl records.
The most known lossless audio codec is FLAC. It has nothing to do with WebRTC. Yet.Lowest possible bitrate: AI based compression
In the other end of this spectrum lies the lowest possible bitrate we can comfortably reach.
It turns out that Opus is good, but not great.
At a time where bandwidths are increasing, why do we even discuss getting voice codecs into lower and lower bitrates? What would be the incentive?
These questions are doubly important considering the fact that we’re heading towards a remote video filled world. And we know that video takes up considerably more bitrate than voice, so why care so much about voice bitrates?
One reason is simply the fact that we’re now communicating remotely a lot more. We do that more, and there are also a lot more people communicating online. From everywhere. This means that not all of them are going to be on great networks at all times, and even when they are, others are going to strain these networks with their own traffic. Google calls this “the next billion” – the next billion people joining the internet, which means people with less means and by extension less bandwidth.
The other reason is the fact that we’re growing bigger. More sessions. Bigger sessions. Widely spread. If we can even reduce a fraction of the bitrate, that would reduce the strain on our networks, servers and costs of running services.
I am also guessing that the big video meeting vendors got to learn a few interesting things during the pandemic. One of them is that voice is the most important part of a video call. If you don’t deliver your voice properly, video won’t matter. And for that, you need to make it leaner and meaner than it is today.
How do you make voice compression for an audio codec better?AI and audio codec generations
I’ll be using machine learning (ML) and artificial intelligence (AI) interchangeably here. These terms have been butchered by marketers so much, that they are now indistinguishable anyway.
Better in the case of audio codecs is going to be a new generation of codecs. In a way, a migration from the old way of doing things (rule engines and heuristics) to our brave new world of machine learning and artificial intelligence.
Machine learning is where the future lies when it comes to most of our algorithms. Especially with the ones that make extensive use today of either rule engines or heuristics – both of which are found in abundance in real time media processing pipelines (=WebRTC). We started seeing this trend seeping into real time communications and WebRTC somewhere in 2018. After the initial hype, we found out the many challenges of adding machine learning. In 2020, it seemed like the path became somewhat clearer: noise suppression and background replacement solutions assisted with AI. For the rest? We understood collectively that we should first squeeze the lemon of optimization before resorting to AI.
It is now time to look at AI in media compression as well. We’ve seen this take place already in baby steps. At Kranky Geek 2019, Shawn Zhong of Agora, explained how AI can be used to improve encoding efficiency:
A year later, NVIDIA introduced Maxine, a platform capable of using AI to “reconstruct” a person. Effectively creating a kind of a compression algorithm.
Research around AI compression is flourishing. There is already an AI specific standards organization called MPAI (Moving Picture, Audio and Data Coding by Artificial Intelligence) – still small, but this may change in the future. And then there’s Mozilla’s Common Voice, an open source, high quality, labeled multi-language dataset for training language related models.
It makes sense then, that audio would be a prime target for AI based compression as well. Here, Microsoft took the first public shot, and Google immediately followed suit.The Opus spec
To understand where Microsoft Satin and Google Lyra are headed, let’s first review how Opus works:
Now let’s look at what we know so far about the two new audio codecs.Microsoft Satin
Microsoft Satin is being positioned as an AI-powered audio codec to replace Silk.
Silk is used by Skype and was adopted as the basis for Opus as well. Here’s what Satin can do based on Microsoft’s announcement:
Satin wasn’t presented as a work in progress, but rather as a battle tested codec – Microsoft stated it is already being used by Microsoft Teams and Skype in 2-way calls. Obviously, with plans to extend it to group calls.
Satin is a brand new codec that is being designed to replace Opus altogether.Google Lyra
Google’s announcement of Lyra came a week after Microsoft’s. In a way, it seemed a bit rushed.
Why rushed? Because of how the announcement is written. It reads similar enough to the Microsoft one but lacks the “currently deployed” paragraph. Instead it has a “currently rolling out” paragraph.
What is Lyra about? Based on Google’s announcement:
Lyra is intended for SPEECH and not for AUDIO. It isn’t a replacement of Opus in any way.
Interestingly, Google believes that coupled with AV1, it can offer decent video conferencing experience at dial-in modem bitrates of 56kbps.
Lyra is being rolled out to Google Duo for very low bandwidth connections scenarios. But that’s about it for the time being.
More recently, Lyra has been open sourced by Google. The reasons for this are varied, especially considering that many of the recent advancements of Google in AI around real time communications weren’t open sourced at all:
Another thing you can achieve with Lyra is better redundancy for improved resiliency. With its very low bitrate, it is less of a constraint to add redundancy on top of it. You can check out this article on webrtcHacks by Philipp about audio redundancy encoding.A multi-codec audio future for WebRTC?
At the moment, both Lyra and Satin are nice bedtime stories. You can use them only inside the proprietary implementations of Google and Microsoft. And even then, in most cases you wouldn’t even know that to be the case.
Why was it important then to announce these efforts?
My hunch is that it has to do with standardization and WebRTC.
WebRTC needs some love and attention now in the audio front. For video, we’re going to have AV1, but what do we do about voice?
There are currently two alternatives out there that will make their move soon enough:
It is too early to say how this will play out. My bet is on more optional audio codecs finding their way into WebRTC – not the boring old ones, but rather the hip new ones. This will make audio codec selection for developers building services a wee bit harder, which isn’t a good thing in the long run. I’d rather see this pushed into Opus – or added as a single codec replacement to Opus. Something that would be easy to pick instead of Opus.FAQ on Satin and Lyra ✅ Is Google Lyra equivalent to Microsoft Satin?
While both of these audio codecs operate at low bitrates and are powered by AI they are very different. Lyra is focused on narrowband only while Satin is about operating in super wideband.
Technically – yes.
Microsoft is already using Satin instead of Opus in Microsoft Teams and Skype for 1:1 calls. IT was designed with that goal in mind.
Lyra was designed to work at low bitrates where Opus doesn’t do a good job today. When there’s enough bitrate, Opus offers better audio quality than Lyra.
There are no public plans to add either of these codecs to the WebRTC specification or to browser implementations.
The post Lyra, Satin and the future of voice codecs in WebRTC appeared first on BlogGeek.me.
Pion seemingly came out of nowhere to become one of the biggest and most active WebRTC communities. Pion is a Go-based set of WebRTC projects. Golang is an interesting language, but it is not among the most popular programming languages out there, so what is so special about Pion? Why are there so many developers […]
The post How Go-based Pion attracted WebRTC Mass – Q&A with Sean Dubois appeared first on webrtcHacks.
Picking the right video codec for a WebRTC application is tricky. Should you use VP8? H.264? VP9? Go with AV1? What about HEVC?Table of contents
WebRTC was once easy. You had VP8, Opus and G.711. G.711 is striked through because I don’t want you to use it. There’s really no reason to. Later on, H.264 was added as a mandatory to implement video codec. And all was well in the world of WebRTC.
Google then decided to introduce VP9 in Chrome. As an optional codec. Mozilla added VP9 to Firefox as well. Microsoft? They got it for “free” when they switched Edge to Chromium. And Apple… well… Apple. VP9 should be in their Technology Preview for Safari, but mainly because of Google Standia which uses VP9 – surprising as this may sound.
Oh, and Apple decided to add HEVC as an optional codec of their own to WebRTC – just for good measures. And to confuse us all even further.
The diagram below is taken from my recent workshop on trends in WebRTC for 2021. It shows the current state of video codec support in web browsers.
To sum things up:
Last week, I sat down with Philipp Hancke for our WebRTC Fiddle of the Month. In this month’s fiddle, Philipp suggested we look at video codec performance, so he wrote a… fiddle.
You can watch the whole fiddle here: measuring video codecs performance
The results were quite interesting and sometimes surprising. What’s nice here is that you don’t need to take our word for it – you can take the code and use it yourself. Also make sure to use it in the scenario you have and not the simple one we’ve shared, as your mileage may vary.VP8 or H.264 for your WebRTC application?
Today? You’re probably using VP8 or H.264 – or should use VP8 or H.264.
Is there any real difference between the two? No. Not really. They produce similar video quality for a given bitrate.
That said, there are some nuances between them:
Our own quick tests suggest that the H.264 decoder is better than the VP8 one – with or without hardware acceleration on H.264. Definitely something to think about.
Which one should you use? Throw a dice… 🎲 or two 🎲🎲VP8/H.264 or VP9 in WebRTC?
Here’s a real question. Should you go for VP9? Last year I suggested it might be time to use VP9. Little has changed – no real adoption that I can see to it.
Except from Google, no one uses it.
In our tests, it was close to VP8 in its CPU use. That was quite surprising. It is probably why Google is using it in Google Meet.
The challenge? Apple. Doesn’t really have it yet. Should be getting there. Question is when.When to use HEVC in WebRTC?
This one is simple enough to answer – never.
That said, if you have calls that take place only between Apple devices, then HEVC might be a good option.Is the time right for AV1?
No. Maybe. Yes.
From our own testing, AV1 is considerably worse than all other codecs when it comes to performance. It takes twice or more of the CPU it takes to encode and decode any of the other video codecs we tried.
AV1 should offer better quality than the other codecs, so you may actually want to pay that extra CPU. As far as I can say, there are two reasons for using AV1 today:
WebRTC started without many options. VP8 and H.264. That’s about it. Now? We’ve got 4-5 video codecs to choose from.
Most of us end up using VP8 just because. Some pick H.264, mainly because of performance considerations. The rest are mostly talked about but almost never used.
The newer video codecs are really promising – VP9, AV1 and even HEVC have real potential in a WebRTC application. The challenge though as that they come with some big challenges – mainly CPU and availability across browsers.
To use them, a new approach is needed. One where more than a single video codec is used by an application, at times within the exact same session.
Here are a few suggestions for you to explore:
Is it worth it? Maybe. You tell me if enhancing video quality in your application is important. Venturing into the multi video codec realm in WebRTC is about the 80% effort that yields the last 20% improvements. Go there once you’ve finished pursuing all other simpler optimizations.WebRTC trends in 2021
Last month I hosted a workshop about WebRTC trends in 2021.
I covered optimizations of a single video call, voice suppression, background blurring, E2EE and video coding aspects. The challenge of which video codec to choose was there as well.
The sessions have been recorded and are now available as an online course on my website. If you are interested, you can register for it.
The post 🎲 Which video codec to use in your WebRTC application? 🎲 appeared first on BlogGeek.me.
2021 is set out to be the year of technical debt and quality optimizations. Check out these WebRTC trends to keep up to speed with communication technologies.
Last year was a very interesting and weird year. The vibe of 2020 was dictated by the pandemic and the quarantines around the globe. For those in the communication space, this meant a huge acceleration in demand, scale and the scope of work you had in front of you.Table of contents
When I started last year, I talked about the expectations of WebRTC. I tried explaining the concept that WebRTC, more than anything else, is driven by Google and controlled by Google. It was a kind of a follow up to my article on the artificial intelligence roadmap of Google for its “WebRTC Pro” implementation.
Since then, Google introduced noise suppression, background blur and other AI trinkets in Google Meet. All AI features. All were delivered outside of WebRTC but tightly coupled with the WebRTC implementation in Chrome.
What changed since then is the focus. It is great talking about bots and drones. AR, MR and XR. 360 videos, 4K and 8K resolutions. But it gets us nowhere.
We came back to the basics and the basics have changed along with the pandemic.
As developers, we need to follow the trends. Be where our users need us and fill out their requirements. This is also true of WebRTC, and being owned by Google, it means we know where it is (roughly) headed.Google and WebRTC in 2021
While Google uses WebRTC in multiple services, there are only 2 that matter for WebRTC trends in 2021: Google Meet and Stadia.Google Meet
In the latest Gartner magic quadrant for meeting solutions (September 2020), here’s who you find:Google doesn’t make it into a leaders position in meeting solutions
The leaders? Zoom, Cisco and Microsoft. Google is far behind.
2020 being the year of video meetings, and with Google investing in WebRTC and Meet, this has to hurt.
Google invested heavily in 2020 in and around WebRTC.
You could place their investments in two main areas:
That trickle-back is important. The 3 leaders in meetings?
Stadia is Google’s cloud gaming platform.
It is still early days for both Stadia and cloud gaming, but a few interesting things have happened in this industry:
For now, Google seems committed to Stadia. Both Chrome and recently Safari added support to VP9 profile 2. This means a higher color depth than what is common for video conferencing, which is better suited for high end gamers.
Just like Meet, whatever Stadia will need from WebRTC will find its way into WebRTC.WebRTC Trends in 2021
The trends affecting WebRTC in 2021 are based on two main aspects then:
What comes from developers these days is the expansion of remote-everything. There are many domains that aren’t getting heard enough, simply because they are new to the scene. What I think is most interesting is that the mainstream video communications space is still the one setting the agenda for WebRTC.
The 4 biggest trends for WebRTC in 2021 are driven by video communications. Here they are:Trend #1 – Bigger WebRTC meeting sizes
Our first trend of 2021 for WebRTC? Meeting sizes. Something we’ve started focusing on only last year.
We used to want higher resolutions. At any given point in time, there was a company pushing the envelope in the resolution for video conferencing. Since we got to HD, that trend stopped. Vendors still tried marketing and selling 4K as a value proposition for video conferencing, but this hasn’t stuck. The high end of the market vanished, leaving us with a new number to focus on. The number of people in a “gallery view”.
With Zoom doing 49, this seems to have become the magic number everyone is aiming towards.
WebRTC was great for smaller meeting sizes, but going beyond 16 video streams in a single session was always challenging. I like using this slide to explain it:The bigger the meeting size in WebRTC, the higher the complexity of the solution
The growing complexity comes with the need to employ ever greater techniques and tricks for optimization. Scaling from 2 users to 10 requires a different approach than scaling towards 50 or 100 users. Aiming for 1,000 users in a meeting needs a slightly different architecture. Going for 20,000 or more necessitates again other tools.
There are now two distinct areas that require large scale WebRTC meeting sizes:
“Traditional” meetings – we had large meetings of 20 or more people, but the people simply convened in 3-4 meeting rooms and connected these meeting rooms. Now each person is a device in the meeting.
Large conferences – we are now trying to copy the real world activity of industry conferences along with entertainment activities (comedians, talk shows, magicians, sporting events, …) and turn them into virtual events. Large online conferences.
These two are different in nature and in the techniques and technical solutions for them.
Google is focused on the “traditional” meetings with their work on Google Meet, which means the optimizations done inside WebRTC’s code as well as enabled on top of it are built to fit this class of problems. The large conferences have a bigger challenge to deal with and less “direct” support from Google and WebRTC.Trend #2 – De-noising: Background replacement and noise suppression in WebRTC
The second WebRTC trend for 2021 is a bit more surprising. I don’t think we would have cared about it much without the pandemic.
Need better media quality? Buy a better camera.
That’s what I did at the beginning of the quarantine. I had to quadruple the number of machines at home with quality peripherals. Instead of only me in meetings we’re now 4 people in meetings, each needing his own different environment. That was obvious to me. Still challenging to do but obvious. We’re also lucky to be able to cater for the four of us in our apartment having a place for each to handle his needs without too much noise seeping out to the others.
Homes with more people? Smaller apartments? How would they handle it?
When we were all in offices things were simpler. The office space was designed (or then redesigned) to meet the needs of video calling. An IT person took care of the space. Someone purchased and installed equipment that fits the needs.
As we’ve all entered a pandemic with quarantine all that careful planning and preparation was thrown out the window. People had to use whatever they had and make do with it. And what did we find out? That there’s background noise and a user’s privacy we need to deal with.
That child from 2017 who barged into his father’s interview and was live on TV? That’s all of us now. It has become an accepted norm. People working from home. They have a personal life with family and kids, and kids are part of the scenery.
Same for the laundry or other artifacts that now reside behind a person speaking in a video call. How do you make all that go away? How do you reduce the noise of the neighbors running on top of your head while you write these words on a keyboard (literally)?
A rather old/new requirement is to be able to get rid of all of that. Background blurring and replacement. Noise suppression and noise cancellation. All things that were nice to have are becoming common requirements in meeting solutions.
They aren’t part of what comes with WebRTC, but somehow, you need to make them happen with WebRTC.Trend #3 – A focus on WebRTC user privacy
Zoom and security issues anyone?
I am not here to gloat. Zoom did a bad job at security and privacy before 2020. It did a great job of fixing these issues in record time during 2020.
The issues around Zoom were both about security and privacy. Privacy of the users from other users and hackers, but also from Zoom itself.
This focus on user privacy found its way to WebRTC as well and for the same reason. Zoom is now how every communication company measures itself by, for better or worse.
There are many things to deal with when it comes to WebRTC security and the latest advancement there is E2EE enablement in media servers. The ability to offer end-to-end encryption in a group video call. It is now possible due to the introduction of Insertable Streams to WebRTC.
How is that used? What would it require of you to implement? How would that affect other requirements and features in your service? We are going to find that out during 2021 as more vendors will roll out E2EE solutions with WebRTC.Trend #4 – WebRTC Investments in VP9 and AV1
Video codec technologies come in stages. The industry at large has started adopting HEVC, with Apple leading the charge. VP9 has been slow to catch up. And we’re already in the next round of codecs with AV1 being hammered as the next big thing and something called VVC breathing down its neck.
WebRTC has been predominantly a VP8 phenomena, with a trickle of H.264. Here’s my estimate on video codecs use in WebRTC:Hint: look at area differences and not height in this graph
What is happening now is companies who are looking at VP9 and AV1 trying to make use of them for different use cases and scenarios.
Cisco just announced using AV1 in screen sharing for WebEx in native PC application when that is made possible.
We will see more of that in 2021. Companies experimenting, using and launching products that use more VP9 and even AV1.An increase in use cases and markets
WebRTC is breaking out to additional markets. Large events, live streaming and even cloud video editing.
All these necessitate new features and capabilities to be added to WebRTC itself.
Now that WebRTC 1.0 is finally being finalized there is going to be a growing focus by the W3C on what comes next. If you have requirements that require a change in WebRTC, it might make sense for you to join the W3C and make your voice heard in affecting where WebRTC is headed next. Ping me if you’d like to discuss this.Upcoming WebRTC Trends worksop
Next month I’ll be conducting a workshop that covers these topics. The trends and what to do with them. It will offer actionable advice on what you should do in 2021 and it will be interactive in nature.
My last workshop about differentiation in WebRTC was well attended. Here is what Andrey Abramov of Doxy.me had to say about it:
Thank you very much for the 3 weeks workshop on which you dove us into the WebRTC. It was really interesting and useful. I have learned a lot and look like now I have a better vision of what to do to improve UX of our calls on Doxy.me. Thanks for the records as well! I will be reviewing them from time to time to recall.
It was great! Thank you!
This new workshop, WebRTC trends for 2021, will take place during February, in 3 consecutive sessions of 2 hours each.
Space is limited, so if you are interested, register sooner rather than later.
See you at the workshop.Register to WebRTC trends for 2021 workshop
Interview with WebRTC standards co-chair and author, Bernard Aboba. We cover the current status of WebRTC and where it is headed including WebRTC-NV, Simulcast, SVC, AV1, WebTransport, WebCodecs, ML and more.
The post WebRTC Today & Tomorrow: Interview with W3C WebRTC Chair Bernard Aboba appeared first on webrtcHacks.
Before jumping on the ML/AI bandwagon of WebRTC media quality, make sure you’ve exhausted all of your other optimization alternatives.
TL;DR – make sure you optimize for media quality without AI before jumping to using AI…
In 2018 and 2019 at Kranky Geek we’ve started looking at machine learning. We’ve handpicked speakers and sessions who deal with these topics. We’ve done so for both voice and video technologies. The intent and idea behind this was to fit to the times. Everyone’s been doing AI so why not us in the context and domain of WebRTC and communication technologies?
It made perfect sense.
Then came 2020 and… changed everything. No one was really interested in AI or how to improve quality of experience with it. It was now used mainly for bots with the purpose of handling large loads of calls (call deflection and agent assist type technologies).
At times, it seemed like we were all back to basics. We now had to start scratching our heads and see what can be done to improve quality.Time for some quick wins
At Google and elsewhere, I am sure that a manager somewhere higher up came, saw the work that is being done, received an explanation how research into this machine learning stuff was progressing and showing promise, but in many ways required, well, more research, before it could be seen as anything that is close to being production ready.
And as managers do in these situations, they smack the table and say something like “I want quick wins”. So the developers went back to the basics. Trying to figure out what quick wins they can find to squeeze a bit more quality of that thing they had called WebRTC.
Quite surprisingly – it worked!
There seems to be ample room for optimizations. If you ask me? Someone forgot to try and squeeze this lemon properly.There’s more room for optimizations of WebRTC before we resort to machine learning Google’s optimizations of WebRTC’s code
It started somewhere with the pandemic.
One of the first indications was this tweet by Serge Lachapelle (former product manager for WebRTC at Google and leading Google Meet at the time of tweeting).April 17, 2020
Apparently, the video compositor wasn’t making the most out of the hardware it was using…
Since then we’ve seen some additional optimizations, though most of them taking place in the application level on top of the WebRTC implementation itself.
At Kranky Geek, Google discussed at length the optimization work it is working on. Mostly, making sure that video processing doesn’t take up too much CPU.Too many media format conversions in the WebRTC media pipeline
Apparently, Chrome is doing way too many video format conversions between getting the frames from the camera until it encodes and sends it out. Each conversion eats up CPU and I/O, generally killing the whole internal bus of the machine. Oh – and it means memory copies. Lots and lots of memory copies.
Video processing 101: zero copy is what you’re striving for.
We’re 10 years into WebRTC and the leading team behind WebRTC is just now starting to look at zero copying.
There are other areas and aspects where optimizations are taking place. Once the Kranky Geek videos will be ready and published, I’ll add the relevant one here.
Still got optimization juice in this lemon. Expect better performing WebRTC in the coming Chrome releases.Rushing towards 49-gallery view and 50+ group sizes
As the pandemic hit, Zoom grew. The media was filled with their gallery view.Zoom’s 49-gallery view. The holy grail of video group calls?
One use case that didn’t exist before the pandemic is large video calls. Up until today, we used to take these video meetings in the office inside meeting rooms. Cramming a few people in each room in a remote office and doing a call with 2-4 such rooms. Maybe someone joined from home or a hotel. You could see meetings with 10 participants. Sometimes. But the need just wasn’t really there.
The pandemic hit. People are now at home. And communicate with video remotely. A meeting of 4 became a meeting of 20 just because the participants are now sitting at home.
Even worse, schools are now remote. Each class has 20-40 students in it. And the teacher wants to see them all.
This made Zoom’s gallery view so popular (even if a tad useless if you ask me). It also made the magical number 49 magical. The holy grail of what is needed of a video conferencing service in a pandemic. Doesn’t matter if everyone is muting their video.
Microsoft and Google announced plans for supporting it. Then started running towards that value, each rising in the number of tiles in his gallery, reaching 49 recently.
Facebook grew from a meeting of 8 to meetings of 50.
Meetings are larger and longer now.
And again, we found the ways to make it happen with WebRTC.Best practices on group video scaling being rewritten
There are a lot of mechanisms in WebRTC that enable an application to squeeze the lemon and gain back CPU cycles as it tries to optimize for larger group calls.
But we never did have a place where all these are found and explained. A body of knowledge and understanding of how to make it happen.The larger the conference call size in WebRTC, the more complex the solution is going to be to implement it
In my recent/upcoming update to the Advanced WebRTC Architecture course there’s a lesson dedicated to this specific topic. It isn’t as if the information isn’t there in the course – it is spread all over the course. But now there’s a lesson on this alone. Because it became interesting only in 2020.
We have traded the focus on what is important to us with video communications. A video conference’s scale trumps quality at the moment. While I do understand we all want both all the time, but there is still a tradeoff between these two qualities of a system.The role of machine learning and AI in communications
Where does one fit machine learning and AI in this brave new world of large video conference calls?
Machine learning requires memory and CPU. Things we don’t have to spare at the moment in these large group calls. So we can’t just slap machine learning inference algorithms on the edge inside the web browser easily.
Edge inference in web browsers using WebAssembly is also brand new. So there’s no guide book to work with.
We won’t be using it to improve video quality or audio quality in the edge – we can’t really. Not enough CPU to spare.
There’s no real place for it on the server side either – that one requires decoding and encoding which are going to be CPU intensive and increase the costs of delivering the service. Pexip is doing that for auto zoom, but that’s because they are built as an MCU. Google decided to do this for noise suppression.
There’s packet loss concealment using machine learning now. And you can do super resolution for video to get better video quality. But in the end, all these are going to make a difference once CPUs have their own dedicated, standardized AI accelerators, like the new Apple M1 chip in them brand new Intel-less MacBooks. We just don’t have cycles to spare.
Which is why media quality has gone back to its roots. Here’s something I have in that workshop of mine:First take care of your infrastructure as much as you can to improve media quality in WebRTC
Machine learning should be added once we’re done squeezing that lemon for more performance and quality.
Google is now doing its part of optimizing the WebRTC codebase itself. It is your role to do it in your own infrastructure and application. Once done, the time will come to introduce some machine learning chops into it.
Until then? We need machine learning for two main tasks, and we see it already:
Does that mean you don’t need to invest in machine learning?
Hell no. you definitely MUST invest in machine learning.
Not for what you’ll be doing in 2021, but for what you’ll be launching in your product in early 2022. Which brings me to the heart of it all.
Machine learning is new and challenging. We’re still writing the playbook of what it means to use it for real time communications, inside a browser, using technologies such as WebAssembly.
You’ll need to decide on which use cases to invest, and what value you are going to derive of it. And you’ll need to plan for the long game here and be patient until you get results.
There’s a need to let the teams driving machine learning do the research and experimentation needed. But at the same time, they need guidance in where to look at and what to experiment with.
The post A blueprint to improving WebRTC media quality using AI appeared first on BlogGeek.me.
WebRTC growth during 2020 came in waves, just like the pandemic and its quarantines. Here how it looks and where we are all headed.
Let’s look at some interesting performance indicators of WebRTC use and adoption.
2020 is the year of video communications.
2020 is also the year of WebRTC.Table of contents
In my introductory slides of my WebRTC workshop 4 months ago, I had that as a very strong theme:
The slide above illustrates what the statistics at the time were for the big meetings vendors.
Since then, the numbers have grown. Microsoft Teams, for example, reached 115M DAU. That’s Daily Active Users.
While not all of the growth is in video calls, these services have a video focus to them.
Out of these 4 vendors:
Guest access growth for Microsoft Teams and Cisco WebEx can be attributed to some extent to WebRTC. With Google Meet, it is all WebRTC related.Gartner’s Magic Quadrant for Meeting Solutions (& WebRTC)
Gartner has its nice magic quadrant diagrams. Here’s the one just published for meeting solutions:
Which of the vendors in this magic quadrant diagram use WebRTC? I’ve marked the vendors in red for you:
The ones not marked might have WebRTC – I am just not aware of it. The ones marked have WebRTC support in production in their products. How central is it to their product is a different question though.
The thing here is that no matter what magic quadrant from Gartner you’ll be looking at for whatever market category that involves communications, WebRTC will be used as the underlying technology by many of the vendors.
Contemplating if WebRTC is the technology to use? Look at the reds above.A surge in use of WebRTC
I decided to leave the best for last.
Chrome collects and shares statistics of JS API calls in the browser and their “popularity”.
Lets look how getUserMedia() looks like:
Interestingly, we see an adoption curve where each round of quarantine raises the use of WebRTC to a higher level.
From a steady, boring 0.05% of use pre-pandemic, the new normal is settling well above 0.2% of the page loads.
How can we explain the rise from July to October? Is this a sustained growth happening as the pandemic found its second wave in different countries and social distancing gradually came back in force throughout the globe? Is it due to the fact that schools started opening around the world in August and September, many of them strictly remotely? Is it due to more services being introduced online that offer WebRTC based communications in them?
If you ask WebRTC, we’ve reached the peak of the second wave of the pandemic.Where do we go from here?
On a more serious note though, the huge surge in WebRTC traffic brought with it new use cases and a lot of learnings regarding scaling and operationalizing WebRTC.
The post WebRTC Growth – is it a back-to-school pandemic phenomena? appeared first on BlogGeek.me.
If you are planning to use WebRTC P2P mesh to power your service, don’t expect it to scale to large sessions. Here’s why.
Every once in a while someone comes in with the idea to broadcast or conduct a large scale video session with WebRTC without the use of media servers. Just using pure WebRTC P2P mesh technology.
While interesting as a research topic for university, I don’t think that taking that route to production is a viable approach. Yet.Table of contents
If you are focusing on data only WebRTC mesh, then skip to the last section of this article.
When dealing with WebRTC and indicating P2P or mesh, the focus is almost always on media transport. The signaling still flows through servers (single or distributed). For a simple 1:1 voice or video call, WebRTC P2P is an obvious choice.From a WebRTC client perspective, a 1:1 session is similar if it is done using P2P mesh or using a media server
The diagram below shows that from the perspective of the WebRTC client, there is no difference between going through a media server or going P2P – in both cases, it sends out a single media channel and receives a single media channel. In both cases, we’d expect the bitrates to be similar as well.
Making this into a group call in P2P translates into a mesh network, where every WebRTC client has a peer connection opened to all other clients directly.WebRTC mesh architecture. Or is it mess architecture? Why use WebRTC P2P mesh?
There are two main alluring reasons for vendors to want to use WebRTC P2P mesh as an architectural solution:
If WebRTC P2P mesh is so great, with cheaper operating costs and better privacy, then why not use it?
Because it brings with it a lot of challenges and headaches when it comes to bandwidth and CPU requirements. So much so that it fails miserably in many cases.
It is also important to note here that in ALL cases of 3 users or more in a call, alternative solutions that rely on media servers give better performance and user experience. Always – at least as long as the media servers infrastructure is properly deployed and configured.Bandwidth challenges in WebRTC P2P mesh
Assume we want pristine quality. Single speaker, 10 listeners.
The above layout illustrates what most users of this conference would like to see and experience. The speaker may alternate during the meeting, switching the person being displayed in the bigger frame.
As we’re all watching this on large screens (you do have a 28” 4K display – right?), we’d rather receive this at HD resolution and not QVGA. For that, we’d want at least 1.5Mbps of the speaker to be received by everyone.Strain on the uplink
In a mesh topology, the speaker needs to send the media to all the participants. Here’s what that means exactly:In WebRTC mesh, we put a bigger strain on the uplink
1.5Mbps times 10 equals 15Mbps on the uplink. Not something that most people have. Not something that I think my strained FTTH network will be able to give me whenever I need it. Especially not during the pandemic.
In an office setting, where people need to use the network in parallel, giving every user in a remote meeting 15Mbps uplink won’t be possible.
On top of that, we’ve got 10 separate peer connections to 10 different locations. WebRTC has its one internal bandwidth estimation algorithm that Google implemented in libwebrtc, which is great. But how well does it handle so many peer connections on the client’s side? Has anyone at Google ever tried to target or even optimize for this scenario? Remember – none of Google’s own services run in a mesh topology. Winning this one is going to be an uphill battle.Bandwidth estimation on the downlink
Let’s look at the viewers/subscribers/participants/users or whatever else you want to call them.
If we pick a gallery view layout, then we are going to receive 10 incoming video streams. Reduce that to 9 for layout simplicity and we get this illustration:
There are 9 other users out there who generate video streams and send them our way. These 9 streams are competing on our downlink network resources and for our machine’s attention and CPU.
Each of them is independent of the others and have little knowledge about the others.
How can the viewer understand his downlink network conditions properly? Let alone try to instruct these sends on how and what to send. A media server has the same set of problems to deal with, but it does that with two main advantages:
Then there’s the CPU to deal with in WebRTC P2P mesh.
Each video stream from our speaker to the viewers has its own dedicated video encoder. With our 10 viewers, that means 10 video encoders.
A few minor insights here if I may:
So. going for a group video call?
Want to use WebRTC P2P mesh?
You’re stuck at 300kbps or less for your outgoing video even if your network has great uplink. Because your device’s CPU is going to burn cycles on encoding multiple times.
Which also means that people aren’t going to like hearing their laptop’s fans or touch their heating smartphone (and depleting battery) on that call.Can we do better?
Probably. A single encoder would make the CPU problem a wee bit smaller. It will bring with it headaches of matching the bitrate to all viewers (each has his own network and device limitations).
Using simulcast in some manner here may help, but that’s not how it is intended to be used or how it has been implemented either.
So this approach requires someone to make the modifications to the WebRTC codebase. And for Google to adopt them. Did I already say Google has no incentive in investing in this?Alternatives to WebRTC P2P mesh
You can get a group video call to work in WebRTC P2P mesh architecture. It will mean very low bitrate and reduced video quality. But it will work. At least to some extent.
There are other models which perform better, but require media servers.WebRTC offers media server alternatives to mesh in the form of SFU and MCU
Using an MCU model, you mix all the video and audio streams in the MCU, making sure each participant receives and sends only a single stream towards the MCU.
With the SFU model, you route media around between participants while trying to balance their limitations with the media inputs the SFU receives.
You can learn more about in my WebRTC multiparty architectures article.A word about WebRTC data channel mesh
I haven’t really touched WebRTC mesh architectures for data channels.
All the reasons and challenges detailed above don’t apply there directly. CPU and bandwidth relied on the concept of needing to encode, send, receive and decode live video. In most cases, this isn’t what we’re dealing with when trying to build mesh data channel networks. There, the main concern/challenge is going to be proper creation and connection of the peer connections in WebRTC.
If what you are doing isn’t a group video call (or live video broadcast from a browser to others) then a WebRTC P2P mesh architecture might work for you. If it will or won’t is something to analyze case by case.
In the last 2 months I’ve dived into the world of CPaaS again, updating my WebRTC API focused report. Oh, and there’s a new free ebook.
There have been many changes since my last update,so this one was greatly overdue.
API platforms changed hands due to mergers and acquisitions. Vendors joining the market. Others leaving or just pivoting away from APIs.
And then we had AWS and Azure entering the CPaaS market.
What I did in these last two months was interview and review all the vendors in my report again, to see what has changed and update that part of the report. I learned a lot from the process.
As with every time where I shift focus to a certain market, I took the time to process my own thoughts by writing them down here in a series of articles.
Here are two things I wanted to share with you, as well as announce my next upcoming projects.Table of contents
I finished and published the WebRTC API report last week. The result:
Agora decided to sponsor this report (thanks a bunch!). They are one of the interesting vendors in this space, offering an IP video/voice focused platform with their own data centers spread across the globe and a lot of research done in machine learning to improve media processing.
If you are looking to learn more, then you can:
The previous 3 articles in my site here were all focused on CPaaS, looking at different angles on how CPaaS is changing.
The first one dealt with the future of CPaaS, especially considering the pandemic and how it affects everything and everyone.
In the second article, I looked at AWS Chime SDK and Azure Communication Services, trying to understand what their entry into CPaaS is going to change in the market.
For the third and last article, the focus went to Twilio Signal 2020. Considering how they redefined the market in the last 4 years in each such event, this event was a bit of a downer. It did bring with it many insights.
If you’re more into printing and reading, or sharing with others, then I packaged all of these 3 articles into one ebook, making it easier to consume.
I called the ebook CPaaS in 2020 – a market in transition. Because this is what it is…Download my CPaaS in 2020 ebook Advanced WebRTC Architecture Course – update & office hours
With my WebRTC API report now updated and finally launched, I can go back to focusing on other projects I am running.
My WebRTC Courses have been around for over 4 years now. I’ve been updating them regularly and I am doing it again to my main signature course – the Advanced WebRTC Architecture training.Updates
There are going to be 2 new lessons and around 10 lessons that are already being updated and recorded all over again.
The purpose is still to make this the best alternative out there to learning WebRTC.Office hours
Alongside the updates, I will be starting another round of office hours for the course. These will start in December.
The office hours is where students can come and learn online and in-person with me specific topics in WebRTC, as well as ask questions about anything related to WebRTC – and their own projects.
If you were thinking of learning WebRTC, then the best timing for it would be to enroll now and join the office hours. These are complementary to the course and open for anyone with a valid course subscription.WebRTC Insights – a new service
Following and catching up with everything in WebRTC is time consuming. It is also tedious. And you need to know where to look and what each bit of information means to you.
To make this a wee bit easier, I’ve decided with the help of Philipp Hancke to start a new service together – WebRTC Insights
In this service, you receive an email every two weeks. This email includes all the important changes to WebRTC
This gives you actionable insights to your own planning and reduces the risks in your development. Both Philipp and me have been doing this for a while, but doing it together brings it to a new level.
If you want to learn more and subscribe to this service, then check the new WebRTC Insights page.
Walkthrough and deep analysis of how Azure Communications Service makes use of WebRTC by Gustavo Garcia
The post How does the new Azure Communication Services implement WebRTC? (Gustavo Garcia) appeared first on webrtcHacks.
Chrome recently added the option of adding redundancy to audio streams using the RED format as defined in RFC 2198, and Fippo wrote about the process and implementation in a previous article. You should catch-up on that post, but to summarize quickly RED works by adding redundant payloads with different timestamps in the same packet. […]