• 8 November 2024
streaming

HTTP Live Streaming (HLS) is one of the widely used video streaming protocols. In the past, Adobe Flash video technology was the primary method of delivering video over the Internet, but in recent years, there has been a significant change in the world of online video. Today, the Adobe Flash protocol is widely replaced by protocols such as HLS streaming by HTML5 video players. This change is a very positive approach for both streamers and viewers.

HTML5 and HLS have open specifications, and users can change them based on their desires. In addition, these protocols are more secure, reliable, and much faster than previous technologies. This is why it has many benefits for content producers. In this post, we will discuss what HLS is, how it works and what you need it for.

What Is Streaming?

Streaming is a way of providing visual and audio content to users over the Internet. This is done by continuously sending the media file to the user’s device instead of sending it all simultaneously. The original file is executed on the origin server. In the case of live streaming, the image will be available in real time with a remote camera or microphone. This way, the video or audio can be played without the user’s device first downloading the entire file.

What Is HTTP?

HTTP is an application layer protocol for transferring information between devices connected to the network. Every website and application that is accessed by regular users runs on HTTP. Data transfer via HTTP is usually based on requests and responses.

With streaming over HTTP, the standard request-response pattern does not apply. The connection between the client and the server remains open for the duration of the stream, and the server sends video data to the client’s device so that the client does not have to request each piece of video data.

What Is HLS Protocol?

HLS protocol is one of the most widely used video streaming protocols that stands for HTTP Live or on-demand Streaming. This protocol splits video files into smaller, downloadable HTTP files and delivers them to the destination using the HTTP protocol. After loading, the user’s system also plays these HTTP files in video format. The data transfer protocol used in HLS is the TCP protocol.

The HLS protocol was initially developed by Apple to be used on the company’s products, but gradually it found widespread and universal application.

Key Benefits of HLS Streaming

Streaming content over HLS is highly beneficial to broadcasters and individuals who have never worked with live or on-demand video content before. It offers many advantages, making it one of the most popular streaming formats available today.

  • Broad Compatibility 

The main advantage of this protocol is its compatibility. Unlike other streaming formats, HLS is compatible with many devices and firewalls. The HLS streaming protocol is supported by a wide range of client applications, including iPhone, iPad, iPod Touch, Chrome Safari, and Microsoft Edge, as well as all Windows and Linux operating systems.

  • Encoding at Multiple Quality Settings

It has become widely accepted that the HLS video streaming standard is the best choice for live streaming due to its quality and versatility. The content creators can encode a single live feed at any quality level. This process allows viewers to select the most appropriate bandwidth option based on their internet quality at any given moment. Because of the differences in the capabilities of different streaming devices, the data quality varies from chunk to chunk. Multi-bitrate streaming can significantly improve your content’s viewing experience and increase the number of happy viewers.

For example, imagine you are sending a high-resolution video, but a few moments later, a mobile user encounters a “dead zone” in which the quality of service is negatively affected. If you stream in HLS, this isn’t an issue. The player will detect the decrease in bandwidth and deliver a lower-quality chunk of the movie.

HLS vs. Other Video Streaming Protocols

Various protocols have been developed over the years for multiple purposes. Here we will compare HLS with some of the most popular ones on the market.

HLS vs. RTMP

The RTMP protocol facilitates high-speed connections between dedicated streaming servers using Adobe Flash Player as part of Adobe’s streaming server portfolio. It was initially developed by Macromedia, but Adobe now owns the protocol. The protocol allows high-speed data, including audio and video, to be transmitted over the Internet using this technology.

RTMP streams media through the TCP or UDP protocols, whereas HLS streams media over the HTTP protocol. Although RTMP is no longer the industry standard for live video streaming, it is still utilized in the background and serves a purpose in the process. In fact, RTMP is the most popular ingestion protocol, whereas HLS is used for playback.

RTMP Technical Specifications

  • Audio Codecs: AAC, AAC-LC, HE-AAC+ v1 & v2, MP3, Speex
  • Video Codecs: H.264, VP8, VP6, Sorenson Spark®, Screen Video v1 & v2
  • Playback Compatibility: There is no longer wide support for this product
  • Benefits: Low latency and minimal buffering
  • Drawbacks: Neither the quality of the experience nor the scalability of it is optimized
  • Latency: 5 seconds
  • Variant Formats: RTMPT (tunneled through HTTP), RTMPE (encrypted), RTMPTE (tunneled and encrypted), RTMPS (encrypted over SSL), RTMFP (layered over UDP instead of TCP)

