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

好消息:AV1编码时间下降到接近合理的水平

Article Featured Image

当我第一次 测试AV1 在2018年8月,编码时间非常缓慢,严重影响了编解码器的潜在可用性. 表1 from that story tells the tale. 除非另有说明,否则所有的编码时间都是在我的HP ZBook笔记本电脑上进行的.8 GHz Intel Xeon E3-1505M v5 CPU. 除了, LibVPx is the implementation of VP9 in FFmpeg, 所有提到的AV1都是指在FFmpeg中可用的AV1编解码器.

表1. 编码 times for the first release of AV1

Starting in late 2018, I 写道, 研究人员报告说,AV1编码时间低至LibVPx编码时间的10倍. So, when I started a recent codec evaluation project, I was eager to see if I could match those times. I just finished that project, and 表2 shows where things stand now. 因为我知道你在想,去年压缩的视频片段的VMAF质量是96.18; the quality for the clip referenced in 表2 is 95.55. 因为需要6个VMF点才能产生明显的差异, even the sharpest-eyed viewer wouldn’t notice this .63差.

表2. Current optimized encoding times for AV1

基于2018年8月审查的其他编解码器的旧编码时间, AV1的编码时间是x265和LibVPx的3倍. As you’ll read below, things aren’t exactly apples to apples, and I’m not exactly being fair to the other 编解码器, 尽管如此,它的加速速度还是相当惊人的, wouldn’t you agree?

If you’re in a TL/DR kind of mood, 您可以跳转到表6,并查看与其他编解码器的比较. 如果你想花时间了解我是如何做到这一点的,让我们来分解这些组成部分.

Encoder Speed Improvements

在最初的测试中使用的命令字符串是这样的:

ffmpeg -y -i input.mp4 -c:v libaom-av1 -strict -2 -b:v 3000K -maxrate 6000K -cpu-used - 8 -pass 1 -f matroska NUL & \

输入.mp4 -c:v libaom-av1 -strict -2 -b:v 3000K -maxrate 6000K -cpu-used 0 -pass 2 output_AV1 . mp4.mkv

如果您对当前版本的FFmpeg使用相同的字符串(我测试了版本N-93083-g8522d219ce), the encoding time drops from 226,080 seconds (45K times real-time) to 18,196秒, 或者大约3个,639 times real-time, a speedup of about 12x. 仍然比x265慢63倍,比LibVPx慢80倍, 但是一个巨大的进步让我们看到了 表3. The VMAF score for the AV1 file created in 表3 was 95.因此,与去年的96相比,质量下降很小,而且幅度不大.18.

表3. 在当前代码中使用原始命令行(AOM的改进)

表3显示了我们初始测试的苹果对苹果的性能. 所有其他编码时间的减少都与编码字符串的更改有关.

Finding AV1’s Optimal Speed/Quality Tradeoff

Let’s get practical. 大多数编解码器都有预设,可以让您在编码时间和质量之间进行权衡. 例如, with x264 and x265, the presets have names like slow, 非常缓慢的, 快, 非常快, 和安慰剂. 与AV1, the presets are controlled via the cpu-usedswitch, 您可以在上面的批处理中看到,我在pass 1中使用了cpu-used8,在pass 2中使用了cpu-used0.

如果你在FFmpeg中加载AV1帮助说明(FFmpeg -h encoder=libaom-av1),你会看到以下内容:

-cpu-used Quality/Speed ratio modifier (from 0 to 8) (default 1)

With LibVPx and AV1, first-pass quality doesn’t impact the second pass, 所以你通常会在最快/最低的质量设置下运行第一轮. At Google’s direction for the August First Look, I ran the second pass at the highest possible quality, which was cpu-used 0. 编码时间是如此之慢,以至于我没有花时间对这些设置进行实验,就像我之前对x264所做的那样, x265, 和LibVPx.

图1 在我开始认真测试或生产编码之前,我通常为每个编解码器/预设/编码器创建的图表. 红线表示可用质量,蓝线表示编码时间. At cpu-used5, for example, encoding time is 6.最大值的63%(00:20:06比5:03:16)而质量是99%.64% of the maximum (95.56 VMAF compared to 95.91).

图1. AV1’s quality/speed curve

如果你是一个研究人员,想要衡量一个特定编解码器的绝对最佳质量, you ignore the graph and encode at cpu-used 0. If you’re a video producer, you probably encode at cpu-used 5, 因为较低的设置提供最小的时间节省和较高的设置提供最小的质量改进. 当然, based upon the numbers shown in 图1, no one would call you crazy if you opted for cpu-used 8. Assuming that you encoded with cpu-used 5, 表4 shows how encoding times compare.

表4. Current version of FFmpeg, cpu-used 5

一个五秒片段的单一编码能否准确地预测以多种数据速率编码的更大范围的片段的质量/速度曲线? In the project I recently completed, 我在不同的编解码器上使用了相同的方法,基于5秒测试片段的单一编码的曲线预测质量差异为1.预设使用和最大质量之间的3%(以及预设的编码时间从18分钟减少到3分钟). 后来,我在一个五阶梯子和六个测试夹上测量了预设使用和最大质量之间的实际差异,实际差异是1.4%. 因此,虽然数据越多越好,但单一编码应该是一个相当准确的预测器.

流媒体覆盖
免费的
for qualified subscribers
现在就订阅 最新一期 过去的问题
相关文章

H.264 Continues to Dominate, and AV1 Is Looking for a Day Job

The annual Global Media Format Report is out from 编码.com, 对于寻找视频格式现状的硬数据的百家乐软件app最新版下载来说,这本书是必不可少的读物, 编解码器, 和数字版权管理.

NAB '19: Netflix和Intel发布SVT-AV1编解码器作为开源

在英特尔至强可扩展处理器和英特尔至强D处理器上运行时,能够实时4K/60p 10位编码, SVT-AV1编解码器代表AV1编码的一个数量级的加速.

编码.com Goes Ludicrous With Ultra-Fast 编码 Service

As files get larger, 编码.com does its best to ensure encoding times stay small. Ludicrous HLS processes HD and UHD movies in minutes.

Sisvel Launches Patent Pools for VP9 and AV1

The licenses cover devices such as smartphones, 电脑, 电视, 机顶盒, and graphics cards, but not encoded content—at least for now.

At the Battle of the Codecs, Answers on AV1, HEVC, and VP9

Ahead of 流媒体 West, 编解码器专家会议提供了前沿编解码器的新发展, as well as field reports from companies already using them.

HEVC, VP9, AV1和VVC:在11个图表中呈现编解码器更新

Is AV1 all that people expect it to be? HEVC在公平的版税政策下会做得更好吗? 看看这些图表,就能找到明天编解码器问题的答案.

Time to Start Testing: FFmpeg Turns 4.0 and Adds AV1 Support

AV1提供与HEVC相同的质量,但数据速率较低. For now, though, it's slow. A five-second clip took 23 hours and 46 minutes to encode.

AV1: A First Look

FFmpeg 4.0让许多视频工程师第一次有机会测试新的AV1编解码器与H.264, HEVC, and VP9. 结果? 在我们的测试中, quality was impressive, 但在硬件加速可用之前,缓慢的编码时间使AV1成为大多数发行商的首选.

" class="hidden">中华儿女报刊社