A presentation is a sequence of periods. In each period, adaptation sets group interchangeable encodings of one piece of content, and a player picks one representation from each set it needs, switching between them as bandwidth changes.
Period
| Attribute | Type | Meaning |
|---|---|---|
id | string | Identifies the period; must be present and stay the same in a dynamic MPD. |
start | duration | When the period starts on the presentation timeline. If absent, it starts when the previous one ends. |
duration | duration | How long it lasts. |
minBufferTime | duration | Overrides the MPD’s value for this period. |
bitstreamSwitching | boolean, default false | Segments of different representations can be joined into one valid stream. |
xlink:href, xlink:actuate | URI; onLoad or onRequest (default) | The period is fetched from elsewhere, when the MPD loads or when it is needed. Used for inserting adverts. |
Children, in order: ImportedMPD (an MPD to play in place of the period,
with earliestResolutionTimeOffset, default 60 seconds), BaseURL,
RequestParam, one of SegmentBase, SegmentList or
SegmentTemplate, AssetIdentifier, EventStream,
ServiceDescription, ContentProtection,
AdaptationSet, Subset, SupplementalProperty,
EmptyAdaptationSet, GroupLabel and
Preselection.
Common attributes
Adaptation sets, representations, subrepresentations, preselections and initialisation sets share these. A value on an adaptation set applies to all its representations.
| Attribute | Type | Meaning |
|---|---|---|
profiles | URIs | Profiles this part follows. |
width, height | whole numbers | Picture size in pixels. |
sar | ratio w:h | Sample (pixel) aspect ratio. |
frameRate | n or n/d | Frames per second, such as 25 or 30000/1001. |
audioSamplingRate | one or two whole numbers | Sample rate, or a minimum and maximum. |
mimeType | string | The segment format, such as video/mp4, audio/mp4, application/mp4 or video/mp2t. |
segmentProfiles, containerProfiles | four-character codes | Profiles of the segments and of the container, such as cmfc. |
codecs | RFC 6381 list | The codecs, such as avc1.640028 or mp4a.40.2. |
maximumSAPPeriod | number | The longest gap in seconds between stream access points. |
startWithSAP | 0 to 6 | Each segment starts with a stream access point of this type or lower (below); 0 says nothing. |
maxPlayoutRate | number | The fastest rate, such as for fast forward, the content supports. |
codingDependency | boolean | Whether any frame depends on another for decoding. |
scanType | progressive, interlaced, unknown | The scan of the video. |
selectionPriority | whole number, default 1 | Higher numbers are preferred when choosing. |
tag | string | A label for the application’s own use. |
The common child elements are the descriptors
FramePacking, AudioChannelConfiguration,
ContentProtection, OutputProtection,
EssentialProperty and SupplementalProperty; and
InbandEventStream, Switching, RandomAccess,
GroupLabel, Label, ProducerReferenceTime,
ContentPopularityRate, Resync and
SegmentSequenceProperties.
| SAP type | Meaning |
|---|---|
| 0 | Not stated |
| 1 | Closed GOP; the first frame in decoding order is also the first shown, and every frame after it can be decoded (an IDR frame) |
| 2 | Closed GOP, but frames may be shown in a different order from decoding |
| 3 | Open GOP: some frames after the access point in decoding order cannot be shown correctly |
| 4 | Gradual decoding refresh: the picture becomes correct over several frames |
| 5, 6 | Rarer cases, where frames before the access point in presentation order cannot be decoded at all |
AdaptationSet
| Attribute | Type | Meaning |
|---|---|---|
id | whole number | Unique within the period. |
group | whole number | Sets in the same group are alternatives; a player plays one set from each group. |
lang | language tag | The language, such as en. |
contentType | text, image, audio, video, application, font | The kind of content. |
par | ratio | Picture aspect ratio, such as 16:9. |
minBandwidth, maxBandwidth, minWidth, maxWidth, minHeight, maxHeight, minFrameRate, maxFrameRate | numbers | The range of its representations. |
segmentAlignment | boolean, default false | Segments of all representations start and end at the same times, so switching is clean. |
subsegmentAlignment | boolean, default false | The same for subsegments. |
subsegmentStartsWithSAP | 0 to 6, default 0 | Subsegments start with an access point of this type. |
bitstreamSwitching | boolean | As on Period, for this set. |
initializationSetRef | list of IDs | The initialisation sets it matches. |
initializationPrincipal | URI | An initialisation segment valid for all its representations. |
xlink:href, xlink:actuate | Fetched from elsewhere, as for a period. |
Children: Accessibility, Role, Rating,
Viewpoint, ContentComponent, BaseURL,
RequestParam, one of the three segment elements, and
Representation. An EmptyAdaptationSet has the same form but
no representations, and only describes content that is not in this period.
Representation and SubRepresentation
| Attribute | Type | Meaning |
|---|---|---|
id | string without spaces, required | Unique in the period; used as $RepresentationID$ in segment templates. |
bandwidth | bits per second, required | With minBufferTime: a player that has buffered that much can play continuously at this rate. |
qualityRanking | whole number | Lower is better, among representations of the set. |
dependencyId | list of IDs | Representations this one needs to decode, such as a base layer. |
associationId, associationType | IDs; four-character codes | Representations this one goes with, and how, such as cdsc for metadata describing them. |
mediaStreamStructureId | list | Representations that share one media stream structure, so a player can switch between them mid-segment. |
Children: BaseURL, ExtendedBandwidth (bandwidth needed for
various buffer times: attribute vbr, default false, and
ModelPair children with bufferTime and
bandwidth), SubRepresentation, RequestParam, and
one of the segment elements.
A SubRepresentation describes part of a representation that can be
played on its own, such as one track or a lower frame rate: attributes
level, dependencyLevel, bandwidth and
contentComponent, plus the common attributes.
ContentComponent, Subset and Preselection
| Element | Attributes | Meaning |
|---|---|---|
ContentComponent | id, lang, contentType, par, tag; children Accessibility, Role, Rating, Viewpoint | One component when the representations hold several, such as video and audio multiplexed together. |
Subset | contains (required, adaptation set IDs), id | Sets that may be played together; when subsets exist, a player may only combine sets inside one of them. |
Preselection | id (default 1), preselectionComponents (required, IDs), lang, order (undefined, time-ordered, fully-ordered), common attributes; children Accessibility, Role, Rating, Viewpoint | A ready-made combination of components, such as a main audio mix plus a commentary, chosen as one item. |
Worked example
<Period id="1" start="PT0S">
<AdaptationSet id="1" contentType="video" mimeType="video/mp4" par="16:9"
segmentAlignment="true" startWithSAP="1" maxWidth="1920" maxHeight="1080">
<Representation id="v720" bandwidth="3000000" codecs="avc1.64001f" width="1280" height="720" frameRate="25" sar="1:1"/>
<Representation id="v1080" bandwidth="6000000" codecs="avc1.640028" width="1920" height="1080" frameRate="25" sar="1:1"/>
</AdaptationSet>
<AdaptationSet id="2" contentType="audio" mimeType="audio/mp4" lang="en" segmentAlignment="true">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
<Representation id="a128" bandwidth="128000" codecs="mp4a.40.2" audioSamplingRate="48000"/>
</AdaptationSet>
</Period>