-->
Save your FREE seat for 流媒体 Connect this August. 现在注册!

The State of WebRTC and 流媒体 2018

文章特色图片

WebRTC has been with us for the past 6 years, and it has certainly grown in adoption and popularity during that time. But how and where, exactly, does WebRTC fit into the world of media streaming? And while we’re at it, what should we expect of it in 2018?

WebRTC是IETF和W3C的结合规范,是HTML5的一部分. 在本质上, WebRTC enables sending voice, video, and any other arbitrary data directly across browsers in real time. You write a bit of JavaScript code, add a few relay servers to be used when needed, and you’ve got yourself a video chat service.

WebRTC和使用它的开发人员的重点通常是处理远程视频聊天会议, either one-on-one or group calls. That is also the primary focus of web browsers in their support of WebRTC. 那么,在过去的一年里,WebRTC是如何在流媒体领域变得如此有趣的呢?

There are several contributing factors here: 

  • Flash正在消亡, 现代浏览器限制了它的使用和可用性,这正在加速, along with Adobe’s plan to reach Flash’s end-of-life by the end of 2020.
  • MPEG-DASH and HLS implementations usually come with latency limitations. 通常情况下,这些流媒体技术会出现10秒或更长时间的延迟.
  • Live and interactive are becoming more and more important. We see it with Facebook Live, Microsoft Mixer, and other streaming services.
  • 广播公司正在寻求直接在浏览器中分享和混合他们的流,而不需要安装任何东西.
  • 不断增长的视频消费使流媒体服务器紧张,并增加了广播公司的网络成本.
  • H的介绍.264作为WebRTC中强制实现的编解码器,它在所有现代浏览器上的可用性使得WebRTC更容易用于现有的流媒体服务.

现在有几个地方你可以在流媒体服务中找到WebRTC, and they use WebRTC quite differently from one another. To understand how these came to be, 了解WebRTC在流媒体环境下的工作方式是很重要的, 如图所示 图1.


图1. A simple schematic showing WebRTC in a media streaming environment.

The browser will use a signaling channel toward the application itself. 应用程序决定如何以及在哪里使用WebRTC连接浏览器. For each use case, the application and its behavior will be very different. 

WebRTC的实时音频和视频可以在CDN或媒体服务器前使用, for both sending and receiving media. This will be used for low-latency streaming use cases. 

最后但同样重要的, WebRTC的数据通道用于在浏览器之间直接创建自组织点对点(P2P) CDN连接. This can reduce buffering and costs for broadcasters.

考虑到这一点,让我们看看它如何适用于五种不同的媒体流场景

1. Broadcasting Without Installations

让WebRTC在流媒体中工作的最简单的方法和场所是让广播公司在没有安装应用程序的情况下共享他们的流媒体.

WebRTC是目前唯一允许浏览器共享摄像头和麦克风的机制. Flash is no longer an option. Plugins are losing popularity and are hard to maintain. 人们要么安装一个专用的应用程序,要么在浏览器中使用WebRTC.

在过去, 这种方法需要在VP8 (WebRTC中可用的视频编解码器)和H.264. Today, this is no longer necessary, since browsers support H.264编码在WebRTC.

图2.Connecting to a CDN to deliver a live stream via HLS using WebRTC

图2 illustrates how this evolved architecturally. 连接到具有实时媒体流的CDN需要实时消息传递协议(RTMP)支持, which translated into using an additional gateway component. Kurento, an open source WebRTC media server, 被广泛使用吗, ,最近, Wowza和Red5 Pro开始提供将WebRTC连接到RTMP的类似功能(两者都提供低延迟观看)。. Nanocosmos took a slightly different approach, allowing broadcasters to connect via WebRTC, but streaming on the other end using HLS that is optimized for low latency.

2. 面试

This takes the single-broadcaster approach to the next level.

随着视频的互动性越来越强,制作视频本身的方式也变得越来越强. 某些事件, such as webinars and news-related video streams, 需要采访人的能力现场和广播采访作为一个单一的单位给观众. But the broadcaster and his hosts might not be located in the same room, 因此,他们需要进行实时视频聊天,然后将其混合并传输给观众.

图3. 一个典型的多人视频采访的设置是混合和流媒体给观众

中的媒体服务器 图3 now isn’t only a media gateway. 它接收来自所有活动参与者(广播者和主持人)的实时媒体流。, manages the conference call between them, 并且还混合所有输入来创建一个可以被视频cdn(最有可能是RTMP格式)消化的单一流.

YouNow was probably one of the first to offer such a user experience. 最近,Facebook Live和Instagram都支持在直播活动中添加嘉宾. 

在企业中, 举办有来自不同地点的多个主持人参加的网络研讨会是很常见的. In recent years, webinars have been shifting from voice toward video. 这就需要启用这些类型的面试场景. 同时, it has increased the requirement for lower latencies for viewers, which brings us to the next use case.

3. Low-Latency 在线直播

在某种程度上, 前两个用例可以看作是这个用例的前奏——在后flash世界中实现低延迟直播. 因为WebRTC是为实时通信而设计和实现的, it is quite capable of offering low-latency live streaming. 

在过去的一两年里,我们看到很多公司开始在这样的用例中使用WebRTC. 解决这个技术问题的厂商从两个不同的方向着手:

  1. 采用视频会议方法,并通过选择性转发单元(SFU)将其增加到支持更大的组, 一种媒体路由器.
  2. 从现有的RTMP流技术开始,并增强它们以支持WebRTC. 

这两个方向都是有效的,并且具有不同的技术优势和挑战. 在一天结束的时候, 两者都需要解决规模问题:如何将单个流媒体播放给大量观众? 即使您假设单个媒体服务器可以向数千名观众广播, what happens when the stream in question is requested by even more viewers? 

图4. 单个广播机构的流在到达目的地之前从一个媒体服务器级联到另一个媒体服务器.

The solution is cascading, which is quite similar to how CDNs work today. 图4 shows such an architecture, 在到达目的地之前,单个广播公司的流从一个媒体服务器级联到另一个媒体服务器.

在被微软收购并更名为Mixer之前,Beam就是这么做的. This is how all the gray zones of the internet that offer auctions, 赌博, and porn are tackling the issue of live streaming at scale.

2018 will see more technology companies offering such solutions and products, as well as a CDN or two that will offer such commercial services.

流媒体覆盖
免费的
合资格订户
现在就订阅 最新一期 过去的问题
相关文章

The State of WebRTC and Low-Latency Streaming 2019

It's not a standard yet, but that will likely change. Here's a detailed look at the state of WebRTC, the project that could finally deliver instantaneous video streaming at scale.

Developers Pay the Pioneer Tax for WebRTC 在线直播

There's a cost to being cutting-edge, 以及涉及学习WebRTC和接受有限浏览器支持的低延迟实时视频流.

Re-Engineering Real-Time Video Delivery

斯坦福大学的一个研究小组创建了一个名为Salsify的架构,它可能为实时应用程序提供更好的视频传输方式

Companies and Suppliers Mentioned