Delivering MPEG-DASH Content

Introduction 


Dynamic Adaptive Streaming over HTTP (MPEG-DASH)
is an adaptive bitrate streaming that enables high-quality streaming of media content over the Internet delivered from HTTP web servers.

Equivalent to HTTP Live Streaming (HLS), MPEG-DASH operates by breaking the content into a sequence of small segments, which are served over HTTP. 

Each one of these segments contains a short interval of playback time of media content that is potentially hours in duration, such as a movie or the live broadcast of an event. 

The content is made available at a variety of different bit rates.

While the content is being played back by MPEG-DASH client software, the client software utilizes a bit rate adaptation algorithm to automatically select the segment with the highest bit rate possible that can be downloaded in time for playback without causing delays or re-buffering events in the playback. 


MPEG-DASH
streaming format 


MPEG-DASH allows the use of any encoding standard. It is designed to be independent of codecs. It supports all codecs such as H.264, H.265, VP9, and VP10, etc.  


Implementation


The implantation of the MPEG-DASH requires creating a CDN zone for big objects (they are such by default) and generating MPD (Media Presentation Description) file.

It is used to hold the information on the various streams and the bandwidths they are associated with. This is the manifest file of the MPEG-DASH streaming for the mp4 media files to be played. This is done by prefixing ‘/dash’ to the path and appending /manifest.mpd at the end. 


Please note that you need to only upload your complete mp4 assets and segmentation is done by the CDN. 


Example:

mp4_file: /video/012345.mp4

manifest_path: /dash/video/012345.mp4/manifest.mpd


The returned manifest (MPD) uses SegmentTemplate elements from the MPEG-DASH specification. 


This MPD file contains reference links of segmented media files of different data rates so that the viewer’s player can combine this information to build the absolute URL for a given fragment according to the available bandwidth. This makes the MPD significantly shorter for long videos.


You can change the data rates by using parameters bsd (first segment) and sd (other segments) in the URL.


Еxample:

mp4_file: /video/012345.mp4

manifest_path:  /dash/bsd/10000-10000-15000/sd/20000/video/012345.mp4/manifest.mpd


In the example above the value set up for the bsd parameter of the initial segment is 10 seconds, the second is set up again to 10 seconds, and the third is set up to be 15 seconds. The rest of the segments are set up with the sd parameter to be 20 seconds. Note that the values should be in milliseconds.


URLSET


Furthermore, there is functionality to build a manifest from multiple files. This can be used when for a given video source there are multiple resolutions, and we would like the viewer to be able to change between them without changing the page.

Let’s say that we have the previous file /video/012345.mp4 in 3 resolutions 240p, 360p and 480p and we have named them /012345_240p.mp4 , /012345_360p.mp4 and /012345_480p.mp4 respectively.

The URI must be set up as shown below. 


Example:

/dash/video/012345_,24,36,48,0p.mp4/urlset/manifest.mpd

Where you can see that the common parts are “012345_” and “0p.mp4” and we divide by commas the three different bitrates – 24,36,48


This will return a manifest once again using SegmentedTemplates, with all video streams from all the files present with additional info for the bitrates and codecs.


Limit access using a secret key 


The MPEG-DASH functionality can be combined with our security token feature to block any hotlinking attempts. For detailed information, please go to Combining Transmuxing to MPEG-DASH with Limit Access Using a Secret Key.


To combine all features of the secret key that limit access, you must include the following part:

/video/bsd/10000-10000-15000/sd/20000/012345_,24,36,48,0p.mp4


Note that the prefix /dash and suffixes urlset/manifest.mpd and /manifest.mpd are excluded.


The fragment URLs in the MPD file are relative to the MPD URL and have the security token attached to them. There is no need to recalculate it for each of them before requesting them.


Since the security token is the same (including all parameters) for the .manifest.mpd file, it’s important to note that for longer videos it’s possible that the security token can expire before a request for the given segment is made.



Video Streaming Services

Delivering HLS Content

Combining Transmuxing to HLS with Limit Access Using a Secret Key

Speeding Up the HLS Delivery

Combining Transmuxing to MPEG-DASH with Limit Access Using a Secret Key