ABR (Adaptative Bit Rate) Video Streaming: A Basic Comprehensive Tutorial

1. Introduction

This tutorial provides a comprehensive overview of Adaptive Bitrate (ABR) video streaming technology, designed to be accessible to both technical and non-technical readers. You’ll learn how modern video streaming works, why it revolutionized the industry, and understand the key technologies that make it possible to watch high-quality video content on any device, anywhere.

2.Fundamentals of ABR Video Streaming

Why ABR Video Streaming Changed Everything 

In the past, video was delivered via “dedicated” pipes—cable, satellite, or terrestrial broadcast. These methods reserved a fixed amount of bandwidth for every channel. If you had the signal, you had perfect video; if you didn’t, you had static. 

The internet, however, is a “best-effort” network. Bandwidth fluctuates based on congestion, your distance from the Wi-Fi router, or your cellular signal strength. Traditional file downloads (Progressive Download) were insufficient because they couldn’t react to these changes, leading to the dreaded “buffering” wheel. 

Adaptive Bitrate (ABR) Streaming changed the TV industry by breaking video into small chunks and encoding them at multiple quality levels. This allowed the viewing device to seamlessly switch between qualities in real-time. This shift enabled the OTT (Over-The-Top) revolution (Netflix, YouTube, Disney+), allowing content owners to deliver video directly to consumers over the public internet, bypassing traditional gatekeepers. 

Key Advantages of ABR Video Streaming 

Adaptive Quality: The video quality automatically adjusts based on available bandwidth, ensuring continuous playback without interruptions. If your connection slows down, the quality decreases to prevent buffering; when it improves, quality increases automatically. 

  1. Reliability: It creates a smooth playback experience even on unstable networks. 
  2. Start-up Time: Lower quality chunks are downloaded first to start the video instantly, then quality ramps up. 
  3. Device Compatibility: The same mechanism works on a 4K TV on Fiber and a smartphone on 4G. 
  4. Scalability: Because ABR uses standard HTTP web technology, it can rely on the existing infrastructure of the World Wide Web.
3.The ABR Streaming Pipeline

The journey from video capture to viewer screen involves multiple stages, each critical for delivering high-quality streaming experiences: 

[Video Source] → [Contribution] → [Ingest] → [Transcoding] → [Packaging] 

                                                      ↓ 

[Viewer Device] ← [CDN Edge] ← [CDN Shield] ← [Origin Server] 

Pipeline Components Explained 

Video Contribution: The raw video signal from cameras, production facilities, or content providers is captured and prepared for transmission to the processing facility. This often uses professional protocols like SRT or RTMP for reliable, low-latency transport. 

Ingest: The contribution signal is received and validated, checking for quality, format compliance, and preparing it for processing. This stage often includes initial quality checks and metadata extraction. 

Transcoding: The master video is converted into multiple versions at different: 

  • Resolutions (e.g., 1080p, 720p, 480p, 360p) 
  • Bitrates (e.g., 6 Mbps, 3 Mbps, 1.5 Mbps, 800 kbps) 
  • Codecs (e.g., H.264/AVC, H.265/HEVC, VP9, AV1) 

This creates a “ladder” of quality options that players can choose from based on network conditions and device capabilities. 

Packaging/Re-packaging: The transcoded videos are segmented into small chunks (typically 2-10 seconds each) and packaged into streaming formats like HLS or DASH. Manifests (playlists) are created to index these chunks. 

Origin Server: Stores the packaged content and serves as the authoritative source. It generates and updates manifests dynamically, especially important for live streaming. 

CDN Origin Shield: Acts as a protective layer between the origin server and CDN edge servers, caching content and reducing load on the origin infrastructure. 

CDN Edge Servers: Distributed globally, these servers cache and deliver content directly to viewers, minimizing latency and maximizing performance.

 

4. Streaming Protocols Overview 

Modern streaming relies on several key protocols, each serving specific purposes: 

