Apple HTTP Live Streaming HLS

Apple HTTP Live Streaming HLS

Apple HTTP Live Streaming (HLS) is a widely used adaptive HTTP streaming protocol available as IETF Internet Draft. It is mainly targeted towards mobile devices based on iOS like iPhone, iPad or AppleTV, as well as to OS X desktop computers. Apple’s Internet browser Safari also accepts HLS streams as the source of the HTML5 <Video> tag, unfortunately this only works on Apple systems as well. The lack of broad native platform support is one of the main disadvantages of HLS nowadays, but there are many companies spending much work on implementing clients as well as integrating HLS into other platforms and streaming servers. In contrast to the other (MPEG-DASH, Smooth Streaming), Apple HLS was especially designed for mobile environments and can request several segments together to make effective use of the Internet connection. This means that it could request more than one media segment by one HTTP 1.1 GET request, which is comparable to the pipelining feature of HTTP 1.1 and therefore eliminates unnecessary RTTs of several segment requests. These features definitely lead to a more efficient use of the connection.

FILE FORMATS

Apple HTTP Live Streaming (HLS) uses M3U8 playlists as a manifest file for their content files, which is an extension of the M3U format used for MP3 playlists. HLS is the only system that uses MPEG-2 Transport Stream (MP2TS) which adds a significant overhead in relation to the audio/video data, instead of MP4 or another ISO Base Media File Format based container. MPEG-2 TS consists of packets with 188 bytes in size, where each packet has headers with a varying size of 4 to 12 bytes. Therefore, they overhead caused by these headers increases proportionally with the segment size, which means that relative overhead does not tend to zero with increasing bitrates. Moreover, each MPEG-2 TS stream consists of several other data beside audio and video, such as Program Association Tables that introduce additional overhead. Additionally, audio and video streams are encapsulated in Packetized Elementary Streams (PES) which introduces an extra overhead per audio sample or video frame.

MANIFEST – M3U8

Apple HTTP Live Streaming (HLS) uses an M3U8 playlist as its manifest, which is a little bit different to the other approaches, e.g., MPEG-DASH or Microsoft Smooth Streaming that use an XML based manifest. VOD content with one quality can be described through the basic playlist feature, which means that the individual segments URLs are available in the main M3U8. If you want to offer multiple qualities as intended with adaptive multimedia streaming, you will have to use the variant playlist. Typically a variant of a stream is quality of the stream in a specific bitrate and/or resolution. Variant playlists are structured in the following that there is one root M3U8 that references other M3U8s that describe the individual variants (qualities). The root M3U8 will then contain several EXT-X-STREAM-INF tags that indicate that the following URL is referencing another M3U8 playlist. Additionally, the EXT-X-STREAM-INF tag could contain several attributes such as bandwidth, codec, etc. Advertisements are supported in HLS through the EXT-X-DISCONTINUITY tag. This tag indicates an discontinuity in the media stream between the actual media segment and the one that follows. Furthermore, a basic encryption method is also available that allows AES-128 encryption of the media segments. The key server can be signaled in the M3U8 with the EXT-X-KEY tag and the URI attribute.

Alex Zambelli

Sr. Platform Manager at Dolby Laboratories

9 å¹´

"Apple HLS was especially designed for mobile environments and can request several segments together to make effective use of the Internet connection." What you're describing sounds more like a property of the client implementation rather than the standard though. What exactly is stopping a DASH or Smooth client from opening a persistent HTTP connection and making multiple fragment requests over the same connection?

Dwight Burchak

Video, OTT and IT professional. My skill set is at the intersection of video, OTT and IT.

9 å¹´

Good description Gerald. As Vitaliy below says, can you give examples of the manifests? Also point out for the purposes of manifest manipulation which segments in the M3U8 manifest represent the ad source and which represent the DRM? You have pointed out the AES128 but I am curious if you can use manifest manipulation to dynamically change the DRM?

赞
回复
Vitaliy Borodin

Experienced CPO and entrepreneur with rich experience in product management, marketing and engineering. Four big successful products from scratch and many knowledge and skills that I learned from my wins and faults

9 å¹´

Gerald, nice post! Each part on his own place. I think a some examples will be useful to a complete view of the article's subject.

赞
回复

要查看或添加评论,请登录

Gerald Zankl的更多文章

社区洞察