ArticleslgStudy

computer science

HTTP Live Streaming

HTTP Live Streaming is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand HTTP Live Streaming rather than just read about it. In short: HTTP Live Streaming (also known as HLS) is an HTTP-based adaptive bitrate streaming communications protocol developed by Apple Inc. and released in 2009. Support for the protocol is widespread in media players, web browsers, mobile devices, and streaming media servers.

Key takeaways

  • HTTP Live Streaming belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect HTTP Live Streaming to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of HTTP Live Streaming from memory before moving on to harder problems.

Reference excerpt

HTTP Live Streaming (also known as HLS) is an HTTP-based adaptive bitrate streaming communications protocol developed by Apple Inc. and released in 2009. Support for the protocol is widespread in media players, web browsers, mobile devices, and streaming media servers. As of 2022, an annual video industry survey has consistently found it to be the most popular streaming format. HLS resembles MPEG-DASH in that it works by breaking the overall stream into a sequence of small HTTP-based file downloads, each downloading one short chunk of an overall potentially unbounded transport stream. A list of available streams, encoded at different bit rates, is sent to the client using an extended M3U playlist. Based on standard HTTP transactions, HTTP Live Streaming can traverse any firewall or proxy server that lets through standard HTTP traffic, unlike UDP-based protocols such as RTP. This also allows content to be offered from conventional HTTP servers and delivered over widely available HTTP-based content delivery networks. The standard also includes a standard encryption mechanism and secure-key distribution using HTTPS, which together provide a simple DRM system. Later versions of the protocol also provide for trick-mode fast-forward and rewind and for integration of subtitles. Apple has documented HTTP Live Streaming as an Internet Draft (Individual Submission), the first stage in the process of publishing it as a Request for Comments (RFC). As of December 2015, the authors of that document have requested the RFC Independent Stream Editor (ISE) to publish the document as an informational (non-standard) RFC outside of the IETF consensus process. In August 2017, RFC 8216 was published to describe version 7 of the protocol.

Architecture HTTP Live Streaming uses a conventional web server, that implements support for HTTP Live Streaming (HLS), to distribute audiovisual content and requires specific software, such as OBS to fit the content into a proper format (codec) for transmission in real time over a network. The service architecture comprises:

Server Codify and encapsulate the input video flow in a proper format for the delivery. Then it is prepared for distribution by segmenting it into different files. In the process of intake, the video is encoded and segmented to generate video fragments and index file. Encoder: codify video files in H.264 format and audio in AAC, MP3, AC-3 or EAC-3. This is encapsulated by MPEG-2 Transport Stream (MPEG-TS) or MPEG-4 Part 14 (MP4) to carry it. Segmenter: divides the stream into fragments of equal length. It also creates an index file that contains references of the fragmented files, saved as .m3u8. Distributor Formed by a standard web server, accepts requests from clients and delivers all the resources (.m3u8 playlist file and .ts segment files) needed for streaming. Client Request and download all the files and resources, assembling them so that they can be presented to the user as a continuous flow video. The client software downloads first the index file through a URL and then the several media files available. The playback software assembles the sequence to allow continued display to the user.

Features HTTP Live Streaming provides mechanisms for players to adapt to unreliable network conditions without causing user-visible playback stalling. For example, on an unreliable wireless network, HLS allows the player to use a lower quality video, thus reducing bandwidth usage. HLS videos can be made highly available by providing multiple servers for the same video, allowing the player to swap seamlessly if one of the servers fails.

Adaptability To enable a player to adapt to the bandwidth of the network, the original video is encoded in several distinct quality levels. The server serves an index, called a master playlist, of these encodings, called variant streams. The player can then choose between the variant streams during playback, changing back and forth seamlessly as network conditions change.

Using fragmented MP4 At WWDC 2016 Apple announced the inclusion of byte-range addressing for fragmented MP4 files, or fMP4, allowing content to be played via HLS without the need to multiplex it into MPEG-2 Transport Stream. The industry considered this as a step towards compatibility between HLS and MPEG-DASH.

Low Latency HLS Two unrelated HLS extensions with a Low Latency name and corresponding acronym exist:

Apple Low Latency HLS (ALHLS) which was announced by Apple at WWDC2019 Community LHLS (LHLS) which predated Apple's publication and is allegedly simpler The remainder of this section describes Apple's ALHLS. It reduces the glass-to-glass delay when streaming via HLS by reducing the time to start live stream playbacks and maintain that time during a live-streaming event. It works by adding partial media segment files into the mix, much like MPEG-CMAF's fMP4. Unlike CMAF, ALHLS also supports partial MPEG-2 TS transport files. A partial media segment is a standard segment (e.g. 6 seconds) split into equal segments of less than a second (e.g. 200 milliseconds). The standard first segment is replaced by the series of partial segments. Subsequent segments are of the standard size. HTTP/2 is required to push the segments along with the playlist, reducing the overhead of establishing repeated HTTP/TCP connections. Other features include:

Playlist Delta Updates: only sending what changed between playlists, which typically fit in a single MTU making it more efficient to load the playlists which, with large DVR windows, can be quite large. Blocking of playlist reload: when requesting live media playlists, wait until the first segment is also ready, and return both at the same time (saving additional HTTP/TCP requests) Rendition Reports: add metadata to other media renditions to make switching between ABR faster New tags added: EXT-X-SERVER-CONTROL / EXT-X-PART / EXT-X-SKIP / EXT-X-RENDITION-REPORT URL QUERY_STRING ?_HLS callbacks added Apple also added new tools: tsrecompressor produces and encodes a continuous low latency stream of audio and video. The mediastreamsegmenter tool is now available in a low-latency version. It is an HLS segmenter that takes in a UDP/MPEG-TS stream from tsrecompressor and generates a media playlist, including the new tags above. Support for low-latency HLS is available in tvOS 13 beta, and iOS & iPadOS 14. On April 30, 2020, Apple added the low latency specifications to the second edition of the main HLS specification.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with HTTP Live Streaming

Start with the simplest possible case. Write down what HTTP Live Streaming claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to HTTP Live Streaming before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about HTTP Live Streaming ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of HTTP Live Streaming

In research
HTTP Live Streaming appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses HTTP Live Streaming in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
HTTP Live Streaming is common in secondary-school and first-year university syllabi. It links to neighbouring topics Hypertext Transfer Protocol, Multimedia, Network protocols, so understanding it makes those chapters shorter.
In everyday life
Look for HTTP Live Streaming outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “HTTP Live Streaming” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study HTTP Live Streaming in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what HTTP Live Streaming means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain HTTP Live Streaming out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is HTTP Live Streaming in simple terms?

HTTP Live Streaming (also known as HLS) is an HTTP-based adaptive bitrate streaming communications protocol developed by Apple Inc. and released in 2009. Support for the protocol is widespread in media players, web browsers, mobile devices, and streaming media servers.

Why does HTTP Live Streaming matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study HTTP Live Streaming?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on HTTP Live Streaming.

Tags

  • Hypertext Transfer Protocol
  • Multimedia
  • Network protocols
  • QuickTime
  • Streaming media systems

Keep exploring