Search code examples
streamingaudio-streaminghttp-live-streaming

Live streaming or on Demand content (HLS, HTTP Range Requests)


I'm trying to deal with streaming (or rather Audio on Demand) in browsers and mobile applications. Some questions arise that are not very successful in finding a concrete answer. Maybe someone will tell me.

  1. What is the feature of HLS and is it needed in the case of Audio on Demand?
  2. What is HLS for if there is an HTTP Range Requests specification?
  3. Or does HLS use HTTP Range Requests internally?

Thanks for answers!


Solution

    1. It depends: HLS is not always needed for streaming audio on demand. HLS enables you to have multiple quality levels (different bitrates) of the same content. For example on a metered cellular connection you may want to use low bandwidth (like AAC HEv2 at 32 kBits/s). For WiFi or wired unlimited connections you may to stream with 256 kBits/s. With HLS you can stick all your different quality levels into one package.

    2. Normally for HLS on demand you would create one file per quality level and the HLS playlist would tell you the byte offset and length were to find the chunks - so that you can seek. Your client would read the playlist - get the offset and length of the chunk to read and then perform a HTTP range request. So single file HLS streams go together with HTTP range requests.

    3. HTTP range request must be supported by the HTTP server hosting the single file HLS streams and the client/player must execute range request. So - yes - HTTP range requests are part of the system.

    If the HLS streams are stored in lot's of little chunks - more common for live streaming - HTTP range requests are not used.