Understanding DASH: A Comprehensive Guide to Adaptive Bitrate Streaming

Ricki
4 min readJun 9, 2024

--

DASH (Dynamic Adaptive Streaming over HTTP) is a revolutionary adaptive bitrate streaming technique designed to provide high-quality streaming of media content over the Internet. Leveraging conventional HTTP web servers, DASH ensures a seamless viewing experience across various devices and network conditions. I’ll dive into how DASH works, its key features, and best practices for setting up DASH for live streaming.

Key Points

How DASH Works

DASH operates by dividing media content into smaller segments, each representing a short playback interval encoded at different bitrates. During playback, the DASH client dynamically selects the highest bitrate segment that can be downloaded without causing stalls or re-buffering, adapting to real-time network conditions.

  • Encoding and Segmentation: Media content is broken into small segments, each encoded at multiple bitrates.
https://ko.wikipedia.org/wiki/%EC%A0%81%EC%9D%91_%EB%B9%84%ED%8A%B8%EB%A0%88%EC%9D%B4%ED%8A%B8_%EC%8A%A4%ED%8A%B8%EB%A6%AC%EB%B0%8D
  • Delivery: These segments are delivered over HTTP, often via a Content Delivery Network (CDN).
  • Decoding and Playback: The client decodes and plays the video segments, dynamically adjusting the bitrate based on network conditions.

Features and Flexibility

DASH is audio/video codec agnostic, meaning it can utilize various media formats such as MP4 or MPEG-2 TS. It supports different service types (on-demand, live, time-shifted streaming) and features like multi-language, ad insertion, and trick modes.

Standard and Support

Developed by MPEG and first published in 2012, DASH has become an international standard. It was revised in 2019 and 2022, ensuring it remains up-to-date with evolving technology. The DASH Industry Forum promotes its adoption and provides usage guidelines. Major CDN providers like Akamai, Amazon CloudFront, and Limelight Networks, along with many encoding/transcoding services and video players, support DASH.

DASH for Live Streaming

https://blog.eleven-labs.com/en/video-live-dash-hls/

DASH is not limited to on-demand streaming; it also excels in live streaming scenarios. Here’s how DASH supports live streaming:

  • Dynamic Segmentation: Like on-demand content, live content is divided into small segments encoded at multiple bitrates. However, segments are made available sequentially as the live content is encoded and published.
  • MPD Updates: The Media Presentation Description (MPD) file, which contains segment information, is updated dynamically to include new segments as they become available. The client periodically checks for these updates to download and play new segments.
  • Use Cases: DASH live streaming supports various applications, including live events, linear TV, and time-shifted viewing.

Best Practices for Setting Up DASH for Live Streaming

Encoding and Segmentation

  1. Multi-Bitrate Encoding: Encode the live video source at multiple bitrates and resolutions to support adaptive bitrate streaming.
  2. Segment Length: Segment the encoded video into small chunks, typically between 2–10 seconds, to enable dynamic bitrate switching.
  3. Initialization Segments: Include initialization segments containing codec and stream metadata along with the media segments.

MPD File Management

  1. Dynamic Updates: Generate and update the MPD file dynamically as new segments become available.
  2. Attributes Setting: Set the type attribute to "dynamic" and include minimumUpdatePeriod to indicate the MPD update frequency.
  3. Frequent Updates: Update the availabilityStartTime and startNumber attributes in the MPD at least every 60 seconds.
  4. Initialization Data: Include initialization segment data in the MPD using base64 encoding to reduce client requests.

Segment Delivery

  1. Efficient Upload: Use HTTP PUT requests to upload each media segment and MPD update to the DASH server/origin.
  2. Timely Uploads: Ensure the MPD and initialization segments are uploaded within 3 seconds of the first media segment.
  3. Order Flexibility: Segments can be uploaded out of order within a 3-second window to optimize bandwidth usage.
  4. Persistent Connections: Reuse persistent HTTP connections for improved throughput and reduced latency.

Player Implementation

  1. DASH-Compliant Player: Use a DASH-compliant player library like shaka-player or dash.js on the client side.
  2. MPD Monitoring: Periodically check for MPD updates and fetch new segments as they become available.
  3. Adaptive Bitrate Logic: Implement adaptive bitrate selection logic based on current network conditions.

Infrastructure

  1. Capable Origin Server: Use a capable origin server or cloud service to handle segment uploads and delivery.
  2. CDN Utilization: Leverage a Content Delivery Network (CDN) for efficient distribution of DASH streams to viewers.
  3. Low-Latency Streaming: Consider using low-latency streaming modes like CMAF’s Low Latency mode for reduced end-to-end latency.

My Next Step

In order to implement the video playback function using DASH, the following materials should be studied.

Conclusion

DASH is a versatile and powerful adaptive bitrate streaming protocol that can meet various streaming needs, including live streaming. By following best practices for encoding, segmentation, MPD file management, segment delivery, player implementation, and infrastructure setup, you can provide a robust and high-quality viewing experience for your audience.

Whether you’re streaming on-demand content or live events, DASH’s flexibility and efficiency make it an excellent choice for delivering media content over the Internet. Embrace DASH to enhance your streaming capabilities and ensure seamless playback across diverse devices and network conditions.

References

  1. Dynamic Adaptive Streaming over HTTP
  2. DASH Adaptive Streaming for HTML5 Video
  3. Web and TV Convergence: DASH
  4. What is MPEG-DASH Streaming?
  5. MPEG-DASH vs HLS: What’s the Difference?
  6. Google Cloud Live Stream Documentation
  7. Akamai Techdocs: DASH and MSL Origin
  8. CDNetworks Blog on MPEG-DASH

--

--