-->
为五月的纽约流媒体保留座位吧. 现在注册!

如何编码和交付多种ABR格式

文章特色图片

I recently hosted a poll on my Streaming Learning Center blog asking whether DASH or HLS was the best adaptive bitrate technology for deployment today. 我添加了一个评论选项, 我很高兴我这么做了, 因为有几个人很有见地, 其中一位受访者写道:“这不是一个选择问题, 您需要使用这两种方法来完全覆盖.”

这并不完全正确, of course; many producers are using HLS, or DASH—either singly or in concert with other technologies—to deliver content to viewers on computers and mobile devices. But the key point is this: Most streaming producers must deploy multiple adaptive bitrate (ABR) formats to reach their target viewers, 要么现在,要么近期. This puts a premium on producing multiple ABR packages as efficiently and economically as possible.

How to produce multiple ABR packages for live streaming is the subject of a different how-to article. 因此, this article focuses primarily on video on demand (VOD); specifically, I’ll look at the most efficient way to encode and deliver multiple ABR formats to different target platforms.

定义

Like all things streaming, it helps to learn the lingo before diving into the technology behind it. 让我们使用 图1,由a改编而成的图表 微软Azure关于动态打包的技术说明. 我们这里处理的是VOD内容, 所以视频开始时是一个单独的夹层文件, 一直到左边.

传统的编码、包装和交付工作流程

传统的编码、包装和交付工作流程 

This mezzanine file is transcoded into multiple-bitrate MP4 streams that make up the adaptive group. These files are then packaged (or transmuxed) into the combination of chunked or segmented video files and accompanying metadata files required for all HTTP-based ABR formats. ABR包被发送到一个或多个源服务器, which distribute HLS (HTTP 在线直播) assets to iOS and Android devices, 和DASH(通过HTTP的动态自适应流)到Microsoft Edge, Windows 10浏览器, 和谷歌Chrome浏览器.

图1还说明了通常称为静态交付的内容. 这是, the ABR packages are created and stored at the origin server for distribution to the various viewers. In the context of distributing multiple ABR packages, this static schema has several disadvantages. 第一个, 当您决定支持其他ABR格式时, you must create new packages for your entire library and upload them to your origin servers, 这很耗时, 潜在的昂贵, 或两个. 例如, 尽管包装是一个非常轻量级的步骤, most cloud encoding providers charge full price for the additional outputs, 所以你会为MP4文件支付全价, 然后是HLS和DASH输出的全价. Zencoder是个例外, charging only 25 percent the normal price for transcoding MP4 files to HLS output, 这个折扣并不适用于DASH.

Second, online storage costs will increase with each additional ABR format you support. 这两个缺点都可以通过一种称为动态打包的技术来解决.

动态打包

动态打包工作流的开始方式与静态工作流相同, 将夹层文件转换为多比特率MP4资产. Those files are then uploaded to a streaming server where a separate program or process dynamically converts the MP4 files into the ABR formatting required by the requesting device. 使用示例请参见 图2,改编自Azure技术说明. If an iOS or Android device requests the video, HLS-packaged video will be sent. If a Microsoft Edge or Google Chrome client requests the video, DASH will be sent. 取决于驱动转换的程序, 它可能能够生产其他ABR包装, 比如发送到Xbox的平滑流媒体内容. 毫不奇怪,这是Azure支持的一个特性.

动态流发送MP4文件到源服务器

动态流将MP4文件发送到源服务器, 它们在哪里为请求客户机动态打包. 

对于支持多种ABR格式的用户来说,优势是显而易见的. You can enable support for a new format by changing a few lines of code on the server or in the player, 这样做不会增加存储负载和相关成本. The obvious negatives are the cost of the software that performs the packaging (if any, 因为有多种开源选项), 以及执行转码所必需的CPU使用, 虽然这可能比你想象的要低.

