What Is WebRTC? (Update)

 

For interactive live streaming solutions ranging from video conferencing to online betting and bidding, Web Real-Time Communication (WebRTC) has become an essential underlying technology. The proliferation of WebRTC comes down to a combination of speed and compatibility.

More specifically, WebRTC is the lowest-latency streaming format around with sub-500-millisecond video delivery. Native browser support also eliminates the need for end users to download clunky apps to view streams delivered with it.

That said, when developers branch out from the pure chat-based applications that WebRTC was designed for, challenges can arise. This article looks at how WebRTC video streaming works, the benefits it delivers, WebRTC’s limitations, and how to solve them.

   

What Is WebRTC?

WebRTC is a free, open framework for the web that enables the real-time communication (RTC) its name promises to deliver. As a combination of standards, protocols, and JavaScript APIs, WebRTC leverages peer-to-peer connections between browsers to support a near-simultaneous exchange of data — without requiring third-party software or plug-ins.

WebRTC Peer-to-Peer Streaming Graphic

In other words, WebRTC allows users to initiate click-to-start video chats from their browsers and exchange information quickly enough to replicate in-person interactions. This supports interactive live streaming between individuals, as well as browser-to-browser communication through a set of standard protocols.

 

How Does WebRTC Work?

WebRTC employs three HTML5 APIs that allow users’ browsers to capture, encode, and transmit live streams between one another, enabling two-way communication. For this reason, WebRTC is referred to as peer-to-peer technology, whereby each browser communicates directly with one another.

The beauty of WebRTC lies therein: It eliminates the need for any intermediary web servers during these exchanges, not to mention additional equipment or software. URL-based meeting rooms are an excellent example of the convenience and real-time communication delivered by WebRTC.

While some streaming workflows require a live streaming cameraencoder, and media server, the simplest WebRTC deployments can accomplish everything with a connected webcam and browser. And unlike Flash-based video, WebRTC can be played back on any HTML5 player that supports WebRTC APIs.

However, because WebRTC was designed for native information exchange without an intermediary server, it can’t handle large audiences. Anyone looking to stream WebRTC at scale will require the help of a streaming server or service. From repackaging the content into a more scalable format to delivering live streams across a custom-built WebRTC content delivery network (CDN), Wowza has options for configuring your WebRTC workflow to accommodate audiences of up to a million viewers.

 

WebRTC Snapshot

  • Audio Codecs: Opus, iSAC, iLBC
  • Video Codecs: H.264, VP8, VP9
  • Playback Compatibility: Chrome, Firefox, and Safari support WebRTC without any plugin
  • Benefits: Super fast and browser-based
  • Drawbacks: Designed for video conferencing and not scale, thus requiring a streaming platform like Wowza when streaming to large audiences
  • Latency: Sub-500-millisecond delivery
 

How WebRTC Came to Be

WebRTC started as a Google open-source project aimed at giving browsers the ability to support real-time voice and video communication without any plug-ins. In many ways an antithesis to proprietary streaming technologies like RTMP and Flash, WebRTC has since been standardized by the IETF and W3C. WebRTC has grown in the decade that’s followed since its initial development to combine the power of a community-driven project with the cross-platform support of a well-established specification.

Today, WebRTC is supported across Chrome, Safari, Firefox, Opera, Microsoft Edge, Android, and iOS (except for iOS 15 + Safari). It’s also the technology powering video chat on Google Hangouts, Facebook Messenger, and Houseparty — to name a few.  According to Google, “with Chrome, Edge, Firefox, and Safari supporting WebRTC, more than 85% of all installed browsers globally have become a client for real-time communications on the internet.”

 

WebRTC Benefits

When considering the many advantages that WebRTC delivers to both users and developers, it makes sense why there’s so much hype surrounding it. Everything from low-latency delivery to interoperability makes it an attractive choice.

