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

HEVC in HLS: 10 Key Questions for Streaming Video Developers

文章特色图片

Most encoders will have some kind of trade-off between complexity and quality. 例如, x265编解码器使用与x264相同的预设(超快到安慰剂),而MainConcept使用从1到30的多个级别. 一旦您熟悉了编解码器/编码器的这些控件,您应该处于良好的状态.

7. HEVC的要求是什么?

The requirements fall into three rough classes:

HEVC编码文件: HLS创作规范说明, “Profile, Level, and Tier for HEVC MUST be less than or equal to Main10 Profile, Level 5.0、高级.” Table 1 显示来自的级别限制 维基百科HEVC页面 which details the level and tier restrictions. 显著, 虽然你可以以每秒128帧的帧率编码1080p视频, 4K resolutions are restricted to 30 fps or lower. 请注意,HLS创作规范禁止所有编解码器的帧率超过60fps.

hevct1

Table 1. HEVC编码的级别和层限制

另一个值得注意的创作规范要求是“HEVC视频的容器格式必须是fMP4,或破碎的MP4文件, which means that MPEG-2 transport streams are out. 这将简化向DASH和HLS客户端传输未加密的HEVC编码视频,因为两者都应该能够部署相同的比特流. 在短期内, PlayReady和FairPlay加密方案之间的差异可能会阻止加密的fMP4内容与DASH和HLS端点的互操作性, 尽管微软已经承诺在2018年为兼容硬件设备解决这个问题 PlayReady 4的发布.0.

The HLS Authoring Specification contains two bitrate ladders, 一个用于视频文件, the other for trick play files used for scrubbing and scanning. The video bitrate ladder is included as Figure 4. 请注意,建议的比特率阶梯表明2K和4K分辨率的帧率与源相同, which is identical to all other resolutions down to 540p.

However, 如果你正在使用60 fps的4K源, 前面提到的第5级限制将您限制在30 fps,如表2所示. 不幸的是, Apple hasn’t posted any HLS examples with 2K/4K videos, which might resolve this seeming inconsistency. 直到问题解决, 我推荐保守的路线,将2K和4K HEVC视频限制在30 fps.

H.264编码文件: 如上所述,创作规范要求一些视频应该用H编码.264,但没有提供进一步的指导. 所以我们观察混合HEVC/H.264梯子在苹果开发者网站, 看到苹果为HEVC和HLS提供了完全独立的编码阶梯, 每个九级, 正如 Table 2, though the highest resolution supported in either format was 1080p. 查看主M3U8清单文件, 播放器首先选择编解码器, 然后是相应的梯级(注意,苹果的播放列表称梯级为“齿轮”)。.

hevct2

Table 2. 苹果建议的H编码阶梯.264, HEVC和HDR

这很有趣, 因为在苹果之前,它提供了一个例子, there were multiple theories for the optimal composition of an HEVC/H.264 ladder, including a ladder that provided H.264 for lower quality rungs and HEVC for the higher resolution rungs. 在会议上, 几位与会者和RealEyes的两位制作人表示,任何基于软件的播放器都很难在H.264 and HEVC playback, which tends to support the Apple approach. 明显的缺点是它会使编码成本翻倍,并大大增加存储成本.

At least until proven otherwise, I would recommend adopting Apple’s approach. 您还应该下载Master M3U8文件,并从中挖掘其他编码和表示细节.

I-Frame/Trick Play支持: Apple added trick play support for fast forward and reverse playback, either in the video playback window or as thumbnails, in iOS 5, and detailed how to create I-frame playlists to support this feature in Apple技术说明TN2288. 在TN2288, 苹果州, 你不需要制作特殊用途的内容来支持快进和倒放. All you need to do is specify where the I-frames are. I-frames, 或内部帧, are encoded video frames whose encoding does not depend on any other frame. 为了指定i帧的位置,iOS 5引入了一个新的i帧播放列表.根据TN2288, you don’t need to create a separate encoded file for trick play support, just a playlist that points to I-frames in existing content files.

在HLS创作规范中, 苹果修改了这个建议, stating, “You SHOULD have one frame per second ‘dense’ I-frame renditions. These are dedicated renditions that only contain I-frames. 另外, you MAY use the I-frames from your normal content, but trick play performance is improved with a higher density of I-frames.”

该规范还说明, “如果你在相同的空间分辨率下为你的常规视频提供多个比特率,那么你应该为该分辨率创建i帧播放列表,这些播放列表来自同一来源,用于该组中最低的比特率.” As further guidance, Apple provides the suggested encoding ladder shown in Table 3. 如你所料, the Apple sample presentation implemented these recommendations to the letter, with separate I-frame encoded files for both H.264和HEVC都建议分辨率.

hevct3

Table 3. HLS创作规范中建议的把戏编码阶梯

