HTTP Live Streaming An Emerging Standard in Adaptive Bitrate Video

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.
HLS streaming format

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 content

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.
Our clients have had tremendous success encoding content to HLS. Here are just a few examples:

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.

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.

HLS Pro

This table demonstrates suggested parameters for creating multiple HLS streams that deliver an optimized experience to the broadest range of devices.

Apple TV Parameters

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.
  1. <?xml version="1.0"?>
  2. <format>
  3. <output>advanced_hls</output>
  4. <stream>
  5. <!-- Video settings params -->
  6. <profile>[high|main|baseline]</profile>
  7. <!-- Audio settings params -->
  8. <!-- Other format params -->
  9. <!-- Closed Captions params -->
  10. <!-- Editing features params -->
  11. <still_image>[no|each_segment|first_segment]</still_image>
  12. <still_image_time>[Time]</still_image_time>
  13. <still_image_size>[Size]</still_image_size>
  14. <byte_range>[yes|no]</byte_range>
  15. <add_iframe_stream>[yes|no]</add_iframe_stream>
  16. <audio_only>[yes|no]</audio_only>
  17. <video_only>[yes|no]</video_only>
  18. <group_id>[GroupID]</group_id>
  19. <use_group_id>[CommaSeparatedList]</use_group_id>
  20. <playlist_version>[Valid EXT-X-VERSION]</playlist_version>
  21. </stream>
  22. <!-- Multiple stream params may be included in advanced_hls output format -->
  23. <!-- Maximum number of available streams is 15 -->
  24. <stream>
  25. <!-- stream params -->
  26. </stream>
  27. <!-- Main/alternate source fields -->
  28. <main_source>
  29. <type>[video_audio|video|audio]</type>
  30. <video_name>[Name]</video_name>
  31. <audio_name>[Name]</audio_name>
  32. <use_stream_id>[CommaSeparatedList]</use_stream_id>
  33. </main_source>
  34. <!-- multiple alternate_sources may be included -->
  35. <alternate_source>
  36. <source>[FileURL]</source>
  37. <type>[video_audio|video|audio]</type>
  38. <video_name>[Name]</video_name>
  39. <audio_name>[Name]</audio_name>
  40. <use_stream_id>[CommaSeparatedList]</use_stream_id>
  41. </alternate_source>
  42. <alternate_source>
  43. <!-- alternate_source params -->
  44. </alternate_source>
  45. <!-- Format fields -->
  46. <duration_precision>[Number]</duration_precision>
  47. <segment_duration>[Duration]</segment_duration>
  48. <pack_files>[yes|no]</pack_files>
  49. <pack_type>[tar|zip]</pack_type>
  50. <pack_each_stream>[yes|no]</pack_each_stream>
  51. <encryption>[yes|no]</encryption>
  52. <encryption_key>[128bit-key]</encryption_key>
  53. <encryption_key_file>[SourceURL]</encryption_key_file>
  54. <segmenter>[v1|v2|v3|dolby_segmenter]</segmenter>
  55. <playlist_version>[Valid EXT-X-VERSION]</playlist_version>
  56. <destination>[DestFile]</destination>
  57. <!-- Nielsen metadata settings -->
  58. </format>

Our Advanced HLS Support is also available through our UI

HTTP Live video streaming

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