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 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:
- Encoding and segmentation: The origin server divides the video file into smaller segments 2-4 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.
- 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.
- 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.
Segmentation: MPEG-DASH usually breaks videos into smaller segments for delivery than HLS. The default segment length for HLS is 6 seconds (formerly 10 seconds), while MPEG-DASH segments are typically 2-4 seconds long. This means that MPEG-DASH enables faster switching between quality levels for quicker adjustments to network conditions.
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.
HTML5 support: HLS is automatically supported by HTML5, but MPEG-DASH is not. This means that some browsers or apps cannot play MPEG-DASH video streams, even on non-Apple devices.
What is HTML5?
HTML is the standard markup language for coding a webpage. In other words, it is the code that controls how a webpage looks. It is possible to view the HTML source code for any given webpage by right-clicking on the webpage and selecting "View Page Source" from the menu.
HTML5 is the latest version of HTML. It includes support for video. This enables browsers to play embedded videos without a third-party browser plugin (as is necessary for Flash); instead, browsers can natively support video.
Does Cloudflare support MPEG-DASH?
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.