来解释, 封装在CPU上是一个非常轻量级的功能, 因为它不涉及真正的转码. 而, packaging merely converts the container format of the file and creates any necessary manifest files. In 其网站上有部署示例Wowza声称,一个单独的亚马逊云C3.8 xlarge实例, 哪一间租金只有8美元,每年300元(3年合约), combined with the Wowza Streaming Engine ($65 per month) could distribute video to up to 1,400名同时观看者. 虽然你的里程肯定会有所不同, these numbers are smaller than the cost of transcoding even a modest-sized content library into a new ABR format, without the storage and administrative costs associated with a static ABR group.

Beyond Wowza, there are multiple products or services that provide the same function. 例如, Elemental Delta是一款可以作为设备安装的产品, 作为VM例程, 或通过元素云访问, 而开源的基于nginx的MP4 Repackager是 可从创作获得. Service providers who perform these functions include all the usual suspects: Akamai, 聚光灯下, 微软Azure, 和其他人.

如何选择供应商? 假设所有将执行基本包装功能良好, 虽然效率会因产品和服务提供商而异. 主要的区别在于更细微的地方——字幕, 数字版权管理, 还有广告插入——所以首先要检查这些方面. 例如, while 创作 might be ideal for many users, it doesn’t support DRM.

格式支持是关键, and DASH support isn’t yet universal among all streaming servers available on the cloud. 当然, 定价也将是关键, and because of the disparate business models deployed by the product and service providers, it’s important to budget lots of spreadsheet time to compute apples-to-apples comparisons.

实时云转码

那么实时转码和打包呢? This is every video producer’s dream; you upload and store one high quality mezzanine file to the web, then transcode to the required stream and package as necessary for each viewer request. 虽然许多服务都在吹捧这种功能, 这是非常cpu密集的, so transcoding costs will certainly eat into any storage-related savings.

除了, Akamai, 这种方法的早期倡导者之一, 最近改变了方向, 发现所涉及的延迟, 特别是在用DRM转码和打包4K文件时, 字幕, 广告插入点, 可能很重要. While this is a trend worth watching, it may be 2–3 years out for widespread commercial usage.

静态的包装

与动态包装相反的是静态包装, where you output the required ABR-packaged files and upload them to the origin server for distribution. 如果你现在只支持HLS, 而不是DASH, it’s key to recognize that you’ll be producing DASH output in the near term and to plan ahead so you can reduce that encoding expense.

具体地说, make sure that you’re not encoding to HLS in a single step; rather, 确保您的编码器首先生成MP4文件, 拯救他们, 然后生成HLS输出作为一个单独的步骤. 这种方式, 生成DASH文件的时候, 您的编码工具可以从以前编码的MP4文件工作, 而不是从头开始用夹层文件.

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

一对多:将直播视频流到多个平台

如果你在传送实时视频流, 你可能希望将游戏发布到尽可能多的平台上. 这里有最好的硬件和软件来实现它.

控制成本:出版商如何在ABR编码上省钱

许多公司在自适应比特率编码上花费太多. 事实证明,有一种昂贵的方法和一种更便宜的方法. 动态包装来拯救!

如何使用HEVC编码直播和点播视频

本节探讨了HEVC的现状, identifying options for encoding live and on-demand video using HEVC and discussing player options in the streaming and OTT markets.

如何编码到HEVC: H的简单指南.265年的新手

是时候开始了. 下面是编码到H的最佳实践.265/HEVC与主概念和x265编解码器

如何为HLS传输编码视频

如果你需要通过移动设备和OTT平台交付, 你需要提供HTTP 在线直播 (HLS). 苹果为压缩者提供了很多建议, but here are some tips and tricks for encoding and testing your HLS files

如何为HTML5编码视频

学习创建H的基本要素.264 and WebM video with this presentation (naturally, there's a little more emphasis on H.264比WebM).

如何为苹果iOS设备编码

1月时 explains how to get video on Apple's mobile devices in this hour-long presentation.

提及的公司及供应商