The Streaming Latency and Interactivity Continuum
 
  • Inherently Low Latency. WebRTC knocks it out of the park when it comes to delivery speed. At sub-500-millisecond glass-to-glass latency, WebRTC offers the quickest method for transporting video across the internet.
  • Platform and Device Independence. All major browsers and devices support WebRTC, making it simple to integrate into a wide range of apps without dedicated infrastructure. Since WebRTC uses HTML5 APIs, it lets developers utilize many of the features built into the HTML5 programming language through a lightweight, embedded framework. What’s more, browser-based encoding ensures a more accessible end-user experience for all.
  • Open Source and Standardized. The open-source framework is standardized by the IETF and W3C, thereby eliminating any interoperability challenges that come with proprietary streaming technologies. Computerworld’s Shan Sinha explains, “WebRTC benefits from having thousands of software developers working on it in concert, standardizing conferencing protocols and making interoperability less of a concern. Most companies can’t compete with thousands of independent developers contributing code to a platform — even organizations as large as Google and Apple pale in comparison to a web community-driven effort.”
  • Adapts to Network Conditions. WebRTC ensures reliable publishing over poor network conditions with adaptive network encoding. That’s because it supports a capability called ‘simulcasting’ — not to be confused with broadcasting to multiple destinations, which is the traditional definition of that term. With WebRTC simulcasting, the client generates multiple streams at varying bitrates and quality so that poor network conditions don’t hinder video contribution. Unlike adaptive bitrate streaming, where the stream dynamically adjusts during playback, this takes place at the publishing side and provides multiple encodings rather than the ability to adapt bitrate mid-stream.
 

WebRTC Limitations

Low-latency delivery takes the highest priority with WebRTC streaming. As a result, scale and quality have limitations when deploying WebRTC without any additional technologies.

  • Scalability. WebRTC simply wasn’t designed with scalability in mind. The bandwidth-intensive configuration requires each participating browser to connect with each other via a peer connection. To put that into perspective, WebRTC expert Tsahi Levent-Levi recommends staying shy of any more than 50 concurrent peer connections.
  • Broadcast Quality. A common misconception is that WebRTC lacks in quality due to bitrate limitations. While browser-based contribution is inherently connectivity- and camera-dependent on the resolution front, high-bitrate encoding is still possible. That said, content distributors wanting to stream with a professional encoder and camera might find this type of workflow less than ideal for streaming produced content. Additionally, adaptive bitrate streaming support is limited with WebRTC.
 

WebRTC Streaming Use Cases

WebRTC is an ideal delivery framework for applications that depend on speed and interactivity. For example, imagine you’re hosting an online auction. You’re on camera soliciting bids, but a five-second latency means your audience is a little behind you. It’s going once, going twice, you accept the final offer — and someone swoops in at the last second with a better bid, but you’ve already closed it because of that latency.  

With WebRTC’s sub-500 millisecond latency, that’s not an issue. You’d be able to hear that final bid in near-real time. WebRTC is also useful for applications like:  

  • Gaming 
  • Esports 
  • Live sports  
  • Fitness 
  • Gambling 
  • Emergency response 
  • Surveillance 
  • Telehealth  

And much more. The closer to real time you need your stream to be, the more likely you are to opt for WebRTC.  

 

What Is WebRTC Security Like?

WebRTC is secure because it mandates SRTP (Secure Real Time Protocol) encryption and a group of other standards (it is more than just a mere protocol, after all). One of the organizations that helped standardize WebRTC, the Internet Engineering Task Force, outright prohibits WebRTC connections without necessary encryption.   

Besides being encrypted at the protocol level, WebRTC also leverages browser and community-supported security. Major browsers like Firefox, Chrome, Safari, and Edge all take WebRTC security seriously, so they require HTTPS to access the framework, IP leakage protections, users to grant permissions to individual sites before allowing camera and microphone access, and other privacy controls. As an open-source project, WebRTC’s community of developers also work together to ensure its security is of the highest caliber.   

Checkout the following workflow to better understand how standard web encryption and security compares to WebRTC’s additional layers.  

WebRTC security graphic
 