HTTP/HTTPS: The foundation of ABR streaming, using standard web protocols makes streaming compatible with existing internet infrastructure, firewalls, and proxies. 

  • HLS (HTTP Live Streaming): The dominant standard, created by Apple. 
  • MPEG-DASH: The international standard, widely used on Android and Smart TVs. 
  • MSS (Microsoft Smooth Streaming): An older protocol, largely being phased out in favor of DASH. 

RTMP (Deprecated for Delivery): Still used for contribution/ingest but largely replaced by HTTP-based protocols for delivery to end users. 

5.Content Delivery Networks (CDNs)

The Critical Role of CDNs 

CDNs are the backbone of modern video streaming, solving the fundamental challenge of delivering high-bandwidth content to millions of simultaneous viewers globally. Without CDNs, streaming at scale would be technically and economically unfeasible. 

CDNs provide: 

  • Geographic Distribution: Servers located close to viewers reduce latency and improve quality 
  • Load Balancing: Traffic is distributed across multiple servers to prevent overload 
  • Redundancy: If one server fails, others automatically take over 
  • Bandwidth Optimization: Local caching reduces backbone network traffic 

Types of CDNs 

  1. Public/Commercial CDNs: Companies like Akamai, Cloudflare, Fastly, or Amazon CloudFront. Anyone can pay to use them. 
  2. Private CDNs: Built by content owners or Telecom Operators for their exclusive use. 
  3. Operator/ISP Caches: This is crucial for giants like Netflix (Open Connect) or Google (Global Cache). They install their own server racks inside the facilities of Telecommunication Operators (ISPs like Comcast, Orange, Telefonica). This keeps the heavy video traffic strictly local, saving money for the ISP and ensuring top quality for the viewer. 

Benefits for Streaming Services: 

  • Dramatic reduction in bandwidth costs 
  • Superior quality of experience for subscribers 
  • Direct control over the last-mile delivery 

Benefits for ISPs: 

  • Reduced internet transit costs (60-90% of peak traffic stays local) 
  • Improved network efficiency 
  • Better customer satisfaction with streaming services 
  • Free hardware and maintenance from content providers 

These embedded CDNs typically handle 70-90% of the streaming service’s traffic in mature markets, fundamentally changing the economics of video delivery. 

How CDN Request Routing Works 

When you click “play” on a video, a sophisticated process determines which CDN server will deliver your content: 

  1. DNS Request: Your player requests the video URL, which points to the CDN’s domain. 
  2. Geographic DNS Resolution: The CDN’s DNS servers identify your approximate location based on your DNS resolver’s IP address. 
  3. Server Selection: The request router evaluates multiple factors: 
    • Geographic proximity to available servers
    • Current server load and capacity 
    • Network path quality and congestion 
    • Server health and availability 
    • Business rules (premium vs. standard users)
  4. Redirection: You’re directed to the optimal server through: 
    • DNS response (returning the IP of the best server) 
    • HTTP redirect (302 response pointing to the best server) 
    • Anycast routing (multiple servers share the same IP, network routing chooses) 
  5. Content Delivery: The selected edge server delivers the content or fetches it from origin if not cached.
    This process happens in milliseconds and continuously adapts to changing conditions, ensuring optimal streaming performance. 
6.How ABR Protocols Work

The Player’s Intelligence 

The video player is the brain of ABR streaming, making real-time decisions to ensure the best possible viewing experience.  

How the Player Works 

The video player on your device is the “brain” of the operation. It is not a passive receiver; it is an active requester. 

  1. The Manifest Request: The player first downloads a text file called a Manifest (or Playlist). This is a menu listing all available video qualities (bitrates) and the filenames of the video chunks. 
  2. Bandwidth Estimation: The player downloads a small chunk and measures how long it took. It calculates your available internet speed. 
  3. The Decision: If your speed is 10 Mbps, the player looks at the Manifest and chooses the best quality that fits (e.g., the 6 Mbps profile). 
  4. Fetching Chunks: The player requests the specific video files for that quality level. 

Manifest Files: The Video Roadmap 

When you start watching a video, the player first downloads a manifest file – think of it as a table of contents that lists: 

  • Available quality levels (resolutions and bitrates) 
  • Locations (URLs) of video chunks for each quality level 
  • Metadata about the content (duration, codecs, languages) 
  • For live streams: updated chunk availability 

