MPEG-DASH is one of the most popular streaming protocols and is hugely configurable for different streaming and infrastructure requirements. One of its most interesting features is the option to provide either a Single Period or Multiple Periods (Multi Period) in the MPD (manifest). This can be used to break the video into logical units like Chapters, or for inserting ads at specific points in the video.
In this article, we take a quick look at the structure of an MPD and dive into the differences between single and multi-period MPEG-DASH.
Recap: Structure of an MPEG-DASH MPD
Let’s quickly take a look at the structure of an MPD first. If you want an in-depth tutorial, please visit OTTVerse’s deep dive into the structure of an MPEG-DASH MPD.
So, what is an MPD?
The Media Presentation Description (MPD) is a document that contains metadata required by a DASH Client to construct appropriate HTTP-URLs to access Segments and to provide the streaming service to the user.
As the name says, an MPD contains a Media Presentation with a clear, consistent hierarchical organization. From top to bottom, the individual elements of the MPD hierarchy are:
- The Media Presentation contains a sequence of one or more Periods.
- A Period contains one or more Adaptation Sets.
- An Adaptation Set contains one or more Representations.
- A Representation contains one or more Segments.
- Segments carry the actual media data and associated metadata.
Each element consists of a set of attributes. Individual attributes are either Mandatory, Conditionally Mandatory, Optional, or Optional with Default Values.
Here is a pictorial representation of an MPD.
From this block-digram, we see that a Period is the top-most or coarsest unit of an MPD. A Period is defined using a start time and a duration in ISO8601:Durations format.
The MPEG-DASH standard lets you (1) create a single Period spanning the length of the entire video or (20 divide a video into multiple Periods, each of which contains Adaptation Sets, Representations, Segments, and the actual media.
Let’s look at why this is allowed and what they are used for.
Single Period DASH vs. Multi Period DASH
Single Period DASH, as the name suggests is used to refer to MPDs that contain only one period. And, you guessed it – multi-period DASH MPDs contain multiple periods.
But what is the need for multiple periods in an MPD?
By default, playback continues seamlessly from one Period to the next, and this feature can be used to provide an easy way to add seek points for individual chapters – thus breaking a single, monolithic Period into smaller, logical Periods.
Another use of Multi-Period DASH is in Ad Insertion. In ABR or OTT video streaming using either HLS or DASH, ad insertion can be implemented either with Client Side Ad Insertion or Server Side Ad Insertion. In both these methods, either the video player or the ad insertion server needs to know where the ad breaks are and where to insert the ads. Also, the streaming protocol needs to ensure that after an ad break is completed the next portion of the movie needs to start playing.
The signaling of ad breaks and continuous playback of a movie can be achieved using SCTE35 tags and Multi Period DASH.
For ad insertion, a large, monolithic Period can be split into multiple periods of the desired size and location in the movie, and SCTE35 tags can be inserted between Periods to trigger the player to perform dynamic ad insertion.
For example, you can split a single Period into Multiple Periods such as this –
<Period id="0" duration="PT59.52S"> … </Period> <Period id="1" duration="PT0H1M8.678S"> … </Period> <Period id="2" duration="PT0H11M14.647S"> … </Period>
Whichever of these periods contain advertisements, you can use
scte35 tags to indicate the presence, and details of the ads.
Here is a very good example from Google that clearly demonstrates how an ad can be signalled in an MPEG-DASH Period. You can see how an
EventStream tag is used with a Period to contain the
scte35 tags with their associated metadata needed for successully executing an ad break.
After the ad is completed, the video player natually moves on to the next Period which may contain the original video or another ad break.
<Period start="PT32S" id="2"> <!-- Ad Break Period --> <!-- The first segment of this period is the start of the ad break and the ad break ends with the last segment --> <EventStream timescale="90000" schemeIdUri="urn:scte:scte35:2014:xml+bin"> <Event duration="2520000" id="1"> <!-- The duration specified in this event should match the actual duration of the period as close as possible --> <Signal xmlns="urn:scte:scte35:2013:xml"> <Binary> /DAlAAAAAAAAAP/wFAUAAAAEf+/+kybGyP4BSvaQAAEBAQAArky/3g== <Binary> </Signal> </Event> </EventStream> </Period>
I hope this article helped you understand the difference between Single and Multiple Period DASH, how they are signalled, and their use cases. If you are interested in video streaming and MPEG-DASH, be sure to check out our Guide to MPEG-DASH.
Interested in MPEG-DASH and video streaming? You’ll be interested in these articles for sure!