How Does WebRTC Compare to Other Protocols?

As we’ve established, WebRTC is more than a protocol, but it’s an alternative to several video delivery formats that are protocols-only, such as HLS, RTMP, RTSP, and SRT. How does WebRTC compare to these?  

 

WebRTC vs. HLS 

HTTP Live Streaming (HLS) is an Apple proprietary protocol typically used for last-mile delivery. Apple initially developed the protocol to resolve playback issues for iPhones during live streams, but it has since taken off and is now an almost universally accepted protocol that countless devices and browsers support.  

Compatibility is a major reason why you might decide to compare WebRTC vs. HLS. It’s rare to find a system that doesn’t support them, so you don’t have to worry about excluding anyone you want to be part of your audience.  

Their primary differences lie in latency and scalability. On its own, HLS is actually rather slow with a latency between six and 30 seconds. If you use Apple’s Low Latency HLS extension, it’s possible to reduce that latency to around two seconds, but it still doesn’t compare to WebRTC’s sub-500 millisecond delivery.  

HLS, however, is more scalable on its own. This protocol makes it feasible to reach thousands to millions of viewers with ease. WebRTC isn’t intended to stream content to massive audiences, so it performs better up to 50 viewers or less. That said, it’s possible to overcome WebRTC’s scalability issues and still reach millions of viewers with a custom CDN part of a solution like Wowza’s Real-time Streaming at Scale.  

 

WebRTC vs. RTMP and SRT 

The Real-Time Messaging Protocol (RTMP) was once the industry’s foremost protocol due to its tight-knit relationship with Adobe Flash. RTMP has largely fallen out of favor for certain parts of streaming workflows since Flash’s death, but it’s still a favorite for first-mile contribution due to its compatibility with encoders. Many workflows, for example, encode with RTMP before transcoding video assets into HLS for last-mile delivery.  

RTMP has a latency of around five seconds, which isn’t close to WebRTC’s impeccable speed, but it surpasses HLS and DASH without their low-latency extensions. WebRTC matches or beats RTMP in many other aspects, including security and compatibility (hardly any browsers support RTMP anymore), but where RTMP has a leg up is functionality including captions, timed metadata, and ad markers. WebRTC is an excellent choice for glass-to-glass streaming that doesn’t require transcoding — especially if you only need a web browser for either end — but many content distributors choose to still work with RTMP if they need more control over their encoding settings.  

It’s also important to consider WebRTC vs. Secure Reliable Transport (SRT). SRT was created as an alternative to RTMP, compensating for poor network quality to still deliver low-latency and reliable streams. As such, SRT’s advantages and disadvantages are similar when comparing it to WebRTC: you could use it for first-mile contribution before transcoding it, using SRT to solve for issues like jitter and packet loss.  

 

WebRTC vs. RTSP  

The Real-Time Streaming Protocol (RTSP) isn’t responsible for transporting data from clients to servers — that’s Real-Time Transport Protocol (RTP) — but it does facilitate multimedia playback and is often compared to RTMP.  

RTSP and WebRTC sometimes complement each other because RTSP is often a default protocol amongst IP cameras. These cameras use RTSP for first-mile contribution and transcode footage into WebRTC for last-mile delivery, dramatically reducing latency (which is especially important in surveillance). WebRTC isn’t used for both ends of the process because it’s still mostly browser-based, so IP cameras still need RTSP for encoding.  

 

Solving for WebRTC Scalability

In a traditional peer-to-peer WebRTC connection, each browser connects directly to all the other browsers in the group — burning up bandwidth in the process. Wowza offers three options for overcoming the scalability restraints of WebRTC

 

1. Real-Time Streaming at Scale for Wowza Video

Our Real-Time Streaming at Scale feature for Wowza Video deploys WebRTC across a custom CDN to provide near-limitless scale. Content distributors can stream to a million viewers in less than half a second, thus combining real-time delivery with large-scale broadcasting.

 

2. WebRTC Powered by Wowza Streaming Engine

