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

VP9终于成熟了,但它适合每个人吗?

文章特色图片

VP9的价值主张是明确的,如 图1:“自适应高清流媒体,只有H的一半数据.264!” Half the data rate cuts your bandwidth and storage costs and allows you to reach more viewers with better quality video on slower connections. 它还可以减少客户每月的数据费用, a major issue now that many ISPs are instituting monthly bandwidth caps.

Many producers are starting to explore the benefits associated with distributing VP9-encoded video to desktop/notebook browsers and some mobile platforms instead of H.264. 虽然你不能戒掉H.264 entirely for many years yet, VP9 delivery is definitely a concept whose time has come. In this article, I’ll compare multiple aspects of each, from encoding to delivery to player creation. 除此之外, I’ll briefly touch on the IP situation and conclude with a brief mention of AV1, 即将取代VP9的编解码器.

VP9, WebM和DASH

让我们从VP9的简要概述开始, 这是一个来自谷歌的开源编解码器, 得益于2010年收购On2技术公司. Google开源的第一个编解码器是VP8, which was paired with the Vorbis audio codec in the WebM file structure, 是基于Matroska媒体容器设计的吗.

VP9, 编解码器的下一个迭代, was first introduced in mid-2013 and first deployed by YouTube a few months later in September. 也是在2013年, the WebM format was expanded to incorporate the Opus audio codec, 哪个最常与VP9配对. You can deliver a single file containing VP9 and Opus in a WebM file or produce multiple VP9/Opus streams in DASH packaging for adaptive streaming.

vp9-1

图1. JW Player supports VP9 in its eponymous player and online video platform service. 

VP9是VPx的最后一次迭代, as Google formed the Alliance for Open Media in September 2015 to consolidate open source codec development with Mozilla, 思科, 微软, 英特尔, 和其他人. 第一个联盟编解码器, 叫AV1, should be released sometime between December 2016 and March 2017, 我将在本文后面讨论这个问题.

With this, let’s start our look at VP9 by examining file quality.

以一半的数据速率获得相同的质量? 关闭!

检验质量, I encoded three video clips at three different resolutions at five different data rates. The first clip is a short segment from Blender Foundation’s 《百家乐软件app最新版下载》(TOS) 电影,主要代表传统的电影内容. 第二个是Blender的一小段视频 Sintel 电影, 表示动画内容, 第三个是, 我称之为新剪辑, is composed of multiple clips to simulate real-world video. Working in Adobe Premiere Pro CC, I produced very high data rate H.264 mezzanine clips in three resolutions with the same horizontal pixel count, 但垂直计数会因剪辑而异. 例如,最小的New剪辑是1280x720,而 Sintel /服务条款 夹子尺寸为1280x576. These mezzanine clips were the starting points for all encodes.

我对所有测试编码使用FFmpeg. 对于VP9编码,我使用了VOD 从WebM Wiki推荐的设置, changing both the speed and frame parallel to 0 at Google’s recommendation. 对x264, 我使用了两道编码和非常慢的预设, with maxrate and buffer set to 150 percent of the target data rate, essentially 150 percent constrained VBR with a bit of wiggle room in the buffer. 所有测试的关键帧间隔设置为3秒.

I encoded each clip at five different data rates, which varied by clip. 作为一个例子,我对1920x856进行了编码 Sintel /服务条款 clips at 1000Kbps, 1500Kbps, 2000Kbps, 2500Kbps, and 3000Kbps. 在所有测试中, this left two comparison points for each clip in which VP9 was encoded at 50 percent of the data rate of H.264. For example, with the 1920x856 TOS clip, I could compare VP9 at 1000 with H.2000时的264和1500时的VP9.264 at 3000 (图2). Since there were two comparison points for each of nine test clips, that meant there were 18 total comparison points to test the “same quality at 50 percent of the data rate” premise.

vp9-2

图2. VP9的质量持续并大幅超过H.264是所有测试过的数据速率.