据我计算,在H.264和HEVC内容和仅i帧文件, Apple encoded the source video to 28 separate files, which may strain the budgets of some producers. 对于4K制作人来说尤其如此, since Apple’s ladder didn’t include 2K/4K iterations, 哪些是最昂贵的编码, and would have swelled total encoding requirements to 31 files, HDR可能还需要17个.

会议期间, these requirements generated significant discussions among the attendees, many of which had been producing HLS presentations for years. Most stated that they provided one or two trick play files, 几乎没有人提供任何解决方案, 并且大多数指向现有文件中的i帧,而不是单独编码, I-frame-only文件. 制作人将不得不做出自己的成本/收益分析,以决定最适合自己的方法.

8. 我应该逐字使用苹果的建议吗?

Sometime during the last revision or two of the Authoring Specification, Apple addressed per-title encoding implementations, 上面的比特率是通过HLS传送的典型内容的初始编码目标. 我们建议您根据您的特定内容和编码工作流程对它们进行评估,然后进行相应的调整.” So Apple isn’t dictating a fixed encoding ladder.

超越数据速率, 如果你研究过苹果的发展阶梯, you’ll note that it uses essentially the same resolutions for HEVC and H.2K以下的所有梯级为264. 在会前会议上, 一位更精通技术的与会者建议,苹果的阶梯应该对HEVC有完全不同的阶梯,以解释高分辨率视频的编解码器的更高效率. This led to the analysis presented in an article entitled, “Apple Got It Wrong: Encoding Specs for HEVC in HLS.”

长话短说, 本文提出HEVC的最优阶梯将消除几个较低分辨率的阶梯, and push higher resolution rungs lower in the ladder. 这显示在 Table 5, 左边是苹果推荐的梯子,右边是一个更理想的梯子(为动画电影《百家乐软件》定制)。, along with VMAF scores rating the quality of both alternatives. 获得最佳QoE, you’ll get better results with the Should Be ladder, rather than the Was ladder designated by Apple.

苹果提出了HEVC编码阶梯

Table 5. 左边是苹果的HEVC编码阶梯,右边是提议的编码阶梯

9. 我的直播选项有哪些?

Live options are nascent but rapidly becoming available, and the presentation handout lists encoders from Bitmovin, 电影《百家乐软件app最新版下载》英文名, 谐波, 和Hybrik, as well as transcoding solutions from Wowza and Nimble Streamer. 面向开发者级别的制作人, MulticoreWare, MainConcept, 和Beamr都有sdk, and the handout details how to produce output using FFmpeg and Bento4.

10. What Does the Spec Say About High Dynamic Range (HDR)?

创作规范指出,HDR视频必须编码为HDR10或杜比视界, and that HDR encoded streams should be provided at all resolutions. 如果您提供HDR内容, 您还应该为主要视频文件和魔术播放文件提供SDR内容, 还有H.264内容,将流数量增加到潜在的数十个单独文件.

Note that Apple doesn’t yet provide an example file with HDR, 留下几个没有回答的问题, 如是否需要H.264 content can also serve as the SDR content, 或者制作人是否也应该提供单独的hevc编码SDR流(和恶作剧播放文件). 我猜苹果总是会提供最广泛(和昂贵)的方式来满足创作规范中规定的要求, 让开发人员根据成本和期望的QoE选择自己的配置.

HEVC在HLS领域还处于早期阶段,其主题和技术将会快速发展. Hopefully, these questions and answers have helped you off to a quick start.

[This article appears in the January/February 2018 issue of 流媒体杂志 作为“HLS中的HEVC: 10个关键问题”."]

相关文章

流媒体 West: Apple Creates Advanced Experiences With HLS

目标是只创建、存储和分发每个媒体的一个版本. HTTP 在线直播 is the key to that kind of efficiency, Apple says.

The Future of HEVC Licensing Is Bleak, Declares MPEG Chairman

由于HEVC许可制度的支离破碎,公司不再有创新的经济动力, but Leonardo Chiariglione suggests steps to reverse the damage.

Apple Got It Wrong: Encoding Specs for HEVC in HLS

Adding HEVC to your HLS streams is looking like a no brainer, 但如果你决定这么做, you may not want to take Apple's HEVC encoding recommendations verbatim. 如果你遵循下面详细的建议,你会提供明显更高质量的视频.

HEVC in HLS: How Does It Affect Device Performance?

如果你要在HLS视频中添加HEVC, 你可能会担心iphone的播放帧率和电池寿命, iPads, 还有你要投递的电脑. 我们测试了一系列设备,发现大多数设备的CPU影响可以忽略不计.

Bitmovin Survey: HLS Still Dominates, but DASH is on the Rise

Bitmovin对全球受访者进行了调查,发现美国的DASH使用率最低.S. 在亚太地区和拉丁美洲是最高的.

提及的公司及供应商