What is HTTP-FLV and Why It Is Gaining Popularity Over HLS

In the dynamic landscape of streaming media, selecting the optimal protocol is key to delivering a seamless viewing experience. Among the array of available protocols, HTTP-FLV (Flash Video over HTTP) is making waves and gaining traction over the more established HLS (HTTP Live Streaming). This blog explores HTTP-FLV, delving into its features, performance, and the reasons behind its rising popularity compared to HLS.

Introduction to Streaming Protocols: The Basics You Need to Know

If you are a media professional, you might be familiar with HLS (HTTP Live Streaming) due to its widespread adoption across Apple’s ecosystem. HLS is one of the leading standards for streaming online video and audio media to viewers over the internet. According to Bird.tv, HLS ranks at the top in the current global usage of streaming protocols.

However, with the ongoing advancements in network technology and the increasing demand for high-quality live broadcasts, the ranking of these protocols is subject to change. For example, HTTP-FLV is a streaming protocol that is often overlooked. A compelling fact is that many media giants, including but not limited to Douyin, TikTok, etc., are adopting HTTP-FLV for its ultra-low latency experience, which is crucial for interactive entertainment segments.

To better understand why this shift is happening, we need to delve into the key differences between HTTP-FLV and HLS in terms of enhancing live streaming quality.

What Is HLS (HTTP Live Streaming)?

HLS, or HTTP Live Streaming, is a protocol developed by Apple and introduced in 2009. It was created to replace QuickTime Streaming Server and to address some limitations of existing protocols like RTMP. HLS has since become the most widely adopted standard for adaptive bitrate video streaming, offering a reliable and seamless viewing experience by adapting to varying network conditions and ensuring cross-device compatibility.
HLS was born out of the need to address the performance issues caused by the available internet speeds at the time. This necessitated a protocol with high reliability and compatibility with diverse network and device conditions. To achieve this, HLS modified the live streaming process by utilizing short connections to transmit video content.

Simply put, HLS works by segmenting the content into smaller parts and then creating requests for each segment, which are then played sequentially. To prevent large segments from causing long transmission times, HLS further slices these segments into smaller chunks, which are then packaged into a playlist file (in M3U8 format) and sent to the client for parsing. The client uses the playlist to request and play the individual chunks.
Once all the TS files (transport stream segments) packaged in the M3U8 file are transmitted, the server continues to slice the upcoming media content, package it, and wait for the client to request the new media content.
Aside from the reliability and adaptability brought by short connections, HLS, as a widely adopted standard for adaptive bitrate video streaming, also excels in cross-device compatibility and scalability.

  • Cross-device compatibility – HLS guarantees that your content can be played on every client device that runs a compatible video player (e.g. HTML5). That means HLS is supported on a wide range of devices, including iOS, Android, smart TVs, and most web browsers. This broad compatibility makes it a versatile choice for streaming.
  • Scalability – HLS works over standard HTTP servers and can easily integrate with Content Delivery Networks (CDNs) to distribute content globally, accommodating viral viewership spikes and large live audiences.

Despite the advantages that short connections bring to HLS, there are still some drawbacks associated with this approach. Due to the chunks or segments typically being 2-6 seconds long and the need to buffer several such small segments at a time, latency can ultimately reach dozens of seconds. This is where a new connection method comes into play: persistent connections.

What Is HTTP-FLV?

HTTP-FLV transmission involves establishing a connection once and then maintaining it, during which the server continuously sends small-sized files to the client. This process continues until either the client or the server disconnects. HTTP-FLV live streaming protocol leverages the small size of FLV files to transmit video content through an uninterrupted network connection, ensuring that the client always has content to play.

In essence, HTTP-FLV is designed to offer low-latency streaming, making it ideal for real-time applications where delay is a critical factor. This is particularly important for live events, online gaming, and interactive streams where immediate feedback is crucial.
However, latency is not the only factor in live streaming. The ultimate user experience in live streaming is determined by three key metrics: initial load time, latency, and buffering. Therefore, we will focus on comparing how these two different live streaming protocols affect these three aspects.

Performance Comparison Between HLS and HTTP-FLV in Live Streaming

Before diving into the comparison, let’s define a few key factors that significantly impact the user experience during live streaming:
Initial Load Time: The time it takes for the first frame of video to appear on the client’s screen after requesting the live stream. Reducing this time enhances the user experience by minimizing waiting time.
Latency: The delay between the live event’s actual occurrence and its display on the client’s screen. In other words, it’s the time difference between when the content is captured and when it is viewed by the audience. Lower latency is crucial for real-time interactions.
Buffering: The interruptions or pauses in the playback due to the client running out of buffered content. The frequency and duration of these interruptions are critical indicators of streaming quality.
Now, let’s compare HLS and HTTP-FLV based on these factors:

Initial Load Time

HLS: Due to its segmented nature, HLS requires the client to download and buffer several segments before playback can begin. This can result in longer initial load times, especially in low bandwidth scenarios. Typically, if any errors occur during the request, initial buffering and delays might happen.

HTTP-FLV: HTTP-FLV only requires establishing a single connection with the server, after which the server continuously sends content to the client. The client only needs to receive and play the content without repeatedly sending requests to the server. This allows for a faster initial load time as the client starts receiving and playing video almost immediately after the connection is established.

Latency

HLS: At the transport layer, HLS requires the video to be segmented and packaged. After packaging is completed, two additional requests are needed to receive the actual video content for playback. Although HLS has been optimized to reduce initial frame time, the intrinsic double request mechanism still cannot match the single request time of HTTP-FLV.

HTTP-FLV: With HTTP-FLV, a single connection is established and maintained, allowing the server to continuously stream video content to the client. This persistent connection significantly reduces latency, making it ideal for real-time broadcasting where immediate feedback is crucial.

Buffering

HLS: The process of segmenting and packaging the video content inherently requires additional time. During the transmission phase, each segment (typically 2-3 segment times) needs to be processed and packaged. Furthermore, the client must first receive the M3U8 playlist before requesting TS segments. Additionally, on the CDN layer, the M3U8 file needs to be cached, adding extra time overhead. Overall, HLS incurs additional transmission and caching time to process and send live content.

HTTP-FLV: Due to the small file size of FLV and the single persistent network connection, HTTP-FLV only requires the latency of a single connection as the time overhead for transmission. This allows for video content to be transmitted within the minimal possible transmission time.

Analyzing the key metrics that influence the overall user experience, it becomes evident that HLS’s early transmission logic is somewhat outdated and incurs high time costs during the transmission process. HTTP-FLV outperforms HLS across all three metrics: initial load time, latency, and buffering.

Preconditions and Limitations of HTTP-FLV’s Advantages

While HTTP-FLV achieves a clear advantage in live streaming experience, it does come with certain prerequisites and limitations:

  • CDN Architecture Modification: HTTP-FLV is not natively supported over HTTP by many CDNs, requiring modifications to the CDN architecture to ensure optimal performance. For example, CDNetworks has already made such architectural adjustments.
  • Cross-Device Compatibility: HTTP-FLV does not offer as robust cross-device compatibility as HLS. While it excels in reducing latency, this benefit comes at the cost of limited device support. However, the low latency of HTTP-FLV provides new opportunities for user retention and profitability, particularly in applications where immediate feedback enhances the user experience.

But you have to admit, despite these limitations, the low latency offered by HTTP-FLV makes it highly popular in entertainment live streaming scenarios, where minimal delay is crucial for viewer engagement.

Future Trends in Streaming Protocols

The increasing demand for real-time interaction and immediate feedback in live streaming is driving the continuous evolution of low-latency protocols. HTTP-FLV, with its persistent connection mechanism, is already a strong contender.

However, it’s important to note that the two protocols we discussed today are just a subset of the low-latency protocols supported by CDNetworks. For media companies requiring event-grade low-latency live streaming technology, CDNetworks’ Low Latency Streaming Solution, which utilizes WebRTC, may be a superior choice. On the other hand, when it comes to the OTT industry, HLS’s cross-device compatibility offers a significant advantage.

This underscores a crucial point: there is no “best” protocol, only the one that best fits your specific needs. Balancing cost and benefit, as well as corporate branding and user experience, is key to selecting the most suitable protocol.
Regardless, choosing a reliable and robust streaming service provider is the most convenient option for the media industry. Take CDNetworks, for example. Beyond supporting a wide range of live protocols, CDNetworks boasts over 2,800 CDN PoPs (Points of Presence) globally, exceptional performance, and stellar customer service. These attributes make CDNetworks a compelling long-term partner for media companies aiming to maintain their competitive edge in the market.
Through this in-depth analysis, we have explored the applications, advantages, and disadvantages of HTTP-FLV and HLS in the streaming media field, helping you better understand and choose the streaming protocol that suits your needs. Hopefully, this blog has provided valuable insights. If there are any further questions or a need for additional discussion, please feel free to contact us.