The Chunk System 

Instead of one large video file, ABR streaming divides content into small chunks: 

  • Each chunk typically contains 2-10 seconds of video 
  • Chunks are independent – can be decoded without previous chunks 
  • Different quality versions exist for each chunk 
  • Players can switch quality between chunks seamlessly 

Buffer Management: The Balancing Act 

The player maintains a buffer – a temporary storage of downloaded video chunks not yet played: 

Buffer Strategy: 

  1. Initial Buffering: Download enough chunks to start playback (typically 2-10 seconds) 
  2. Continuous Buffering: Stay ahead of playback by maintaining 10-30 seconds in buffer 
  3. Quality Decisions: Based on download speed and buffer health, decide the quality of the next chunk 

The Buffer’s Three Zones: 

  • Danger Zone (0-5 seconds): Risk of stalling, player requests lower quality 
  • Comfort Zone (5-20 seconds): Normal operation, maintain current quality 
  • Luxury Zone (20+ seconds): Room to try higher quality 

The ABR Algorithm 

The player’s ABR algorithm continuously monitors and adapts: 

  1. Bandwidth Estimation: Measures how fast chunks are downloading 
  2. Buffer Monitoring: Tracks how full the buffer is 
  3. Quality Selection: Chooses the highest quality that can be sustained 
  4. Switching Decision: Decides when to change quality levels 

Example Scenario: 

  • You start watching on WiFi – player selects 1080p 
  • You move to cellular – bandwidth drops, player switches to 720p 
  • You enter a tunnel – weak signal, player drops to 480p 
  • You exit the tunnel – bandwidth recovers, player gradually returns to 1080p 

All of this happens automatically without interrupting playback. 

Live vs. VoD (Video on Demand) 

While the video chunks look the same, the Manifest behaves differently. 

  • VoD: The video is finished. The manifest is Static. It lists every chunk from start (00:00) to finish (02:00:00). The player can jump (seek) anywhere. 
  • Live: The video is being created now. The manifest is Dynamic. It functions as a “Sliding Window.” 
  • The Window: The manifest might only list the last 60 seconds of chunks. As time passes, old chunks are removed from the top of the list, and new chunks are added to the bottom. 
  • Updates: The player must reload the manifest every few seconds to find out the names of the new chunks that were just generated. 

 

7. HLS – HTTP Live Streaming

Overview 

HLS, created by Apple in 2009, has become the most widely supported streaming protocol. Its universal device support makes it the default choice for reaching the broadest audience. 

How HLS Works 

HLS uses a hierarchy of manifest files (playlists): 

Master Playlist (.m3u8): 

#EXTM3U 

#EXT-X-VERSION:3 

#EXT-X-STREAM-INF:BANDWIDTH=800000,RESOLUTION=640×360 

360p.m3u8 

#EXT-X-STREAM-INF:BANDWIDTH=1400000,RESOLUTION=842×480 

480p.m3u8 

#EXT-X-STREAM-INF:BANDWIDTH=2800000,RESOLUTION=1280×720 

720p.m3u8 

#EXT-X-STREAM-INF:BANDWIDTH=5000000,RESOLUTION=1920×1080 

1080p.m3u8 

  1. Media Playlist (e.g., 720p.m3u8): 

#EXTM3U 

#EXT-X-VERSION:3 

#EXT-X-TARGETDURATION:10 

#EXT-X-MEDIA-SEQUENCE:0 

#EXTINF:10.0, 

segment0.ts 

#EXTINF:10.0, 

segment1.ts 

#EXTINF:10.0, 

segment2.ts 

HLS Video Formats 

Container: Originally MPEG-TS (.ts files), now also supports fragmented MP4 (.mp4) 

Video Codecs: 

  • H.264/AVC (universal support) 
  • H.265/HEVC (newer devices, better compression) 

Audio Codecs: 

  • AAC (standard) 
  • AC-3/E-AC-3 (surround sound) 