检验质量, 我使用了峰值信噪比(PSNR)指标, calculated using the Moscow State University 视频质量 Measurement Tool. In four of the 18 cases, the PSNR score of the VP9 video was higher than the H.264 video at twice the data rate. 如果我通过乘以H加上5%的容差.264分0分.95、VP9在18个测试案例中赢了14个. At 10 percent tolerance, all VP9 files exceeded the quality of their H.264年同行. 如图2所示, the quality differential was fairly consistent along the entire data continuum.

编解码器基准测试是一门不精确的科学, and all comparisons usually result in more questions than answers. 来补充我的试验, 我与JW Player的首席压缩工程师进行了交谈, Pooja马丹, 谁设计并实现了JW的VP9编码工具. She advised that the company was achieving about 50 percent savings overall on its encoding ladder, 因此如图1所示. Most other companies I spoke with while writing this article reported similar results.

但是你需要很多时间

The Achilles’ heel of VPx-based codecs has always been encoding time, and VP9 is no exception. I produced all performance numbers discussed later on an HP Z840 workstation with dual 3.1 GHz E5-2687W处理器,每颗10核, 和超线程技术(HTT), 总共40个核心. All source files were stored on and encoded files delivered to Turbo SSD G2 drives. This is an extremely fast and capable system that you can read about in a 一系列基准审查 in 百家乐软件app最新版下载.

在Z840上,将96秒的720p New文件编码为H.2Mbps的264格式需要98秒. Encoding with the Google-recommended parameters delivered the same file in VP9 format in 19:10, 大约长12倍. 当我为这篇文章采访JW Player时, Madan reported that the company had invested significant time to achieve the optimal balance between encoding time and quality.

I asked if she would share her FFmpeg scripts to use in my testing, and she (and the company) agreed. 结果令人印象深刻. 具体地说, the JW Player command line script produced the 720p New file @ 2Mbps in 4:59, 大约是Google脚本的22%. I checked the PSNR value for the JW Player-encoded file against the file created using Google recommended parameters, JW得分高出约5%.

在编码, I tracked CPU utilization and noticed that when rendering a single file, VP9几乎没有改变针头. I decided to check performance with multiple encoders running. 要做到这一点, I created multiple folders on the two SSD drives and ran each of the command line scripts eight and then 12 times simultaneously. 你可以看到 表1,多重编码降低H.264 to VP9 encoding differential with the JW Player script down to less than 4 seconds per file when encoding 12 files simultaneously.

vp9 table1

表1. H的编码次数.264和两个VP9测试脚本. 

这些结果提出了两个问题. The first asks why Google would produce a codec that performed so poorly on multiple-core workstations. The answer is because this performance model fits perfectly into its current encoding schema. 这是, Google doesn’t encode each input file from start to finish in a single encoding instance; it encodes all files in parallel, splitting each source into chunks and then sending them off to different encoding instances.

In the context of Google’s encoding system, VP9 isn’t slow at all. 见鬼,40岁了.5 seconds per file, it’s only about 10 percent percent slower than H.264. 然而, this performance schema puts the burden on the developer to create an efficient encoding program or platform. 当然, VP9 isn’t the first codec that fails to efficiently leverage multiplecore systems, and encoding programs such as Telestream Episode have long used a technique called split and stitch to improve performance on multiple-core systems. 很像YouTube的并行编码模式, split and stitch divides a single input file into multiple parts encoded separately in parallel, 然后拼接在一起,最后输出. 本质上, the 12-simultaneous encode test shown in 表1 simulates this parallel encoding operation, 这使得Z840的使用率达到98%以上。图3).

vp9-3

图3. 12个同步VP9编码将Z840推向了最大值.

VP9 isn’t slow; it’s just highly inefficient in a multiple-core environment, which makes it tougher for developers to design encoding systems that operate efficiently. 出于这个原因, expect to see substantial differences in encoding times (and quality) in programs that support VP9. Developers creating their own encoders should design their architecture from the start knowing that they’re going to have to deploy a system like Google’s to maximize VP9 encoding time and efficiency. 在云计算中尤其如此, 按小时收费的地方, and the ability to spread encoding chores over as few CPUs and CPU-hours as possible translates directly to the bottom line.

