Live streaming and video-on-demand (VOD) represent fundamentally distinct delivery pipelines, each imposing unique infrastructure demands and engineering tradeoffs. Live streaming prioritizes real-time synchronization and low-latency propagation for event-driven architectures, dynamic manifest updates, and strict time-bound caching.

In contrast, VOD leverages pre-encoded assets, static manifests, and CDN caching to optimize for playback reliability and buffer-based quality of experience (QoE). The divergence extends across protocols, CDN behavior, player logic, and encoding workflows, each system tuned for its respective constraints.

Streaming Protocols and Manifest Design

Live Streaming

Live streaming systems require dynamic protocol handling to minimize latency while maintaining stream continuity. HLS implementations typically use sliding window manifests with 2–4 second segments and a 3-segment lookback. Modern extensions such as #EXT-X-PREFETCH and #EXT-X-PART support partial segment preloading and low-latency playback.

While RTMP remains common for ingest due to sub-second transmission capabilities, it lacks native ABR support. WebRTC addresses interactive scenarios with sub-500ms latency.

Common Media Application Format (CMAF) enables chunked transfer encoding using fragmented MP4 (fMP4) containers. In live contexts, it supports incremental segment delivery and is paired with just-in-time (JIT) packaging, referenced further in the encoding section.

VOD

VOD systems favor static manifests with long cache-control headers and fixed segment durations (typically 4–6 seconds). These manifests are generated once and remain immutable, allowing for CDN pre-caching and edge persistence.

Protocol features such as #EXT-X-START and #EXT-X-MAP optimize startup times and buffer initialization. VOD packaging also uses CMAF (detailed in the encoding section). But unlike live, it supports fully pre-processed assets with no need for just-in-time processing.

Delivery Architecture and CDN Behavior

Live Streaming

Live delivery architectures typically use origin-pull distribution with short TTLs at the CDN edge. Components include real-time manifest rewriting, clock synchronization at edge PoPs, and origin shielding with redundancy and failover. Services like AWS MediaPackage dynamically generate manifests and segments across multiple ABR profiles using JIT workflows.

VOD

VOD pipelines use origin-push models and long-lived cache headers. CDNs pre-position trending assets and apply tiered storage with NVMe for high-demand videos. Cache invalidation is typically handled via Versioned URLs and Manual purge APIs. Platforms like Cloudflare Stream benefit from high edge hit rates and minimal origin loads.

Player Logic and QoE Metrics

Live Streaming

Live players rely on precise clock alignment (NTP-based), latency compensation, and throughput-driven ABR algorithms. They balance being close to the live edge with buffer underrun prevention.

Example: HLS.js Example Configuration

code
new Hls({
code
liveSyncDurationCount: 3,
code
liveMaxLatencyDurationCount: 5,
code
maxMaxBufferLength: 30
code
});

Explanation:

  • liveSyncDurationCount: Syncs playback within 3 segment durations from live.
  • liveMaxLatencyDurationCount: Triggers catch-up logic if latency exceeds 5 segments.

VOD

VOD players optimize for buffer stability, smooth ABR transitions, and prefetching. Typical logic involves longer buffer targets and viewport-based preloading.

Example: Shaka Player Example Configuration

code
player.configure({
code
streaming: {
code
bufferingGoal: 60,
code
rebufferingGoal: 2,
code
bufferBehind: 30
code
}
code
});

Explanation:

  • bufferingGoal: Preloads 60s of content for stable playback.
  • rebufferingGoal: Minimizes recovery time after stalling.

Video Encoding and Packaging

Live Streaming

Live encoding workflows prioritize speed and real-time segmentation for Short GOPs (1–2 seconds) with closed GOP alignment, Frame-accurate segmentation on IDR frames, Just-in-time packaging using CMAF with fragmented MP4, and Redundant ingest paths (e.g., Wowza Streaming Engine). Encoding tools often use hardware-accelerated presets or x264 ultrafast to minimize latency during real-time encoding.

VOD

VOD transcoding is done offline, enabling highly optimized encoding profiles for longer GOPs (4–6 seconds) with hierarchical B-frames, scene-aware, multi-pass VBR, per-title encoding for optimal bitrate ladders, and static CMAF segments with initialization vectors for byte-range addressing.

Example: FFmpeg Command for VOD Packaging

code
ffmpeg -i input.mov -c:v libx264 -g 48 -keyint_min 48 -sc_threshold 0 \
code
-segment_list_type m3u8 -f segment out%03d.ts

Explanation:

  • -g 48 and -keyint_min 48: Set GOP to 2 seconds (24 fps x 2).
  • -sc_threshold 0: Disables scene change detection to enforce uniform segmenting.

Comparison Table

AspectLive StreamingVideo on Demand (VOD)
Manifest BehaviorDynamic (#EXT-X-MEDIA-SEQUENCE, #EXT-X-PART) and sliding windowStatic, fixed segment durations, immutable playlists
Latency HandlingLow-latency tuning (liveSyncDurationCount)Prioritizes buffer fullness and QoE
Protocol UsageHLS, DASH, CMAF (live), RTMP, WebRTCHLS, DASH, CMAF (VOD), no RTMP
CDN BehaviorOrigin-pull, short TTLs, live manifest rewritingOrigin-push, long TTLs, pre-caching
Encoding WorkflowsJIT packaging, short GOP, real-time segmentationOffline encoding, long GOP, per-title optimization
Player LogicClock sync, latency-aware ABR, skip-to-liveBuffer-based ABR, prefetching
DRM and TokensShort-lived tokens, rotating licensesPersistent licenses (Widevine, FairPlay)
Ad InsertionServer-side (#EXT-X-CUE-OUT)Client-side cue parsing
Failure ModesEdge flaps and origin shieldingCache staleness requires cache-key versioning
PersonalizationReal-time overlays (e.g., GraphQL-injected manifests)Pre-stitched personalized variants
AnalyticsHeartbeat pings (e.g., every 10s)Percentile tracking (25%, 50%, 75%)
Access ControlGeo-blocking + session-based token expiryJWT claims for playback window control