Key HLS Features 

  • Broad Compatibility: Works on all Apple devices, Android, smart TVs, web browsers 
  • Live and VOD: Supports both live streaming and on-demand content 
  • Multiple Audio/Subtitle Tracks: Built-in support for multiple languages 
  • DRM Support: FairPlay, Widevine, and other DRM systems 
  • Low Latency HLS: Recent addition reducing latency to 2-3 seconds 
  • DASH – Dynamic Adaptive Streaming over HTTP


Overview
 

DASH is an international standard (ISO/IEC 23009-1) offering more flexibility and advanced features than HLS. 

How DASH Works 

DASH uses an XML-based Media Presentation Description (MPD) file: 

Sample MPD Structure: 

<MPD xmlns=”urn:mpeg:dash:schema:mpd:2011″ profiles=”urn:mpeg:dash:profile:isoff-live:2011″ type=”dynamic”> 

  <Period> 

    <AdaptationSet mimeType=”video/mp4″> 

      <Representation id=”1″ bandwidth=”3000000″ width=”1280″ height=”720″> 

        <SegmentTemplate media=”video_720_$Number$.m4s” initialization=”init_720.mp4″ /> 

      </Representation> 

      <Representation id=”2″ bandwidth=”5000000″ width=”1920″ height=”1080″> 

        <SegmentTemplate media=”video_1080_$Number$.m4s” initialization=”init_1080.mp4″ /> 

      </Representation> 

    </AdaptationSet> 

  </Period> 

</MPD> 

8. DASH Video Formats 

Container: Exclusively uses ISO Base Media File Format (fragmented MP4) 

Video Codecs: 

  • H.264/AVC 
  • H.265/HEVC 
  • VP9 (YouTube) 
  • AV1 (newest, best compression) 

Audio Codecs: 

  • AAC 
  • Opus 
  • AC-3/E-AC-3 

DASH Advantages 

  • Codec Agnostic: Supports any codec, enabling cutting-edge compression 
  • Flexible Manifests: Rich metadata and complex presentation descriptions 
  • Efficient Seeking: Better random access in long-form content 
  • Standards-Based: Industry-wide standard ensuring consistency 
  • Advanced Features: Multi-period content, ad insertion markers, trick play
  • CMAF – Common Media Application Format


The Unification Solution
 

CMAF (Common Media Application Format) addresses a fundamental inefficiency in streaming: the need to store and deliver the same content in multiple formats for different protocols. 

What is CMAF? 

CMAF is not a new streaming protocol; it is a Container Standard. Apple and Microsoft agreed on a unified format based on Fragmented MP4 (fMP4). 

CMAF is a standardized media format that can be used by both HLS and DASH, eliminating duplicate encoding, storage, and delivery: 

Traditional Approach (Without CMAF): 

Source Video → Encoding → HLS Segments (.ts) → Storage/CDN 

            ↘ Encoding → DASH Segments (.mp4) → Storage/CDN 

CMAF Approach: 

Source Video → Encoding → CMAF Segments (.mp4) → Storage/CDN 

                                               ↗ HLS Manifest 

                                               ↘ DASH Manifest 

How CMAF Works 

CMAF standardizes: 

  1. Container Format: Fragmented MP4 (fMP4) only 
  1. Segmentation: Consistent chunk boundaries 
  1. Encoding: Single encode for all protocols 
  1. Manifests: Separate manifests reference the same media files 

Technical Structure: 

  • Uses ISO Base Media File Format (ISOBMFF) 
  • Segments contain one or more fragments (Segments are downloaded on bytes ranges). Ability to reduce the number of bytes to optimize the delay. 
  • Each fragment is independently decodable 
  • Chunks can be as small as a single frame for ultra-low latency 

CMAF Advantages 

  1. Storage Efficiency: Reduces storage requirements by 50% (Single source file). 
  2. CDN Efficiency: The CDN only caches one file. If an iPhone user watches a video, it is cached. If an Android user watches the same video 5 minutes later, they get the cached file (Hit) instead of forcing the CDN to fetch a different format. 
  3. Low Latency: CMAF introduced “Chunked Transfer Encoding.” This allows the encoder to send small parts of a chunk to the CDN and the player while the chunk is still being created. This drastically lowers the delay in Live Sports, bringing streaming closer to the speed of cable TV.