Delivering HLS Video

Product(s)
Video Cloud
Brightcove Player
Role(s)
Studio User
Player Developer
Topic(s)
Developer Concepts/Tools
Playback

In this topic, you will learn about HTTP Live Streaming (HLS), a HTTP-based media streaming protocol implemented by Apple.

Overview

The HLS protocol breaks the video into a sequence of small file downloads, each download loading one short chunk of the video using HTTP. As the stream is played, the client may select from a number of different alternate streams containing the same material encoded at a variety of data rates, allowing the streaming session to adapt to the available data rate. At the start of the streaming session, it downloads an extended playlist containing the metadata for the various sub-streams which are available.

Introduction

HLS has become a de-facto standard for streaming video on mobile devices thanks to its native support on iOS and Android. There are a number of benefits to delivering video using HLS:

  • Supports (client-driven) adaptive bitrate selection
  • Delivered over standard HTTP ports
  • Simple, text-based manifest format
  • No proprietary streaming servers required

Creating HLS

Video Cloud supports HLS as a video encoding option, along with H.264 (MP4) and H.263 (FLV). Ingest profiles determine the number and type of renditions that are created when videos are uploaded using the Dynamic Ingest API or Upload module. Depending on in the ingest profile that is used when uploading, HLS renditions may be created automatically as part of that profile. For more information on ingest profiles and the types of renditions that are created with each profile, see Standard Ingest Profiles.

Dynamic Ingest does support custom ingest profiles but at this time you cannot create your own custom profiles. If you need a custom profile, contact your Brightcove Solutions Engineer or Account Manager.

Once you have selected, or created, an ingest profile that includes one or more HLS renditions, then every time you upload a video, whether you use the Dynamic Ingest API or Upload module, the video will include HLS renditions along with any other multi-bitrate renditions that were specified as part of the profile.

Playing HLS

The Brightcove Player includes an HLS playback engine by default. If the video you provide to the player includes HLS renditions, it will play those before it tries MP4 because the default playback order is HLS, then HTML5, then Flash. If the browser supports HLS natively, it will use that capability (e.g. Safari on desktop or iOS). If the browser doesn't support HLS, but the browser has Flash installed, it will load the Flash fallback. You can change this behavior by changing the tech order of the player. For more information, see the Playback Technology Guide.

Video Cloud offers HLS encryption which lets you send encrypted video over HTTP for playback on devices running iOS. See Protecting Videos on iOS Devices with HLS Encryption for details.

The Brightcove Player tries to ensure the highest-quality viewing experience possible, given the available bandwidth and encodings. This doesn't always mean using the highest-bitrate rendition available. If the player is 300px by 150px, it would be a waste of bandwidth to download a 4K stream. By default, the player attempts to load the highest-bitrate variant that is less than the most recently detected segment bandwidth, with one condition: if there are multiple variants with dimensions greater than the current player size, it will only switch up one size greater than the current player size.

There are some limitations when using HLS on Android. For more information, see Limitations of HLS on Android.