What is MPEG-DASH? | HLS vs. DASH

MPEG-DASH is a technique for streaming video over the Internet. MPEG-DASH uses HTTP and can run on any web server.

Learning Objectives

After reading this article you will be able to:

  • Learn how the MPEG-DASH video streaming technique works
  • Compare and contrast MPEG-DASH with HLS
  • Explore the benefits of adaptive bitrate streaming

Related Content

Want to keep learning?

Subscribe to theNET, Cloudflare's monthly recap of the Internet's most popular insights!

Refer to Cloudflare's Privacy Policy to learn how we collect and process your personal data.

Copy article link

What is MPEG-DASH?

Streaming is a way of delivering data over the Internet so that a device can start displaying the data before it fully loads. Video is streamed over the Internet so that the client device does not have to download the entire video file before playing it.

MPEG-DASH is a streaming method. DASH stands for "Dynamic Adaptive Streaming over HTTP." Because it is based on HTTP, any origin server can be set up to serve MPEG-DASH streams.

MPEG-DASH is similar to HLS, another streaming protocol, in that it breaks videos down into smaller chunks and encodes those chunks at different quality levels. This makes it possible to stream videos at different quality levels, and to switch in the middle of a video from one quality level to another one.

What is HTTP?

HTTP is a layer 7 protocol for communicating over the Internet. Web applications use HTTP to send data back and forth in a way that devices at both ends will be able to interpret; this is sort of like two people from different parts of the world using a common language to communicate.

MPEG-DASH uses HTTP, which is an advantage because most of the Internet already uses HTTP. With HTTP, the stream goes to a standard port (port 80 or 443) that is almost always open. This ensures that the stream is rarely blocked by a firewall, which can block streaming protocols that use specialized or unusual ports.

How does MPEG-DASH work?

The main steps in the MPEG-DASH streaming process are:

  1. Encoding and segmentation: The origin server divides the video file into smaller segments a few seconds in length. The server also creates an index file – like a table of contents for the video segments. Then the segments are encoded, meaning formatted in a way that multiple devices can interpret. MPEG-DASH allows the use of any encoding standard.
  2. Delivery: When users start watching the stream, the encoded video segments are pushed out to client devices over the Internet. In almost all cases, a content delivery network (CDN) helps distribute the stream more efficiently.
  3. Decoding and playback: As a user's device receives the streamed data, it decodes the data and plays back the video. The video player automatically switches to a lower or higher quality picture in order to adjust to network conditions – for example, if the user currently has very little bandwidth, the video will play at a lower quality level that uses less bandwidth.

What is adaptive bitrate streaming?

Adaptive bitrate streaming is the ability to adjust video quality in the middle of a stream as network conditions change. Several streaming protocols, including MPEG-DASH, HLS, and HDS, allow for adaptive bitrate streaming.

Adaptive bitrate streaming is possible because the origin server encodes video segments at several different quality levels. This happens during the encoding and segmentation processes. A video player can switch from one quality level to another one in the middle of the video without interrupting playback. This prevents the video from stopping altogether if network bandwidth is suddenly reduced.

HLS vs. DASH: What are the main differences?

HLS is another streaming protocol in wide use today. MPEG-DASH and HLS are similar in a number of ways. Both protocols run over HTTP, use TCP as their transport protocol, break video into segments with an accompanying index file, and offer adaptive bitrate streaming.

However, several key differences distinguish the two protocols:

Encoding formats: MPEG-DASH allows the use of any encoding standard. HLS, on the other hand, requires the use of H.264 or H.265.

Device support: HLS is the only format supported by Apple devices. iPhones, MacBooks, and other Apple products cannot play video delivered over MPEG-DASH.

Segment length: This was a larger difference between the protocols before 2016, when the default segment length for HLS was 10 seconds. Today the default length for HLS is 6 seconds, although it can be adjusted from the default. MPEG-DASH segments are usually between 2 and 10 seconds in length, although the optimum length is 2-4 seconds.

Standardization: MPEG-DASH is an international standard. HLS was developed by Apple and has not been published as an international standard, even though it has wide support.

Does Cloudflare support MPEG-DASH?

Cloudflare video streaming products support MPEG-DASH, along with other streaming standards. The main Cloudflare products for video streaming are Cloudflare Stream and Cloudflare Stream Delivery.

Cloudflare Stream is an on-demand video streaming platform that integrates video storage, encoding, and a customizable player with the Cloudflare global network. Cloudflare Stream Delivery caches and accelerates video streams that are not stored on the Cloudflare network.

Learn more about video streaming.