- Streaming production
- Streaming fundamentals
- Encoding your video
- Choosing production tools
- Distributing your video
- Video tutorials
- Peer review
Encoding Brief: Apple Releases HLS Authoring Specification for Apple TV
- Categorized in: Encoding your video
Executive Summary: In October 2015, Apple released a document entitled HLS Authoring Specifications for Apple TV (HLS stands for HTTP Live Streaming, the adaptive bit rate technology used to deliver video to Apple TV and other iOS devices). If you're producing for Apple TV, and aren't aware of these specs, you should review them immediately. In a broader sense, Apple is introducing another TN2224-like fixed encoding ladder while the industry moves towards content-aware encoding with a different ladder for all types of content. It will be interesting to see how this dynamic evolves in the next 12-24 months.
Overview and Discussion:
Apple is obviously the expert when it comes to encoding for their devices, and the new document is much more specific than Apple Technote TN2224, the previous document of record for Apple TV encoding. The new specification has 12 sections, including video encoding, audio encoding, advertising, accessibility, subtitles, trick play, media segment durations (6 seconds with a keyframe interval of 2 seconds), M3U8 playlists, master playlists, and security. The specification does not reference any Apple testing requirements, or what happens if the requirements or recommendations are not met. Presumably, as with TN2224, producers who don't meet the spec may have their apps rejected when submitted for Apple TV approval.
Most provisions make perfect sense. For example, producers can now use 200% constrained VBR for encoding, rather than the 110% constrained VBR in TN2224.
30i to 60p?
Others are confusing. For example, the spec states, "You SHOULD de-interlace 30i content to 60p." A note to the encoding ladder (presented below) also states, "30i source content is considered to have a source frame rate of 60 fps." Though 30i footage is clearly on the wane, the approach taken by the vast majority of producers is to deinterlace to 30p, not 60p.
One problem is that each 30i field has only half the resolution of the complete frame. Converting from 30i to 60p works well if you subsample the video down to half the original resolution, but requires special processing and interpolation to create a frame with the original resolution (see here). These techniques are time consuming and generally not incorporated into most encoding tools.
The other problem with 60p files is that at the same encoded data rate as 30p, the 60p file has half the bits per pixel value, which generally means lower compressed quality. Combining this with the interpolation described above could lead to significantly degraded video quality.
Note that the new spec references RFC 2119 for the meaning of words like SHOULD. In this regard, RFC 2119 states, "This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course." While most of the new spec seems reasonable, this requirement SHOULD very likely be ignored.
Regarding the Fixed Encoding Ladder
On the fixed encoding ladder recommended by Apple, Netflix started what will be a groundbreaking trend with their per-title optimization strategy announced in December 2015. As explained in their blog post, because all videos present different degrees of encoding complexity, deploying the same fixed ladder for all is inherently inefficient and suboptimal. Netflix claims that per-title encoding is necessary to optimize viewer quality of experience, which tests performed by the Streaming Learning Center have confirmed. YouTube has since revealed a similar strategy, and there will be a number of third-party encoding tools and/or services enabling per-title optimization in the first half of 2016 and beyond. Most major producers will likely be using per-title encoding by early to mid 2017, if not before.
The spec introduces the new ladder with the statement, "For expected bit rate variants, see Table 2-1" (included below), which is devoid of any RFC2119-defined terms. So it's unclear whether using the fixed ladder is mandatory.
1. If you're encoding for Apple TV, you should check out the new specification immediately.
How Netflix Pioneered Per-Title Video Encoding Optimization, Streaming Media Magazine, January 14, 2016.
About the Streaming Learning Center:
The Streaming Learning Center is a premiere resource for companies seeking advice or training on cloud or on-premise encoder selection, preset creation, video quality optimization, adaptive bitrate distribution, and associated topics. Please contact Jan Ozer at firstname.lastname@example.org for more information about these services.