By connecting all participants to a live streaming server like Wowza Streaming Engine, content distributors benefit from real-time streaming at a larger scale, while optimizing bandwidth by minimizing the number of connections each client must establish and maintain. Additional infrastructure would be needed to scale beyond several hundreds of viewers, in which case Real-Time Streaming at Scale with Wowza Video would be a better route.

 

3. Converting WebRTC to HLS or DASH

Finally, a live streaming server or cloud-based service can be used to transcode the WebRTC stream into a protocol like HLS for distribution to thousands. That way, content distributors can combine simple, browser-based publishing with large-scale broadcasting — albeit at a higher latency. When easy content acquisition (and not real-time delivery) is the key reason for incorporating WebRTC into your streaming workflow, then this solution is the way to go.

 

Solving for WebRTC Quality

When boosting the quality of content streamed via WebRTC, two of the options outlined above once more come into play.

 

1. Real-Time Streaming at Scale for Wowza Video

Real-Time Streaming at Scale for Wowza Video provides the flexibility to stream via any encoder, using RTMP ingest, or leveraging our custom OBS integration. That means that broadcasters aren’t limited to browser-based capture and encoding when looking to distribute produced content.

 

2. Converting WebRTC to HLS or DASH

HLS and DASH leverage adaptive bitrate streaming to deliver the best video quality and viewer experience possible — no matter the connection, software, or device. For that reason, converting a WebRTC stream to either of these protocols solves for scale and quality. A significant tradeoff is latency, so we’d only suggest this workflow if real-time delivery isn’t a priority.

 

Why Combine WebRTC With Wowza

Whether you need to support real-time interactivity, broadcasting at scale, or a combination of both, Wowza’s WebRTC solution can be customized to your needs. Organizations in industries ranging from retail to gaming rely on Wowza-powered WebRTC for real-time delivery, browser-based ingest, and large-scale video distribution.

  • Endless scaling. While designed for video chat environments with only a handful of participants, WebRTC can be combined with Wowza’s technology for broadcasting to up to a million viewers. Real-Time Streaming at Scale for Wowza Video makes this process seamless — with lightning-speed delivery to boot.
  • Expanded possibilities. Anyone looking to add additional functionality to WebRTC — including video recording, security, and other enhancements — needs a powerful streaming software behind the curtain. Wowza provides powerful tools, APIs, and modules to enhance WebRTC’s out-of-the-box features. Our live streaming platform also empowers content distributors to build hybrid workflows that combine WebRTC with other streaming protocols that better suit their needs.
  • Simple, browser-based broadcasting. WebRTC powers browser-based publishing, and with Wowza in the background, you’re able to broadcast the content to countless users. Our WebRTC streaming solutions ensure simple end-to-end broadcasting to any destination — without the need for an encoder.

To find out more about enhancing WebRTC with Wowza, check out the videos linked below:

Wowza Video and WebRTC for Real-Time Streaming at Scale: With Wowza Video, you can create live streaming events that scale instantly to a million viewers with the real-time experience necessary for interactive applications.

Wowza Streaming Engine and WebRTC: WebRTC powered by Wowza Streaming Engine allows you to transcode, restream, and enhance WebRTC’s capabilities in powerful ways.

 

Conclusion

Described by Mozilla co-founder Brandan Eich as “a new front in the long war for an open and unencumbered web,” WebRTC combines browser-based streaming with real-time interactivity. The free, open framework works great for small video-based environments. And when large-scale distribution or additional streaming features are also required, Wowza’s technology provides the necessary boost.

 

Search Wowza Resources

Categories

Subscribe

Follow Us

Categories

About Traci Ruether

Traci Ruether is a Colorado-based B2B tech writer with a background in streaming and network infrastructure. Aside from writing, Traci enjoys cooking, gardening, and spending quality time with her kith and kin. Follow her on LinkedIn at https://www.linkedin.com/in/traci-ruether/ or learn more at https://traci-writes.com/.