Was it helpful?

Solution

It is not faster. The point of HLS is that it dynamically adapts to the available network bandwidth. Automatically switching to a lower quality video stream when the download speed is reduced. You get to keep watching the movie without the annoying spinner.

HLS is a version of the generic Adaptive bitrate streaming protocol. There are several competing implementations, they all work the same way but have incompatible details:

  • HLS is Apple's HTTP Live Streaming protocol
  • HDS is Adobe's HTTP Dynamic Streaming
  • Microsoft's version is Microsoft Smooth Streaming
  • DASH is an industry standard, Dynamic Adaptive Streaming over HTTP. The standard to replace them all, thus adding a 4th standard.

The principle behind it is very simple. The content provider generates a handful of different encodings of the source material with different quality settings. Split up into segments, each several seconds worth of video. And a manifest that describes these streams and segments, a simple XML file.

The client video player first downloads the manifest and starts downloading the first segment of the lowest quality encoding. Playback starts almost immediately. The player keeps downloading segments one by one and monitors how quickly it can get them. If throughput is good then it switches to a higher quality encoding. And conversely, when the player is in danger of running behind then it switches to a lower quality. Thus dynamically adapting to changing network load.

OTHER TIPS

In terms of performance RTP/UDP streaming is far better but there is no guarantee that it will get transported through the internet via routers/nat boxes, proxies, etc.

HLS on the other hand is built on top of HTTP which is kind of ubiquitous. The chance of receiving video streams over HTTP is higher than RTSP/RTP, RTMP and so on.

In terms of performance - HLS has overheads due to the IP/TCP/HTTP/HLS stacking. Those overheads were in my tests somewhere between 12-20%.

So, if you can control the network end-to-end I suggest using RTP/UDP. Otherwise HLS is a safer choice.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top