HLS vs DASH Streaming Protocols: How Web Stream Parsers Work
The Evolution of Web Video Streaming
In the early days of the web, video was delivered via Progressive Download (downloading an entire MP4 file into memory before playing). Today, 99% of web video relies on adaptive bitrate streaming protocols: HLS (developed by Apple) and DASH (developed by MPEG).
1. HLS (HTTP Live Streaming) Architecture
HLS breaks video streams into short 2 to 6 second media segments (usually .ts or .m4s files) indexed inside an .m3u8 master playlist file. The browser continuously fetches segment playlists and adjusts quality based on connection speed.
2. DASH (Dynamic Adaptive Streaming over HTTP) Architecture
DASH uses an XML-based manifest file called an .mpd (Media Presentation Description). Unlike HLS, DASH separates video and audio tracks completely into separate streams, allowing the client browser to pair 4K video with high-quality AAC audio dynamically.
How OmniDown Merges DASH Streams
When downloading DASH media, OmniDown fetches the separate video stream chunk and audio stream chunk simultaneously and remuxes them in memory into a single .mp4 container using FFmpeg multiplexing.