HLS streaming (HTTP Live Streaming) has emerged as the standard in adaptive bitrate video.
Adaptive bitrate video delivery is a combination of server and client
software that detects a client’s bandwidth capacity and adjusts the
quality of the video stream between multiple bitrates and/or
resolutions. The adaptive bitrate video experience is superior to
delivering a static video file at a single bitrate, because the video
stream can be switched midstream to be as good or bad as the client’s
available network speed (as opposed to the buffering or interruption in
playback that can happen when client’s network speed can’t support the
quality of video). With HLS streaming format as a standard, and major
players like Apple’s iOS & Google’s Android OS leading the way,
Encoding.com has provided developers with a complete guide to the
standard’s evolution, architecture and device compatibility. We are all
increasingly familiar with the issues surrounding video delivery to
multiple devices, and HLS content has rapidly become the standard for
adaptive bitrate technology for mobile/tablets, OTT, and desktop. With
this resource, we wanted to bring to light the ever-present confusion
within the industry regarding the origin of HLS streaming, its technical
specifications, device support, and many other variables.
Technical Explanation
HLS
streaming is a truly adaptive bitrate technology. When video is encoded
to HLS multiple files are created for different bandwidths and
different resolutions. The files are encoded using the mpg2_ts codec. The streams are mapped to the client in real time using an .M3u8 index file based on screen size and available bandwidth.
HLS: Use Cases & Case Studies
- Preparing your video content for targeted playback on a wide variety of client bandwidth environments (Cellular, 3G, 4G, LTE, WIFI Low, WIFI High)
- Ensuring optimized delivery of audio and video to the broadest range of mobile, desktop, tablet, and OTT devices
- Delivering video on demand with encryption and authentication
- Significantly reduce CDN costs by delivering only the optimal bitrate to the client network and avoiding the “partial play and complete download” scenario inherent with http progressive streaming.
- As a requirement for Apple App Store approval. Apps with any video over 10 minutes are required to us HLS for app store approval.
The Customer: Music Choice
Music Choice is one of the world’s largest music video broadcasters with millions of hours of content served to a global audience.The Challenge
Music Choice has a massive library of music video content that they needed to serve across hundreds of devices and varying bandwidths. They also wanted to ensure their encoding efforts would not become instantly obsolete and content could still be served to an always evolving list of devices and players.
The Encoding.com Solution
Music Choice leveraged the extensive processing power of the Encoding.com platform to chew through their content library. They automated their encoding through the use of the Encoding.com API. In order to ensure device support they used a version of HLS with not only multiple bitrates, but with corresponding resolutions for mobile, tablet, OTT and desktop. By using the JW Player with native HLS support they were able to serve content to the desktop beyond Safari. Because audio quality is a critical component of their brand and service, they used Dolby HE-AAC audio encoding, which realizes the best quality audio at lower bitrates.Music Choice’s first pass with Encoding.com converted over 11,000 music videos to HLS. A process that would have taken months and hundreds of servers took just a few weeks on the Encoding.com platform.
The Customer: Fox Networks
Fox Networks is the third largest broadcasting company in America, producing some of the highest rated shows on television.The Challenge
Fox needed a seamless way to prepare for their high volume of popular TV shows, such as American Idol and Justified, to web and mobile viewers.
The Encoding.com Solution
Fox automated their workflow with the Encoding.com API by creating HLS outputs to produce the highest quality viewing experience. Utilizing HLS Pro, they produced over 12 streams per processed job from audio only 64K up to 4500k AVC. They also employed our closed captioning service and took advantage of our Nielsen integration to convert Nielsen audio (PCM) watermarks to ID3 tags for tracking views on iOS devices to augment their C+3 data. This in turn will lead to increased revenue for Fox by increasing the value of their rate card.
The Customer: Hurley
Hurley is a cutting-edge and trend setting clothing and accessories designer. Hurley is a lifestyle company influenced by surfing, fashion, skating, snow sports, music and art.The Challenge
Hurley recently launched their new iPhone application, U.S. Open of Surfing, including tons of longer and higher MB videos. With Apple’s new requirements for in-app videos, HLS was required which can be a complex task for any company.
The Encoding.com Solution
Encoding.com made the complex process of converting video to HTTP Live Streaming incredibly simple. Apple requires that videos be segmented into 10 second chunks with each segment encoded into four different bit rates. And, the lowest bit rate rendition must be audio only with still images. Hurley is able to leverage the Encoding.com iPhone Streaming preset to pull videos from their Rackspace cloud storage, encode into the Apple recommended multiple bit rates, and deliver the full package (encoded segments and .m3u8 stream instruction file) directly to their CDN for streaming.
Proprietary Segmenter
To
create the HLS segments, Apple released their media segmenter tool,
which breaks up your source content into segments required for HLS
delivery segments. It’s a great tool, but it’s only available on OSX.
Encoding.com quickly identified the need to have a segmenter tool that
could be easily integrated with their cloud encoding infrastructure
which runs on Linux not OSX. Because of this, we developed our own media
segmenter tool.
We’re now on v3 of our HLS Cloud Media Segmenter. With each release we’ve made significant improvements. Using Apple’s Media Stream Validator we generated the following results with the various versions of our media segmenter tool.V3 – This version, we call tsparser, we built in-house from the ground up to be optimized for our cloud infrastructure. This has significantly less overhead (5.8% with a 364kbps file or 3.8% with a 864kbps file), and does not generate any warnings.
We’re now on v3 of our HLS Cloud Media Segmenter. With each release we’ve made significant improvements. Using Apple’s Media Stream Validator we generated the following results with the various versions of our media segmenter tool.V3 – This version, we call tsparser, we built in-house from the ground up to be optimized for our cloud infrastructure. This has significantly less overhead (5.8% with a 364kbps file or 3.8% with a 864kbps file), and does not generate any warnings.
Audio in HLS
There
are a few ways to delivery audio with your HLS file: For low bandwidth
situations we do not use the standard libfaac. We use the HE-AACv2 in
low bandwidth situations which delivers higher audio quality at lower
bitrates.
Like video, audio quality adjusts based on available bandwidths. As mentioned HE-AACv2 is used in low bandwidth situations, and in higher bandwidth situations Dolby AC-3, and Dolby E-AC-3 which provides surround sound audio.In low bandwidth situations you have the option of providing a static image along with the audio stream when delivery video is not possible.
Like video, audio quality adjusts based on available bandwidths. As mentioned HE-AACv2 is used in low bandwidth situations, and in higher bandwidth situations Dolby AC-3, and Dolby E-AC-3 which provides surround sound audio.In low bandwidth situations you have the option of providing a static image along with the audio stream when delivery video is not possible.
Device Support
iOS, Android, OTT, BrowserAll iOS devices running 3.0 and later support HLS streaming formats. The table below shows suggested parameters for iOS devices.Closed Captioning
Encoding.com is the first and only encoding service to offer universal closed captioning support for delivery to all devices. The Encoding.com API makes it really simple to extract, inject, mux or copy closed captions of any kind for distribution to most mobile digital video platforms. HLS streaming supports the CEA608 standard for closed captioning, as well as the new HTML5 WebVTT standard for text video.Encryption
HLS content can be easily encrypted. Currently HLS supports AES-128 encryption using 16-octet keys. There are three ways in which encryption can be applied: using an existing key, using a randomly generated key, or using a new key that’s generated for every X number of video segments. The more video segments that have unique encryption, the greater the overhead and the less the performance. Keys can be served over SSL for an added layer of encryption.API
The best way to automate your encoding workflow is through the Encoding.com API.
We have XML templates for all popular devices, configured with optimal
settings for each device. Below is the the generic HLS template,
allowing complete control over your encoding parameters.
- <?xml version="1.0"?>
- <format>
- <output>advanced_hls</output>
- <stream>
- <!-- Video settings params -->
- <profile>[high|main|baseline]</profile>
- <!-- Audio settings params -->
- <!-- Other format params -->
- <!-- Closed Captions params -->
- <!-- Editing features params -->
- <still_image>[no|each_segment|first_segment]</still_image>
- <still_image_time>[Time]</still_image_time>
- <still_image_size>[Size]</still_image_size>
- <byte_range>[yes|no]</byte_range>
- <add_iframe_stream>[yes|no]</add_iframe_stream>
- <audio_only>[yes|no]</audio_only>
- <video_only>[yes|no]</video_only>
- <group_id>[GroupID]</group_id>
- <use_group_id>[CommaSeparatedList]</use_group_id>
- <playlist_version>[Valid EXT-X-VERSION]</playlist_version>
- </stream>
- <!-- Multiple stream params may be included in advanced_hls output format -->
- <!-- Maximum number of available streams is 15 -->
- <stream>
- <!-- stream params -->
- </stream>
- <!-- Main/alternate source fields -->
- <main_source>
- <type>[video_audio|video|audio]</type>
- <video_name>[Name]</video_name>
- <audio_name>[Name]</audio_name>
- <use_stream_id>[CommaSeparatedList]</use_stream_id>
- </main_source>
- <!-- multiple alternate_sources may be included -->
- <alternate_source>
- <source>[FileURL]</source>
- <type>[video_audio|video|audio]</type>
- <video_name>[Name]</video_name>
- <audio_name>[Name]</audio_name>
- <use_stream_id>[CommaSeparatedList]</use_stream_id>
- </alternate_source>
- <alternate_source>
- <!-- alternate_source params -->
- </alternate_source>
- <!-- Format fields -->
- <duration_precision>[Number]</duration_precision>
- <segment_duration>[Duration]</segment_duration>
- <pack_files>[yes|no]</pack_files>
- <pack_type>[tar|zip]</pack_type>
- <pack_each_stream>[yes|no]</pack_each_stream>
- <encryption>[yes|no]</encryption>
- <encryption_key>[128bit-key]</encryption_key>
- <encryption_key_file>[SourceURL]</encryption_key_file>
- <segmenter>[v1|v2|v3|dolby_segmenter]</segmenter>
- <playlist_version>[Valid EXT-X-VERSION]</playlist_version>
- <destination>[DestFile]</destination>
- <!-- Nielsen metadata settings -->
- </format>
Our Advanced HLS Support is also available through our UI
Browsers and Supported Features
While
Adaptive Streaming, specifically HTTP-Live-Streaming, has become the de
facto standard for on-demand delivery of video to mobile, tablet, and
OTT markets, it still lags behind when it comes to desktop browsers.
With the rise of HLS has come the need to secure these adaptive streams.
Media Source Extensions and Encrypted Media Extensions are APIs that
have been created to develop applications that support the encryption of
adaptive streams. While broad support exists for these extensions,
there are still limitations. Only recently has Apple released details
for their FairPlay DRM
scheme so support for iOS and AppleTV is just being seen in apps. ID3
tags which track viewship across devices are not supported by any
browser, necessitating a third-party player JWplayer.
Comments
Post a Comment