HLS vs. WebRTC

When it comes to HLS and its features, the worst part of the service is that it has a high latency. If you value low latency, then WebRTC is the best choice for you. The WebRTC (Web Real-Time Communication protocol) is a real-time communication protocol based on open-source code. It is supported by nearly all major browsers, including Safari, Google Chrome, Firefox, and Opera. Due to this support, the WebRTC standard will remain relevant for the foreseeable future and functional at all times.

The WebRTC video streaming technology allows viewers to feel like they are part of an interactive and engaging video streaming experience. It has a minimal delay of less than a half second, so there is no need to worry about lag.

WebRTC Technical Specifications

  • Audio Codecs: Opus, iSAC, iLBC
  • Video Codecs: H.264, H.265, VP8, VP9
  • Playback Compatibility: All browsers
  • Benefits: Real-time communication and browser-based
  • Drawbacks: Scalability problem without a media server like Ant Media Server
  • Latency: Sub-500-millisecond media delivery

HLS vs. CMAF

As a result of Apple and Microsoft’s proposals, a new uniform video format called the Common Media Application Format (CMAF) will be created to lower complexity when transmitting video over the internet.

The CMAF (Common Media Application Format) was designed to simplify the delivery of HTTP-based streaming media. Its objectives are to reduce costs, simplify distribution, and low-latency delivery of streamed content within three to five seconds.

CMAF streaming allows a single set of audio/video files to be streamed as fragmented MP4 files with very lightweight manifest files for all four adaptive bitrate formats. The result is that encoders and storage costs are cut by 75%, which means your caching becomes much more efficient.

CMAF Technical Specifications

  • Purpose: Reducing costs, complexity, and latency.
  • Goals: Because it is unnecessary to encrypt multiple copies of the same content, the cost of creating and storing copies is reduced.
  • Benefits: With a chunked encode and chunked transfer scheme, CMAF reduces video latency significantly.

HLS vs. RTSP

With Real-Time Streaming Protocol (RTSP), continuous media, including audio and video, can be streamed and controlled in real time. A constant media stream is rarely delivered directly by RTSP, but it is possible to interleave it with the control stream. Otherwise, it serves as a “network remote control” for multimedia servers. Using RTSP, users start a video stream from IP cameras by sending an RTSP request to the server. After establishing a connection between the IP camera and the server, video and audio can be transmitted.

RTSP Technical Specifications

  • Audio Codecs: AAC, AAC-LC, HE-AAC+ v1 & v2, MP3, Speex, Opus, Vorbis
  • Video Codecs: H.265 (preview), H.264, VP9, VP8
  • Playback Compatibility: There are not many players that support this format, and it is rarely used for playback (Quicktime Player and other RTSP/RTP-compliant players, VideoLAN VLC media player, 3Gpp-compatible mobile devices)
  • Benefits: The IP camera has low latency and is ubiquitous
  • Drawbacks: The quality of the user experience and the scalability of the system are not optimized
  • Latency: 2 seconds
  • Variant Formats: In RTSP, the entire stack of RTP, RTCP, and RTSP is referred to together as the RTSP stack

HLS vs. FLV

In recent years, Flash and its associated technologies, such as FLV, have undergone a great deal of change and are rapidly losing popularity among streaming providers and web browsers. Many streaming providers and web browsers are replacing Flash with HLS or making it available in parallel.

There is a slight speed improvement when using FLV, as it only requires a small buffer to play the stream while before any audio is played, HLS must load the playlist and three segments of the audio first.

Devices and Browsers Supporting HLS

HLS was initially limited to iOS devices such as the iPhone, iPad, and iPod touch but is now supported by almost all devices and browsers. Here we have listed many platforms that support HLS:

        • All Google browsers
        • Safari browser
        • Microsoft Edge
        • iOS devices
        • Android devices
        • Linux systems
        • Microsoft systems
        • macOS platforms

Therefore, we can say that HLS is a universal protocol.

Conclusion

The HLS streaming protocol offers numerous advantages over other streaming protocols, but it also has some disadvantages, particularly when used for live streaming. In selecting the appropriate protocol for streaming video content, it is necessary to consider the stream’s purpose.

Choosing HLS streaming is strongly recommended if you are mainly concerned with video quality. However, if you need interactive streaming without latency issues, you may need to choose another protocol.

If you want to know more about HLS streaming, visit ArvanCloud Video Platform and sign up for a free package of this product.