M3U8 Evolution: From HLS/TS to Low-Latency CMAF
For every video developer, HLS (HTTP Live Streaming) is not only one of the most frequently encountered streaming protocols in daily work, but also a history of technological evolution that constantly reinvents itself and drives the industry forward. It has evolved from a simple solution initially supporting only .ts segments to a powerful protocol that supports HEVC and fMP4, and ultimately embraces low-latency CMAF.
This article will follow this path of technological evolution to deeply analyze the technical breakthroughs of HLS at key nodes, the core value it brings to developers, and provide a practical developer resource library to help you navigate with ease in practice.
Chapter 1: The Founding Era (2009) - The Revolutionary Combination of HTTP and TS Streams
- Milestone Event: In 2009, Apple released HLS alongside iPhone 3.0, aiming to solve the difficulties of mobile streaming playback.
- Core Tech Stack:
- Container: MPEG-2 Transport Stream (
.ts). - Encoding: H.264 (AVC) + AAC.
- Protocol: Based on HTTP, using
.m3u8playlists to index.tssegments. - Adaptive Bitrate (ABR): Basic multi-bitrate switching capability.
- Container: MPEG-2 Transport Stream (
- Developer Benefits:
- Penetrability: Being HTTP-based, it easily traverses firewalls and NATs, solving the deployment challenges faced by traditional protocols like RTSP in complex network environments.
- CDN Friendly: It can directly leverage existing mature HTTP CDN networks for distribution, significantly lowering the barrier and cost of streaming services.
- High Reliability: The stability and widespread support of HTTP ensure transmission reliability; network jitters can be recovered simply by retrying the request.
During this phase, HLS established the core architecture of “Segment + Index,” laying a solid foundation for all subsequent evolution.
Chapter 2: Standardization and Feature Expansion (2010-2016) - Moving Towards an Open Ecosystem
- Milestone Event: HLS’s influence transcended the Apple ecosystem, officially becoming the IETF international standard RFC 8216 in 2017.
- Key Improvements:
- Playlist Enhancements:
m3u8files introduced the#EXT-X-MEDIAtag, supporting multiple audio tracks, subtitles, and alternative video streams. - I-Frame Playlists: Through
#EXT-X-I-FRAMES-ONLY, enabling precise video scrubbing and fast previewing. - Encryption Standardization: Clarified the AES-128 encryption scheme, providing a foundation for content protection.
- Playlist Enhancements:
- Developer Benefits:
- Cross-Platform Interoperability: Standardization meant Android, smart TVs, and other platforms fully embraced HLS. Developers could serve almost all mainstream devices with a single solution, saying goodbye to tedious multi-platform adaptation.
- Enriched Experience: Easily implementing features like multi-language audio track switching and subtitle loading, providing technical support for building globalized applications.
- Basic Security: AES-128 provided an easy-to-use and effective means of protection for general copyrighted content.
Chapter 3: High-Definition and Container Innovation (2017) - The Introduction of HEVC and fMP4
- Milestone Event: At the 2017 Apple WWDC, Apple announced that HLS officially supports HEVC (H.265) and fMP4 (Fragmented MP4) formats. This was a monumental leap in HLS history, directly addressing the demands of the 4K Ultra HD era.
- Key Improvements:
- HEVC/H.265 Support: Playlist version upgrades, explicitly supporting video codecs with higher compression efficiency.
- Introduction of fMP4 Container: Beyond traditional
.ts, HLS began supporting fMP4 segments in.m4sformat.
- Developer Benefits:
- Sharp Bandwidth Cost Reduction, Quality Leap: HEVC saves approximately 50% bandwidth compared to H.264 at the same subjective quality. This means developers can provide users with higher definition (e.g., 4K, 8K) streaming services at lower costs.
- Workflow Unification and Efficiency Boost: The introduction of fMP4 was another major boon. It shares the same container format as MPEG-DASH, allowing developers to “Encode once, generate fMP4, and support both HLS and DASH simultaneously via different manifest files (
m3u8/mpd).” This greatly simplified video processing, storage, and packaging workflows, paving the way for the widespread adoption of CMAF.
Chapter 4: Low Latency and Format Unification (2019-Present) - The Path to Supremacy for LL-HLS and CMAF
- Milestone Event: In 2019, Apple officially released the Low-Latency HLS (LL-HLS) specification, while the CMAF (Common Media Application Format) format was widely adopted.
- Key Improvements:
- LL-HLS: By introducing the
#EXT-X-PARTtag inm3u8 files, segments are further subdivided into smaller “parts.” Combined with HTTP/2, end-to-end latency can be reduced from the traditional 30+ seconds to 2-8 seconds. - CMAF Proliferation: CMAF unifies the media segment format of HLS and DASH, allowing them to truly share the exact same media files (
.m4s).
- LL-HLS: By introducing the
- Developer Benefits:
- Unlocking Real-Time Interactive Scenarios: LL-HLS makes HLS no longer limited to VOD and traditional live streaming. Developers can build latency-sensitive real-time interactive applications based on HLS, such as sports events, online auctions, and video co-anchoring, while retaining HLS’s CDN-friendliness and scalability.
- Ultimate Operational Efficiency: The widespread adoption of CMAF means “Encode Once, Play Everywhere” transitions from ideal to reality. One set of CMAF outputs can serve all terminals supporting HLS and DASH, drastically reducing storage and transcoding costs.
- Seamless DRM Integration: Support for mainstream DRM schemes like FairPlay and Widevine is more mature, making HLS a reliable choice for carrying high-value content.
Technical Evolution Summary
| Phase | Core Tech | Core Developer Benefit |
|---|---|---|
| Founding (2009) | HTTP + .ts Segments |
Firewall traversal, CDN friendly, simple deployment |
| Expansion (2010-2016) | RFC 8216 Standardization, Multi-audio/Subtitle | Cross-platform interoperability, enriched user experience |
| Innovation (2017) | HEVC + fMP4 | Bandwidth cost halved, workflow unified |
| Unification (2019-Present) | LL-HLS + CMAF | Unlocks real-time interaction, realizes “Encode Once, Play Everywhere” |
Developer Resource Library
To facilitate the application of HLS in your actual projects, we have compiled a resource list ranging from official documentation to practical tools.
Official Documentation
- Apple HLS Official Specification: The most authoritative first-hand information, including the latest protocol features, best practices, and authoring tools.
- IETF RFC 8216 Standard Document: The official international standard for HLS, suitable for developers who need to understand protocol details in depth.
Development Tools
- FFmpeg: The “Swiss Army Knife” of audio/video processing, supporting the full workflow of HLS transcoding, segmentation, encryption, etc.
- Shaka Packager: A powerful packaging tool from Google, focusing on packaging encoded media files into CMAF/fMP4 segments required for DASH and HLS.
Web JS Players
- hls.js: A pure JavaScript HLS client requiring no native player support. It is powerful and is the mainstream choice for playing HLS on the Web.
- video.js: A web video player with a massive plugin ecosystem that supports HLS well through plugins.
- Xigua Player (Watermelon Player): Produced by ByteDance, featuring comprehensive functionality, good support for HLS, FLV, and other formats, and providing rich APIs and customization capabilities.
- zwplayer: A lightweight web player with comprehensive format support, excellent HLS compatibility, and easy integration.
- ckplayer: A veteran domestic player supporting multiple formats and protocols, supports ad integration, and has not been updated for 3 and a half years.
- dplayer: An HTML5 danmaku (bullet comment) video player supporting HLS, not updated for 3 years.
Summary and Outlook
The evolution of HLS is a technological history centered on the goals of “higher definition, lower latency, higher efficiency, and broader compatibility.” From the initial .ts streams to today’s unified low-latency CMAF, every iteration has precisely addressed the pain points faced by developers in a specific era.
In the future, with the popularization of next-generation encoding formats like AV1, and deep integration with technologies such as AI and VR/AR, the evolution of HLS will continue. Understanding its past and mastering its present will help every video developer better build outstanding applications for the future.