What is HTTP Live Streaming?
HTTP Live Streaming (HLS) is a technology, developed by Apple, for streaming live and on-demand video. Although HLS was initially developed for delivering video content to iOS devices, it has since been extended to support other devices as well. HLS uses the HTTP protocol which enables users to stream media from their regular web server instead of using a specialized streaming server.
HLS is adaptive in that the video quality is adjusted for a user based on their bandwidth capacity. This is beneficial primarily for users who don’t have a strong internet connection. These users would then be delivered a lower quality version of video which allows them to continue watching without waiting for the video to buffer.
How HLS Works
HLS works by splitting live streams into smaller HTTP-based files. The manifest file (file with a .m3u8 extension) contains multimedia playlists and references to the actual video fragments called TS files. Multiple playlists are created for the various devices and differing bandwidth connections that access the stream.
HLS File Structure Src: encoding.com
HLS offers many useful features that make it a popular choice in streaming live and prerecorded video. According to the Mac Developer Library the following outlines what HTTP Live Streaming offers in terms of usability, customization, and security.
- Fast Forward and Reverse Playback: Both fast forward and reverse are supported in HLS with the use of an I-frame playlist.
- Content Protection: By using sample-level encryption, media segments can be individually encrypted offering greater security.
- Ad Insertion: The ability to insert ads is available in HLS through the use of discontinuity markers.
- Closed Captions and Subtitles: HLS supports the use of closed captions embedded in the MPEG-2 transport stream and subtitles in WebVTT format.
- Alternate Audio and Video Renditions: The use of multiple audio renditions (e.g French, Spanish, German language soundtracks) and video renditions (e.g different angles for a sporting event) are both supported.
- Fallback and Stream Alternatives: The alternative media playlists serve to deliver different quality content to different users and devices but also serves as a fallback in case of failure. In the event a playlist isn’t able to load, the player will attempt to serve an identical playlist from another server.
- Timed Meta data: Whether you want to insert album art to an audio stream or a player’s name to a sports game stream, timed meta data allows HLS users to do so.
Difference Between Live Streaming and On-Demand Streaming
Contrary to what the name implies, HTTP Live Streaming is suitable for streaming both live and on-demand videos. Live streaming means the video is being recorded in real-time and the viewer must watch the broadcast as it is streaming, otherwise they will only be able to view it if it is release later on-demand. On-demand streaming is the streaming of prerecorded video allowing users to re-watch the video as many time as they would like.
Live streaming has made some great advancements in the past few years as far as accessibility, usability, security, and configuration abilities. HTTP Live Streaming plays a big part in these advancements especially for mobile devices as it allows for these devices to access live media efficiently and seamlessly. With 80% of Internet users owning a smartphone, using HLS to stream live content can be beneficial for both you and your viewers.