HLS (HTTP Live Streaming) is an emerging 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 emerging as a standard, and major players like Apple’s iOS & Google’s Android OS leading the way, Encoding.com wanted to provide 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 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, its technical specifications, device support, and many other variables.
TRY HLS ENCODING FOR FREE
HTTP Live Streaming History
Apple adopted the HLS standard in 2009 to solve the problem of delivering video to mobile devices over varying bandwidths. They developed a system using adaptive streaming which enables delivery of audio and video to supported devices from a standard http web server as opposed to a specialized streaming server.
Top Use Case Scenarios for HLS
If you are working on or looking to do any of the above, you should become acquainted with Apple’s HTTP Live Streaming. We’ve got all the information you’ll need to help you get started.
What is HTTP Live Streaming?
Apple’s HTTP Live Streaming (HLS) is a method for streaming audio and video over HTTP from an ordinary HTTP based web server. While HLS was initially developed for playback on iOS-based devices 3.0 and higher—including iPhone, iPad, iPod touch, and Apple TV—and on desktop computers (Safari on OS X), it’s use has expanded to OTT devices as well as other mobile and tablet devices.
HTTP Live Streaming supports both live broadcasts and prerecorded content (video on demand) and multiple alternate streams at different bit rates and resolutions. HLS allows for the client to dynamically switch between streams depending on bandwidth availability. HLS also provides for media encryption and user authentication over HTTPS, allowing publishers to protect their work. HLS is a step up from progressive downloading which just enables the playback of a video prior to completing the full download.TRY HLS ENCODING FOR FREE
The HLS Output File Structure and Codec
HLS 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. For more HLS details click here.
Device and OS Compatibility
Mobile/Tablets HLS Support
All iOS devices running 3.0 and later support HLS.. There are many other devices that also support HLS. *See below.
|iPhone 1 – 3GS||iPhone 4, iPad 1||iPhone 4S+, iPad 2-4,|
|Profile||Baseline Profile||Main Profile||High Profile|
|Level||Level 3.0||Level 3.1||Level 4.1|
|Audio||AAC audio, 1-2 channels||AAC audio, 1-2 channels||AAC-LC audio, 1-2 channels|
|Max Framerate||30 fps||30 fps||30 fps*|
|Video Bitrate||Up to 1.5 Mbps||Up to 5 Mbps||Up to 5 Mbps|
|Audio Bitrate||Up to 160 kbps||Up to 160 kbps||Up to 160 kbps|
|Audio Sample Rate||30 fps||30 fps||30 fps*|
|Max Framerate||48000 or less||48000 or less||48000 or less|
|Display Resolution||480×320||iPhone 4/4s: 960×640
iPad 1: 1024×768
|iPhone 5+: 1136×640
iPad 2: 1024×768
iPad 3/4: 2048×1536
*iPhone 5S now supports High Profile level 4.2, 60fps
HLS has limited support on devices running the Android operating system. Device support is not the same from one version or one device to the next. Android devices before 4.x (Gingerbread or Honeycomb), do not support HLS. Android tried to support HLS with Android 3.0, but excessive buffering often caused streams to crash. Devices running Android 4.x and above will support HLS, but there are still inconsistencies and problems.
|Audio||AAC-LC audio, 1-2 channels|
|Max Framerate||30 fps*|
|Video Bitrate||Up to 5 Mbps|
|Audio Bitrate||Up to 160 kbps|
|Audio Sample Rate||30 fps*|
|Max Framerate||48000 or less|
*Most new top-of-the-line Androids now support High Profile level 4.2, 60fps
See the attached article for reference from www.longtailvideo.com.
Desktop HLS Support
For desktop, Safari 6.0 and higher supports HLS on all devices. No other web browser has native support for HLS. Adobe also recently added full support for HLS its flash player to ensure customers have a more efficient way to distribute video to more devices, using one video format. Click here for more information. JW Player is a great option for delivering HLS content to the desktop. By embedding HLS support in their flash player, JW player can stream to any web browser that supports flash, thus overcoming Safari being the only browser to support HLS. To learn more about JW Player and HLS, check out this document. The latest version of the VLC desktop player also supports HLS.
OTT- Over-the-top Video Devices
Most current OTT devices support HLS. Like HLS, OTT devices prefer transmitting data over HTTP, which makes the two technologies a great fit as HLS is also delivered via HTTP. Some of the top OTT devices with support for HLS are as follows:
HLS 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 supports the CEA608 standard for closed captioning, as well as the new HTML5 WebVTT standard for text video.
HLS Encryption with Encoding.com
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 encyrption, the greater the overhead and the less the performance. Keys can be served over SSL for an added layer of encryption.
Encoding.com HLS Support
Encoding.com offers several methods for ingesting your content. Programmatically using the API, using a watch folder, using the web interface, or via a desktop uploader (OSX or PC).
The web interface is a great place to start testing the power of the encoding.com platform. All the settings required for optimized HLS content are at your fingertips in an easy to use interface.
Our new Desktop Uploader makes it easy for anyone to batch upload large source files and process them in parallel at a massive scale. Simply drag source files into the Encoding.com icon in your toolbar and your done! Customers with a Max plan or greater can even take advantage of our blazing fast Aspera servers.
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.
For more information on technical specifications click here.
There are several options for creating online watch folders. S/FTP, Amazon S3, Rackspace Files, Aspera, Microsoft Azure, and Dropbox can all be configured as watch folder locations. You can set the check frequency of your watch folder anywhere from 5 minutes to 1 day. When content is detected in your watch folder it is ingested by Encoding.com and ready for processing. Users can set the region for their watch folder so files are sent to the nearest entry point to Encoding.com.
HLS for iOS
Encoding.com makes encoding video to HLS for iPhone and iPad Streaming easy with our templates configured for every popular iOS device.TRY HLS ENCODING FOR FREE
Encryption of HLS with Encoding.com
Securing your iPhone streams is seamless with Encoding.com’s stream encryption option. We encrypt your TS segments using AES-128 with no need for an additional processing step. The encryption passes on delivery, as opposed to requiring additional processing time. Click here for a list of steps to get started.
New version of our HLS Segmenter
Encoding.com has recently released a new version of our HLS segmenter V2 for customer testing. The new version has lower overhead and increased reliability. The new version has been launched along with our existing V1 segmenter to avoid any disruptions to production HLS workflows. Please compare this HLS output and let us know what you think. Simply add <segmenter>v2</segmenter> to the “HLS” section of your API request.
HTTP Live Streaming Tips
By default, Encoding.com uses Apple’s recommended parameters as presets for segment size and frame rate, which are 10-second segments at 30fps. Additionally every HLS stream should include a static fallback image for very low bandwidth situations. Audio is always encoded with a 64k stream for all bandwidths and resolutions. By default Encoding.com uses Dolby HE-AAC because it produces the highest quality audio at the lowest bit rates.
Here are some additional tips when creating HLS content with Encoding.com:
*Pay particular attention to our Tar or not to Tar options below:
Encoding.com Success Stories
Our clients have had tremendous success encoding content to HLS. Here are just a few examples we’ll share…
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.
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: 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.
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.
More HLS Resources
For a great resource on HLS click here.