Events are timed messages for the player or the application: an advert break, a programme boundary, a signal to reload the manifest. They are written in the MPD or carried inside the media segments.
EventStream and Event
EventStream attribute | Type | Meaning |
|---|---|---|
schemeIdUri | URI, required | The kind of event (below). |
value | string | A sub-kind, defined by the scheme. |
timescale | whole number | Units per second for the event times (default 1). |
presentationTimeOffset | whole number, default 0 | Subtracted from event times. |
xlink:href, xlink:actuate | The stream is fetched from elsewhere. |
Its children are Event, BaseURL, RequestParam,
EssentialProperty and SupplementalProperty. It sits in a
Period.
Event attribute | Type | Meaning |
|---|---|---|
presentationTime | whole number, default 0 | When the event starts, from the start of the period, in timescale units. |
duration | whole number | How long it lasts. |
id | whole number | Identifies the event; the same id in the same stream is the same event. |
status | none, update, repeat (default) | How this instance relates to earlier ones with the same id (sixth edition); the exact rules are in the standard. |
The event’s message is its content: text, or XML from another namespace, such as an
SCTE-35 signal. Earlier editions also had contentEncoding
(base64) and messageData attributes; the sixth edition’s
schema prohibits them. An event may instead hold one of: SelectionInfo
(a contactURL and Selection children with
parameter, data, dataEncoding);
ServiceDescription; or InsertPresentation or
ReplacePresentation, which play another MPD in the middle of this one
(attributes uri, earliestResolutionTimeOffset,
serviceDescriptionId, maxDuration,
executeOnce, noJump, skipAfter, and for
replacement returnOffset, clip,
startWithOffset).
Events in segments: the emsg box
An InbandEventStream on an adaptation set or representation says that
its segments carry events of a scheme, in emsg boxes of the ISO base media
file format, normally placed before the moof box of a fragment.
| Version 0 field | Size | Version 1 field | Size |
|---|---|---|---|
box header, emsg, version, flags | 12 | box header, emsg, version, flags | 12 |
scheme_id_uri | string, NUL-ended | timescale | 4 |
value | string, NUL-ended | presentation_time (absolute) | 8 |
timescale | 4 | event_duration | 4 |
presentation_time_delta (from the segment’s start) | 4 | id | 4 |
event_duration | 4 | scheme_id_uri | string, NUL-ended |
id | 4 | value | string, NUL-ended |
message_data | to the end | message_data | to the end |
All numbers are big-endian. An event_duration of
0xFFFFFFFF means unknown.
Event schemes
schemeIdUri | Event |
|---|---|
urn:mpeg:dash:event:2012 | The MPD is about to expire: reload it, apply a patch, or use the new MPD in the message. In segments. |
urn:mpeg:dash:event:callback:2015 | Call a URL when the event starts, as for advert tracking. |
urn:mpeg:dash:event:ttfn:2016 | The presentation ends. |
urn:scte:scte35:2013:xml | An SCTE-35 cue as XML, in the MPD (discouraged). |
urn:scte:scte35:2013:xml+bin | An SCTE-35 cue as Base64 binary inside XML, in the MPD; the most used. |
urn:scte:scte35:2013:bin | A binary SCTE-35 cue in an emsg box. |
urn:aomedia:cmaf:id3 | ID3v2.4 timed metadata in emsg. |
urn:dvb:iptv:cpm:2014, urn:dvb:iptv:rating:2014, urn:dvb:iptv:guidance:2014, urn:dvb:dash:radiovis:2016 | DVB programme metadata, parental rating, guidance and radio slideshow. |
tag:atsc.org,2016:event | ATSC 3.0 signalling table update (value stu). |
ServiceDescription
Tells players how the service should be played, mostly for low-latency live. It has
an id (required) and these children:
| Child | Attributes | Meaning |
|---|---|---|
Scope | descriptor | Which players it applies to. |
Latency | target, min, max (milliseconds), referenceId; QualityLatency children | The latency to aim for and stay within, measured against a ProducerReferenceTime. |
PlaybackRate | min, max | How much a player may slow down or speed up to keep the latency, such as 0.96 to 1.04. |
OperatingQuality | mediaType (video, audio, any; default any), min, max, target, type, maxDifference | Quality rankings to stay within. |
OperatingBandwidth | mediaType (video, audio, any, all; default all), min, max, target | Bit rates to stay within. |
ContentSteering | as on the MPD | Content steering for this service. |
ClientDataReporting | descriptor, plus serviceLocations, adaptationSets; CMCDParameters children | Asks players to send Common Media Client Data (CMCD). |
PlaybackRestrictions | skipAfter (default PT0S) | When skipping is allowed, as for adverts. |
CMCDParameters attribute | Meaning |
|---|---|
version | CMCD version, default 1 |
mode | query (default) or header: how the data is sent |
includeInRequests | Which requests carry it, default segment |
keys | The CMCD keys to send (required) |
contentID, sessionID | Values to send for the content and session identifiers |
Worked example
<Period id="p1" start="PT0S">
<EventStream schemeIdUri="urn:scte:scte35:2013:xml+bin" timescale="90000">
<Event presentationTime="2700000" duration="2700000" id="1001">
<Signal xmlns="http://www.scte.org/schemas/35/2016">
<Binary>/DAlAAAAAAAAAP/wFAUAAAPpf+/+AAAAAAAA…</Binary>
</Signal>
</Event>
</EventStream>
<ServiceDescription id="0">
<Latency target="3500" min="2000" max="6000" referenceId="0"/>
<PlaybackRate min="0.96" max="1.04"/>
</ServiceDescription>
…
</Period>