Deep Dive into HLS: Why This 'Ancient' Protocol Still Rules the Streaming World in 2025
Discover why HLS still rules streaming in 2025. Deep dive into m3u8 architecture, fMP4 evolution, and engineering best practices for robust video delivery.

Let’s be honest.
In the world of streaming technology, everyone loves talking about those shiny new toys. WebRTC, QUIC, ultra-low latency… they all sound cool.
But the fact is: the cornerstone supporting the entire internet video traffic (yes, including the Netflix and YouTube you watch every day) is still that seemingly ‘clunky’ HLS (HTTP Live Streaming).
I made the same mistake. I thought HLS was “last generation” technology, a product of the 2009 iPhone 3GS era. I thought it was too slow, too simple, not “geek” enough.
I was wrong.
After diving deep into modern streaming architecture and being “educated” by real-world failures in production environments, I came to a conclusion: HLS’s “simplicity” is exactly why it rules the world.
If you want to build a video application capable of handling millions of concurrent users, traversing any firewall, and remaining smooth even in poor network conditions, you don’t need to invent a new protocol.
What you need is to truly understand HLS.
Today, let’s uncover the secrets behind the .m3u8 suffix.
Myth 1: Streaming Must Be a “Stream”
Many beginners think video transmission is like turning on a tap, with water (data) flowing continuously to the client. That’s what RTMP does.
But the genius of HLS lies in this: it turns “streams” into “files”.

HLS doesn’t establish persistent long connections. It cuts infinite video into short, static files (originally .ts, now more commonly .m4s).
This brings a huge, often overlooked advantage: CDN Affinity.
If you can cache an image, you can cache an HLS video segment.
You don’t need expensive, complex dedicated streaming servers. You just need a standard Web server (Nginx/Apache) and a regular CDN. This is why HLS can achieve global distribution at extremely low cost.
Engineering Insight: Stop thinking about building your own streaming service. Leveraging existing HTTP infrastructure is the smartest architectural choice.
Key Evolution: Why You Should Ditch MPEG-2 TS?
For a long time, HLS and .ts files were bound together. MPEG-2 TS is a product of the digital TV era, and it has strong fault tolerance.
But in 2025, if you are still using TS, you are wasting bandwidth and performance.
The current industry standard is fMP4 (Fragmented MP4).
Why?
- Lower Overhead: TS has a 4-byte header for every 188 bytes, which is pure waste in HTTP transmission. fMP4 structure is more compact.
- Native Browser Support: This is the killer feature. Modern browsers natively support fMP4 via the MSE (Media Source Extensions) API. Playing TS requires “transmuxing” using JS (like hls.js), which consumes a lot of CPU, especially on low-end phones.
- Ecosystem Unification (CMAF): With fMP4, you can use the same set of segment files to serve both HLS (iOS) and DASH (Android). Encode once, play everywhere.
Action Guide: Check your transcoding workflow. If you are still generating .ts, it’s time to switch to fMP4.
Core Magic: The Game Theory of ABR Algorithms
The most fascinating part of HLS is how the client decides “what quality to watch in the next second”. This is Adaptive Bitrate (ABR).
Early players were dumb. They only looked at download speed.
- Speed 5Mbps -> Request 1080p.
- Speed suddenly jitters -> Immediately switch back to 360p.
The result is a picture that fluctuates between clear and blurry, providing a terrible user experience.
Modern players (like hls.js) have become smarter. They introduced the BOLA (Buffer Occupancy based Lyapunov Algorithm) algorithm.
Sounds very mathematical? The logic is actually simple: As long as I have enough video in my buffer (say 30 seconds), even if the speed suddenly drops now, I don’t panic and continue loading high quality.

It’s like a reservoir. As long as there is enough water in the pool, it doesn’t matter if the inlet pipe is a bit slow.
Pitfall Guide: Ensure your server provides a reasonable “Encoding Ladder”. If 1080p requires 5M bandwidth, and the next tier drops directly to 480p at 1M bandwidth, the huge gap in between will make users with 3M bandwidth very awkward.
Engineering Practice: The “Pits” That Will Drive You Crazy
Theory is perfect, but reality is harsh. Deploying HLS in production, you will definitely encounter these three demons.

1. The Nightmare of Cross-Origin Resource Sharing (CORS)
Phenomenon: Works perfectly in local debugging, but black screen once deployed to CDN. Console full of red text.
Reason: HLS players essentially use JS to request files. Browsers forbid cross-origin requests.
Solution: Don’t be lazy. Add Access-Control-Allow-Origin: * to your S3 or Nginx response headers. And, make sure to handle OPTIONS preflight requests properly.
2. The Trap of Caching Configuration
Phenomenon: The live stream suddenly “travels” back to a few minutes ago, or the live stream has ended but users are still watching.
Reason: You cached the .m3u8 index file for too long.
Truth:
- TS/m4s Segments: These are static and never change. Caching for 1 year is fine (
max-age=31536000). - Live M3U8 Index: This is a dynamically updated list. Cache time must not exceed half the segment duration, or just use
no-cache.
3. The “Discontinuity” Bomb
Phenomenon: After inserting an ad, the picture freezes, and audio/video are out of sync.
Reason: The timestamp (PTS) of the ad segment doesn’t match the main content. The decoder sees the timestamp suddenly jump from 1000s to 0s and crashes.
Solution: You must explicitly insert the #EXT-X-DISCONTINUITY tag in the M3U8. This tells the player: “Attention, the timestamp is about to reset, get ready.”
Conclusion: Embracing HLS is Embracing the Future
HLS hasn’t aged; it is evolving.
With the maturity of LL-HLS (Low Latency HLS), HLS is conquering its last weakness—latency. Modern HLS can now compress live latency to the second level.
So, don’t underestimate HLS just because it’s an “old protocol”. It is the Swiss Army Knife of streaming architecture—simple, reliable, and ubiquitous.
If you want to become an expert in video engineering, please stop chasing those ethereal new concepts.
Calm down and read RFC 8216 thoroughly.
When you truly understand every line of text in .m3u8, you hold the key to the future of the streaming world.
Found this article useful? Welcome to share the HLS pitfalls you encountered in the comments below, or subscribe to my blog for more hardcore technical insights.