你必须进行实验

Here’s the second question: If JW Player’s script produced both better quality and a faster encoding time than Google’s recommendations, 为什么我没有用它来做质量测试? JW Player’s script uses a technique called capped common rate factor (CRF), which tells FFmpeg to deliver a file at a certain quality level but capped at a certain bitrate. For example, the JW script used a CRF value of 30 and a data rate of 2Mbps. This tells FFmpeg to encode the file to a quality level of 30, but to cap the data rate at 2Mbps.

如果文件易于压缩, 比如一个会说话的头夹, 整个视频可能远低于2Mbps. If the clip is hard to compress, the entire clip will likely be capped at 2Mbps. 因此,当使用capped CRF编码时, 比特率, 以及生成的文件大小, 会因内容的不同而不同吗.

这在比较编解码器时提出了一个挑战, because it’s always necessary to check output file size to ensure that the encoder met the target data rate. Obviously, this can’t be done with capped CRF-encoded files. I didn’t think it was appropriate to use a capped CRF approach for benchmarking, 不过我当然会考虑生产. 如果你在设计自己的系统, 一定要包含这个功能, 如果你要买一个编码器, 在购买前确认有上限的CRF可用.

最后, 为那些编码自己的VP9文件, Madan was kind enough to share her top four VP9 encoding takeaways:

  1. Use two-pass encoding; one pass does not perform well.
  2. 采用双通道编码, generate the first pass log for the largest resolution and then reuse it for the other resolutions. VP9优雅地处理了这个问题.
  3. 而VP9允许更大的CRF值, we noticed that CRF < 33 speeds up the encoding process considerably without significant losses in file size savings.
  4. You must use the “tile-columns” parameter in the second pass. This provides multi-threaded encoding and decoding at minor costs to quality.

I’ll add that you shouldn’t assume that Google’s recommendations are the best practices for your needs. The bottom line is that you may have to invest substantial time to create the optimal mix of encoding time and output quality.

您将拥有一个不断增长的编码选项列表

截至2016年NAB, 在选择编码器时,您应该有更多的选择, 无论是在本地还是在云端. 在企业编码方面, Telestream announced that it would incorporate VP9 encoding into the Vantage Transcode Multiscreen program by mid-2016. Exploring what motivated Telestream to integrate VP9 into Vantage 3 years after the codec became available, 我问保罗·特纳, 企业产品管理副总裁, “为什么VP9, 为什么是现在?他说, “New codecs show up all the time; as an encoding supplier, we look at all of them but don’t instantly add them to our products. 此时此刻, we believe VP9 has legs and is a viable alternative for customers who have been encoding in H.264和其他UHD编解码器.”

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

Samsung Galaxy Note 9 Tops List of YouTube Signature Devices

YouTube now endorses phones that provide the best streaming experience on its platform, VP9编解码器的支持是必不可少的.

VP9 Pricing: When Does Adding VP9 Lead to Bandwidth Cost Savings?

A conference question asks when it makes economic sense for a video provider to add a VP9 transcode? 我们找出了变量并进行了计算.

YouTube停止播放H.264 4K Encoding; Will Apple Get on Board?

苹果Safari从未支持VP8或VP9, but a move by Google's YouTube pressures it to do so: Safari users can't see new 4K videos on YouTube.

什么是VP9?

VP9 is the open-source codec from Google, and provides a royalty-free alternative to HEVC. 它比H更有效.264, and while it's less efficient than HEVC, it compares well on quality.

Netflix讨论vp9相关的开发工作

Once counted out, VP9 is on the rise, with support from Netflix, JW Player, Brightcove, and more. In this interview, David Ronca of Netflix talks about VP9 savings, encoding, and testing.

新兴流媒体技术:H.265、VP9、WebM、DASH、HTML5和WebRTC

我们的小组探讨了主要的编解码器和格式问题, helping you decipher which technologies are here to stay and which should be forgotten.

提及的公司及供应商