SMIL Playlists - Timed Metadata - SCTE 35

A SMIL playlist lists one or more sequence elements. The final media stream will be a concatenation of all the sequences (generated by either Unified Origin or Unified Packager, based on the remixed MP4 that Unified Remix generated from the SMIL playlist).

A sequence element may contain a single video element (with all the media specified in a single file) or a parallel element when the media is stored in more than one file, or when specifying additional Timed Metadata.

<seq>
  <video
    src="http://sample-content/tears-of-steel.mp4" />
</seq>

The @clipBegin and @clipEnd attributes can be used to limit the selection to only a certain timespan of the media. Below example specifies a 30 second clip that starts at 15 seconds.

<video
  src="http://sample-content/tears-of-steel.mp4"
  clipBegin="wallclock(1970-01-01T00:00:15.000Z)"
  clipEnd="wallclock(1970-01-01T00:00:45.000Z)"
  />

As an extension to the SMIL standard, the @clipBegin and @clipEnd attributes can also be specified on a <par> element. This applies the attribute values to all the child elements of the <par> element. E.g. instead of having to repeat the attributes on each <video> element within a <par>:

<?xml version="1.0" encoding="utf-8"?>
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
  <body>
    <seq>
      <par>
        <video src="video-1000kbps.mp4"
          clipBegin="wallclock(1970-01-01T00:00:00.000Z)"
            clipEnd="wallclock(1970-01-01T00:10:00.000Z)" />
        <video src="video-2000kbps.mp4"
          clipBegin="wallclock(1970-01-01T00:00:00.000Z)"
            clipEnd="wallclock(1970-01-01T00:10:00.000Z)" />
        <video src="audio.mp4"
          clipBegin="wallclock(1970-01-01T00:00:00.000Z)"
            clipEnd="wallclock(1970-01-01T00:10:00.000Z)" />
      </par>
    </seq>
  </body>
</smil>

You can specify it one level higher, on the <seq> (but not on both <par> and <seq>!):

<?xml version="1.0" encoding="utf-8"?>
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
  <body>
    <seq>
      <par
        clipBegin="wallclock(1970-01-01T00:00:00.000Z)"
          clipEnd="wallclock(1970-01-01T00:10:00.000Z)">
        <video src="video-1000kbps.mp4" />
        <video src="video-2000kbps.mp4" />
        <video src="audio.mp4" />
      </par>
    </seq>
  </body>
</smil>

Specifying Timed Metadata in a SMIL playlist

Unified Remix is capable of adding Timed Metadata that is specified in a SMIL playlist. You can define Timed Metadata in a SMIL playlist using the syntax defined by DASH's EventStream element as shown below. The type of metadata is signaled using a @schemeIdUri. In case of SCTE 35 messages, they may be defined either as XML or binary (urn:scte:scte35:2014:xml+bin). Timed Metadata that uses any other other @schemeIdUri is passed through as is (see Inserting custom Timed Metadata below).

The EventType specifies an event and contains the message of the event, formatted as a string and contained in the element.

The @presentationTime is relative to the begin of the surrounding seq.

<!-- Event Stream -->
<xs:complexType name="EventStreamType">
  <xs:sequence>
    <xs:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence>
  <xs:attribute ref="xlink:href"/>
  <xs:attribute ref="xlink:actuate" default="onRequest"/>
  <xs:attribute name="schemeIdUri" type="xs:anyURI" use="required"/>
  <xs:attribute name="value" type="xs:string"/>
  <xs:attribute name="timescale" type="xs:unsignedInt"/>
</xs:complexType>

<!-- Event -->
<xs:simpleType name="EventType">
  <xs:extension base="xs:string">
    <xs:attribute name="presentationTime" type="xs:unsignedLong" default="0"/>
    <xs:attribute name="duration" type="xs:unsignedLong"/>
    <xs:attribute name="id" type="xs:unsignedInt"/>
    <xs:attribute name="contentEncoding" type="ContentEncodingType"/>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:extension>
</xs:simpleType>

Inserting custom Timed Metadata

The following example shows how to specify custom metadata and how it is passed through in a HLS Media Playlist.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?xml version="1.0" encoding="UTF-8"?>
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
  <body>
    <seq>
      <par>
        <video
          src="tears-of-steel-avc1-750k.mp4"
          clipBegin="wallclock(1970-01-01T00:00:00.000Z)"
          clipEnd="wallclock(1970-01-01T00:00:16.000Z)" />
        <EventStream xmlns="urn:mpeg:dash:schema:mpd:2011"
          schemeIdUri="my:scheme">
          <Event
            duration="0"
            id="1">
            <CustomMetadata xmlns="http://xmlns/2019">
              <Title>Title</Title>
              <YearPublished>2019</YearPublished>
            </CustomMetadata>
          </Event>
        </EventStream>
      </par>
    </seq>
  </body>
</smil>

The mapping between the EventStream and the 'EXT-X-DATERANGE' tag is as follows:

  • The @id is copied to the ID field.
  • The @schemeIdUri copied to the CLASS field.
  • The @presentationTime is copied to the START-DATE field.
  • The payload of the event is base64 encoded in the X-MESSAGE-DATA field.

This results in the following HLS Media Playlist when Unified Origin or Unified Packager is used to generate a HLS TS stream from the remixed MP4 that was created based on the SMIL playlist, including the specified Timed Metadata shown above:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#EXTM3U
#EXT-X-VERSION:4
## Created with Unified Streaming Platform (version=1.10.15-devel)
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-TARGETDURATION:4
#USP-X-TIMESTAMP-MAP:MPEGTS=900000,LOCAL=1970-01-01T00:00:00Z
#EXT-X-DATERANGE:ID="1",CLASS="my:scheme",START-DATE="1970-01-01T00:00:00Z",PLANNED-DURATION=0,X-MESSAGE-DATA="CjxDdXN0b21NZXRhZGF0YQogIHhtbG5zPSJodHRwOi8veG1sbnMvMjAxOSI+CiAgPFRpdGxlPlRpdGxlPC9UaXRsZT4KICA8WWVhclB1Ymxpc2hlZD4yMDE5PC9ZZWFyUHVibGlzaGVkPgo8L0N1c3RvbU1ldGFkYXRhPg=="
#EXT-X-PROGRAM-DATE-TIME:1970-01-01T00:00:00Z
#EXTINF:4, no desc
origin-passthru-video_eng=751000-1.ts
#EXTINF:4, no desc
origin-passthru-video_eng=751000-2.ts
#EXTINF:4, no desc
origin-passthru-video_eng=751000-3.ts
#EXTINF:4, no desc
origin-passthru-video_eng=751000-4.ts
#EXT-X-ENDLIST

The resulting MPEG-DASH client manifest (MPD):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Unified Streaming Platform (version=1.10.15-devel) -->
<MPD
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="urn:mpeg:dash:schema:mpd:2011"
  xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
  type="static"
  mediaPresentationDuration="PT16S"
  maxSegmentDuration="PT4S"
  minBufferTime="PT10S"
  profiles="urn:mpeg:dash:profile:isoff-live:2011,urn:com:dashif:dash264,urn:hbbtv:dash:profile:isoff-live:2012">
  <Period
    id="1"
    duration="PT16S">
    <BaseURL>dash/</BaseURL>
    <EventStream
      schemeIdUri="my:scheme"
      timescale="1">
      <!-- 1970-01-01T00:00:00Z -->
      <Event
        presentationTime="0"
        duration="0"
        id="1">
        <CustomMetadata
          xmlns="http://xmlns/2019">
          <Title>Title</Title>
          <YearPublished>2019</YearPublished>
        </CustomMetadata>
      </Event>
    </EventStream>
    <AdaptationSet
      id="1"
      group="2"
      contentType="video"
      lang="en"
      par="56:25"
      segmentAlignment="true"
      width="448"
      height="200"
      sar="1:1"
      frameRate="24"
      mimeType="video/mp4"
      codecs="avc3.42C016"
      startWithSAP="1">
      <InbandEventStream
        schemeIdUri="my:scheme">
      </InbandEventStream>
      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
      <SegmentTemplate
        timescale="600"
        initialization="origin-passthru-$RepresentationID$.dash"
        media="origin-passthru-$RepresentationID$-$Time$.dash">
        <SegmentTimeline>
          <S t="0" d="2400" r="3" />
        </SegmentTimeline>
      </SegmentTemplate>
      <Representation
        id="video_eng=751000"
        bandwidth="751000"
        scanType="progressive">
      </Representation>
    </AdaptationSet>
  </Period>
</MPD>

Inserting SCTE 35 Timed Metadata

Certain SCTE 35 messages are more than just Timed Metadata that should be passed through. A SpliceInsert marker instructs Unified Origin or Unified Packager where to splice the media, i.e., where to insert additional media segment boundaries.

For splicing to work, the media must be conditioned (i.e., the time signaled by the SpliceInsert message must coincide with a keyframe). As explained at the start of this document, media can either be properly preconditioned by an encoder, or conditioned by Unified Remix. The examples below suppose preconditioned media.

Note

The splice point signaled by the SCTE 35 message is adjusted to the keyframe prior to the splice point's presentation time. For preconditioned media, this adjustment should be small and only reflect differences in accuracy of various timing representations.

Inserting a pre-roll

The following example shows how to specify a pre-roll in a SMIL playlist:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0" encoding="UTF-8"?>
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
  <body>
    <seq>
      <par>
        <video
          src="tears-of-steel-avc1-750k.mp4"
          clipBegin="wallclock(1970-01-01T00:00:00.000Z)"
          clipEnd="wallclock(1970-01-01T00:00:16.000Z)" />
        <EventStream xmlns="urn:mpeg:dash:schema:mpd:2011"
          schemeIdUri="urn:scte:scte35:2014:xml+bin">
          <Event
            duration="0"
            id="1">
            <Signal xmlns="http://www.scte.org/schemas/35/2016">
              <SpliceInfoSection>
                <SpliceInsert
                  spliceEventId="1234"
                  outOfNetworkIndicator="1"
                  spliceImmediateFlag="1">
                  <Program />
                  <BreakDuration
                    autoReturn="1"
                    duration="0" />
                </SpliceInsert>
              </SpliceInfoSection>
            </Signal>
          </Event>
        </EventStream>
      </par>
    </seq>
  </body>
</smil>

The resulting HLS Media Playlist:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#EXTM3U
#EXT-X-VERSION:4
## Created with Unified Streaming Platform (version=1.10.15-devel)
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-TARGETDURATION:4
#USP-X-TIMESTAMP-MAP:MPEGTS=900000,LOCAL=1970-01-01T00:00:00Z
## splice_insert(auto_return)
#EXT-X-DATERANGE:ID="1234",START-DATE="1970-01-01T00:00:00Z",PLANNED-DURATION=0,SCTE35-OUT=0xFC302000000000000000FFF00F05000004D27FFFFE000000000000000000007C85771D
#EXT-X-CUE-OUT:0
#EXT-X-CUE-IN
#EXT-X-PROGRAM-DATE-TIME:1970-01-01T00:00:00Z
#EXTINF:4, no desc
origin-preroll-video_eng=751000-1.ts
#EXTINF:4, no desc
origin-preroll-video_eng=751000-2.ts
#EXTINF:4, no desc
origin-preroll-video_eng=751000-3.ts
#EXTINF:4, no desc
origin-preroll-video_eng=751000-4.ts
#EXT-X-ENDLIST

The resulting MPEG-DASH client manifest (MPD):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Unified Streaming Platform (version=1.10.15-devel) -->
<MPD
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="urn:mpeg:dash:schema:mpd:2011"
  xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
  type="static"
  mediaPresentationDuration="PT16S"
  maxSegmentDuration="PT4S"
  minBufferTime="PT10S"
  profiles="urn:mpeg:dash:profile:isoff-live:2011,urn:com:dashif:dash264,urn:hbbtv:dash:profile:isoff-live:2012">
  <Period
    id="1"
    duration="PT16S">
    <BaseURL>dash/</BaseURL>
    <EventStream
      schemeIdUri="urn:scte:scte35:2014:xml+bin"
      timescale="1">
      <!-- 1970-01-01T00:00:00Z -->
      <Event
        presentationTime="0"
        duration="0"
        id="1">
        <Signal xmlns="http://www.scte.org/schemas/35/2016">
          <Binary>/DAgAAAAAAAAAP/wDwUAAATSf//+AAAAAAAAAAAAAHyFdx0=</Binary>
        </Signal>
      </Event>
    </EventStream>
    <AdaptationSet
      id="1"
      group="2"
      contentType="video"
      lang="en"
      par="56:25"
      segmentAlignment="true"
      width="448"
      height="200"
      sar="1:1"
      frameRate="24"
      mimeType="video/mp4"
      codecs="avc3.42C016"
      startWithSAP="1">
      <InbandEventStream
        schemeIdUri="urn:scte:scte35:2014:xml+bin">
      </InbandEventStream>
      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
      <SegmentTemplate
        timescale="600"
        initialization="origin-preroll-$RepresentationID$.dash"
        media="origin-preroll-$RepresentationID$-$Time$.dash">
        <SegmentTimeline>
          <S t="0" d="2400" r="3" />
        </SegmentTimeline>
      </SegmentTemplate>
      <Representation
        id="video_eng=751000"
        bandwidth="751000"
        scanType="progressive">
      </Representation>
    </AdaptationSet>
  </Period>
</MPD>

Inserting a mid-roll

The following example shows how to specify a mid-roll in a SMIL playlist:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?xml version="1.0" encoding="UTF-8"?>
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
  <body>
    <seq>
      <par>
        <video
          src="tears-of-steel-avc1-750k.mp4"
          clipBegin="wallclock(1970-01-01T00:00:00.000Z)"
          clipEnd="wallclock(1970-01-01T00:00:16.000Z)" />
        <EventStream xmlns="urn:mpeg:dash:schema:mpd:2011"
          schemeIdUri="urn:scte:scte35:2014:xml+bin"
          timescale="90000">
          <Event
            presentationTime="720000"
            duration="0"
            id="1">
            <Signal xmlns="http://www.scte.org/schemas/35/2016">
              <SpliceInfoSection>
                <SpliceInsert
                  spliceEventId="1234"
                  outOfNetworkIndicator="1"
                  spliceImmediateFlag="1">
                  <Program />
                  <BreakDuration
                    autoReturn="1"
                    duration="0" />
                </SpliceInsert>
              </SpliceInfoSection>
            </Signal>
          </Event>
        </EventStream>
      </par>
    </seq>
  </body>
</smil>

The resulting HLS Media Playlist:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#EXTM3U
#EXT-X-VERSION:4
## Created with Unified Streaming Platform (version=1.10.15-devel)
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-TARGETDURATION:4
#USP-X-TIMESTAMP-MAP:MPEGTS=900000,LOCAL=1970-01-01T00:00:00Z
#EXT-X-PROGRAM-DATE-TIME:1970-01-01T00:00:00Z
#EXTINF:4, no desc
origin-midroll-video_eng=751000-1.ts
#EXTINF:4, no desc
origin-midroll-video_eng=751000-2.ts
## splice_insert(auto_return)
#EXT-X-DATERANGE:ID="1234",START-DATE="1970-01-01T00:00:08Z",PLANNED-DURATION=0,SCTE35-OUT=0xFC302000000000000000FFF00F05000004D27FFFFE000000000000000000007C85771D
#EXT-X-CUE-OUT:0
#EXT-X-CUE-IN
#EXT-X-PROGRAM-DATE-TIME:1970-01-01T00:00:08Z
#EXTINF:4, no desc
origin-midroll-video_eng=751000-3.ts
#EXTINF:4, no desc
origin-midroll-video_eng=751000-4.ts
#EXT-X-ENDLIST

The resulting MPEG-DASH client manifest (MPD):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Unified Streaming Platform (version=1.10.15-devel) -->
<MPD
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="urn:mpeg:dash:schema:mpd:2011"
  xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
  type="static"
  mediaPresentationDuration="PT16S"
  maxSegmentDuration="PT4S"
  minBufferTime="PT10S"
  profiles="urn:mpeg:dash:profile:isoff-live:2011,urn:com:dashif:dash264,urn:hbbtv:dash:profile:isoff-live:2012">
  <Period
    id="1"
    duration="PT16S">
    <BaseURL>dash/</BaseURL>
    <EventStream
      schemeIdUri="urn:scte:scte35:2014:xml+bin"
      timescale="1">
      <!-- 1970-01-01T00:00:08Z -->
      <Event
        presentationTime="8"
        duration="0"
        id="1">
        <Signal xmlns="http://www.scte.org/schemas/35/2016">
          <Binary>/DAgAAAAAAAAAP/wDwUAAATSf//+AAAAAAAAAAAAAHyFdx0=</Binary>
        </Signal>
      </Event>
    </EventStream>
    <AdaptationSet
      id="1"
      group="2"
      contentType="video"
      lang="en"
      par="56:25"
      segmentAlignment="true"
      width="448"
      height="200"
      sar="1:1"
      frameRate="24"
      mimeType="video/mp4"
      codecs="avc3.42C016"
      startWithSAP="1">
      <InbandEventStream
        schemeIdUri="urn:scte:scte35:2014:xml+bin">
      </InbandEventStream>
      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
      <SegmentTemplate
        timescale="600"
        initialization="origin-midroll-$RepresentationID$.dash"
        media="origin-midroll-$RepresentationID$-$Time$.dash">
        <SegmentTimeline>
          <S t="0" d="2400" r="3" />
        </SegmentTimeline>
      </SegmentTemplate>
      <Representation
        id="video_eng=751000"
        bandwidth="751000"
        scanType="progressive">
      </Representation>
    </AdaptationSet>
  </Period>
</MPD>

Inserting a post-roll

The following example shows how to specify a post-roll in a SMIL:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?xml version="1.0" encoding="UTF-8"?>
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
  <body>
    <seq>
      <video
        src="tears-of-steel-avc1-750k.mp4"
        clipBegin="wallclock(1970-01-01T00:00:00.000Z)"
        clipEnd="wallclock(1970-01-01T00:00:16.000Z)" />
    </seq>
    <seq>
      <par>
        <EventStream xmlns="urn:mpeg:dash:schema:mpd:2011"
          schemeIdUri="urn:scte:scte35:2014:xml+bin">
          <Event
            duration="0"
            id="1">
            <Signal xmlns="http://www.scte.org/schemas/35/2016">
              <SpliceInfoSection>
                <SpliceInsert
                  spliceEventId="1234"
                  outOfNetworkIndicator="1"
                  spliceImmediateFlag="1">
                  <Program />
                  <BreakDuration
                    autoReturn="1"
                    duration="0" />
                </SpliceInsert>
              </SpliceInfoSection>
            </Signal>
          </Event>
        </EventStream>
      </par>
    </seq>
  </body>
</smil>

Note

To ensure that the post-roll reliably starts immediately after the main presentation we recommend using a second seq for the splice event, rather than putting it in the main seq and tuning @presentationTime to point at the end of the media.

The resulting HLS Media Playlist:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#EXTM3U
#EXT-X-VERSION:4
## Created with Unified Streaming Platform (version=1.10.15-devel)
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-TARGETDURATION:4
#USP-X-TIMESTAMP-MAP:MPEGTS=900000,LOCAL=1970-01-01T00:00:00Z
#EXT-X-PROGRAM-DATE-TIME:1970-01-01T00:00:00Z
#EXTINF:4, no desc
origin-postroll-video_eng=751000-1.ts
#EXTINF:4, no desc
origin-postroll-video_eng=751000-2.ts
#EXTINF:4, no desc
origin-postroll-video_eng=751000-3.ts
## splice_insert(auto_return)
#EXT-X-DATERANGE:ID="1234",START-DATE="1970-01-01T00:00:16Z",PLANNED-DURATION=0,SCTE35-OUT=0xFC302000000000000000FFF00F05000004D27FFFFE000000000000000000007C85771D
#EXT-X-CUE-OUT:0
#EXT-X-CUE-IN
#EXTINF:4, no desc
origin-postroll-video_eng=751000-4.ts
#EXT-X-ENDLIST

Note that the '#EXT-X-DATERANGE', '#EXT-X-CUE-OUT' and '#EXT-X-CUE-IN' markers precede the last media segment. A more logical location would be after the last media segment, but HLS requires all tags (except '#EXT-X-ENDLIST') to precede a media segment.

The resulting MPEG-DASH client manifest (MPD):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Unified Streaming Platform (version=1.10.15-devel) -->
<MPD
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="urn:mpeg:dash:schema:mpd:2011"
  xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
  type="static"
  mediaPresentationDuration="PT16S"
  maxSegmentDuration="PT4S"
  minBufferTime="PT10S"
  profiles="urn:mpeg:dash:profile:isoff-live:2011,urn:com:dashif:dash264,urn:hbbtv:dash:profile:isoff-live:2012">
  <Period
    id="1"
    duration="PT16S">
    <BaseURL>dash/</BaseURL>
    <EventStream
      schemeIdUri="urn:scte:scte35:2014:xml+bin"
      timescale="1">
      <!-- 1970-01-01T00:00:16Z -->
      <Event
        presentationTime="16"
        duration="0"
        id="1">
        <Signal xmlns="http://www.scte.org/schemas/35/2016">
          <Binary>/DAgAAAAAAAAAP/wDwUAAATSf//+AAAAAAAAAAAAAHyFdx0=</Binary>
        </Signal>
      </Event>
    </EventStream>
    <AdaptationSet
      id="1"
      group="2"
      contentType="video"
      lang="en"
      par="56:25"
      segmentAlignment="true"
      width="448"
      height="200"
      sar="1:1"
      frameRate="24"
      mimeType="video/mp4"
      codecs="avc3.42C016"
      startWithSAP="1">
      <InbandEventStream
        schemeIdUri="urn:scte:scte35:2014:xml+bin">
      </InbandEventStream>
      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
      <SegmentTemplate
        timescale="600"
        initialization="origin-postroll-$RepresentationID$.dash"
        media="origin-postroll-$RepresentationID$-$Time$.dash">
        <SegmentTimeline>
          <S t="0" d="2400" r="3" />
        </SegmentTimeline>
      </SegmentTemplate>
      <Representation
        id="video_eng=751000"
        bandwidth="751000"
        scanType="progressive">
      </Representation>
    </AdaptationSet>
  </Period>
</MPD>

Event Triggering Distribution Specification

The Event Triggering Distribution Specification (ETDS) facilitates agreements between television broadcasting and distribution companies concerning Event Triggering according to SCTE standards (link to PDF of ETDS specification).

Below example shows using Break Start/End (marking the delineation of the full commercial interruption), accurate scheduling using Program Start/End (signaling an individual Program), ad replacement using Distributor Placement Opportunity Start/End (marking the window in which replacements may occur) and signaling an individual advertisement using Provider Ad Start/End.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?xml version="1.0" encoding="UTF-8"?>
<!--

https://mediaperspectives.nl/app/uploads/2018/11/2019-01-29-Media-Perspectives-ETDSS.pdf

5.4. Program Transition.

The following example specifies the syntax transmitted at the end of
"Program 1 - Chapter 4" and the start of "Program 2 - Chapter 1".

-->
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
  <body>
    <seq>
      <video
        src="tears-of-steel-avc1-750k.mp4"
        clipBegin="wallclock(1970-01-01T00:00:00.000Z)"
        clipEnd="wallclock(1970-01-01T00:00:16.000Z)" />
    </seq>
    <seq>
      <par>
        <video
          src="tears-of-steel-avc1-750k.mp4"
          clipBegin="wallclock(1970-01-01T00:00:16.000Z)"
          clipEnd="wallclock(1970-01-01T00:00:32.000Z)" />
        <EventStream xmlns="urn:mpeg:dash:schema:mpd:2011"
          schemeIdUri="urn:scte:scte35:2014:xml+bin">
          <!-- The following example specifies the syntax transmitted at the -->
          <!-- end of "Program 1 - Chapter 4" -->
          <Event
            duration="0"
            id="1">
            <Signal xmlns="http://www.scte.org/schemas/35/2016">
              <SpliceInfoSection>
                <TimeSignal />
                <!-- Chapter End (4th Chapter within the running Program. -->
                <!-- A total of 4 Chapters expected). -->
                <SegmentationDescriptor
                  segmentationEventId="3131961357"
                  segmentationTypeId="33"
                  segmentNum="4"
                  segmentsExpected="4">
                  <!-- Uniquely identifies "Program 1 - Chapter 4". -->
                  <SegmentationUpid
                    segmentationUpidType="8"
                    segmentationUpidFormat="hexbinary">00000386192976FB</SegmentationUpid>
                </SegmentationDescriptor>
                <!-- Program End -->
                <SegmentationDescriptor
                  segmentationEventId="3131961358"
                  segmentationDuration="0"
                  segmentationTypeId="17"
                  segmentNum="1"
                  segmentsExpected="1">
                  <!-- Uniquely identifies "Program 1". -->
                  <SegmentationUpid
                    segmentationUpidType="8"
                    segmentationUpidFormat="hexbinary">000001BFE8C0C990</SegmentationUpid>
                </SegmentationDescriptor>
              </SpliceInfoSection>
            </Signal>
          </Event>
          <!-- The following example specifies the syntax transmitted at the -->
          <!-- start of "Program 2 - Chapter 1". -->
          <Event
            duration="0"
            id="2">
            <Signal xmlns="http://www.scte.org/schemas/35/2016">
              <SpliceInfoSection>
                <TimeSignal />
                <!-- Program Start -->
                <SegmentationDescriptor
                  segmentationEventId="3131961359"
                  segmentationDuration="110797200"
                  segmentationTypeId="16"
                  segmentNum="1"
                  segmentsExpected="1">
                  <!-- Uniquely identifies "Program 2". -->
                  <SegmentationUpid
                    segmentationUpidType="8"
                    segmentationUpidFormat="hexbinary">000002747B92A2B2</SegmentationUpid>
                </SegmentationDescriptor>
                <!-- Chapter Start (1st Chapter with the running Program. -->
                <!-- A total of 3 Chapters expected). -->
                <SegmentationDescriptor
                  segmentationEventId="3131961360"
                  segmentationDuration="8074800"
                  segmentationTypeId="32"
                  segmentNum="1"
                  segmentsExpected="3">
                  <!-- Uniquely identifies "Program 2 - Chapter 1". -->
                  <SegmentationUpid
                    segmentationUpidType="8"
                    segmentationUpidFormat="hexbinary">000002747B92A2B2</SegmentationUpid>
                </SegmentationDescriptor>
                <!-- Content Identification -->
                <SegmentationDescriptor
                  segmentationEventId="3131961361"
                  segmentationDuration="0"
                  segmentationTypeId="1"
                  segmentNum="0"
                  segmentsExpected="0">
                  <!-- Managed Private UPID (formatIdentifier = 'TVST'). -->
                  <!-- Representating the name 'TV Station'. -->
                  <SegmentationUpid
                    segmentationUpidType="12"
                    formatIdentifier="1414943572"
                    segmentationUpidFormat="hexbinary" />
                </SegmentationDescriptor>
              </SpliceInfoSection>
            </Signal>
          </Event>
        </EventStream>
      </par>
    </seq>
  </body>
</smil>

Importing SCTE 35 Timed Metadata

Unified Remix can also load SCTE 35 SpliceInsert markers from an external ISO BMFF file containing DASHEventMessageBoxes (emsg) that use the urn:scte:scte35:2013:bin scheme.

In the following example, the content is already prepared for ABR streaming, and has additional keyframes inserted at the SpliceInsert markers.

The SMIL playlist combines the original media content with a Timed Metadata track emsg.mp4 that contains two SCTE 35 markers, which is added to the playlist using a <video> element. The presentation times are 00:00:17.11 and 00:00:47.15:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
<?xml version="1.0" encoding="utf-8"?>
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
  <body>
    <seq>
      <par
        clipBegin="wallclock(1970-01-01T00:00:00.000Z)"
        clipEnd="wallclock(1970-01-01T99:99:99.999Z)" >
        <video src="video.mp4" />
        <video src="audio_eng.mp4" />
        <video src="emsg.mp4" />
      </par>
    </seq>
  </body>
</smil>

The resulting HLS Media Playlist:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#EXTM3U
#EXT-X-VERSION:4
## Created with Unified Streaming Platform (version=1.10.15-devel)
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-TARGETDURATION:7
#USP-X-TIMESTAMP-MAP:MPEGTS=900000,LOCAL=1970-01-01T00:00:00Z
#EXT-X-PROGRAM-DATE-TIME:1970-01-01T00:00:00Z
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-1.ts
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-2.ts
#EXTINF:3.8387, no desc
emsg-mp4-video=124800-3.ts
## splice_insert()
#EXT-X-DATERANGE:ID="1",START-DATE="1970-01-01T00:00:15.355086Z",SCTE35-OUT=0xFC002100000000000000FFF010050000000100E0008000000000000000000000D4C4F7BD
#EXT-X-CUE-OUT
#EXT-X-PROGRAM-DATE-TIME:1970-01-01T00:00:15.355086Z
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-4.ts
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-5.ts
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-6.ts
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-7.ts
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-8.ts
#EXTINF:2.999, no desc
emsg-mp4-video=124800-9.ts
## splice_insert()
#EXT-X-DATERANGE:ID="2",START-DATE="1970-01-01T00:00:47.144913Z",SCTE35-OUT=0xFC002100000000000000FFF010050000000200E0008000000000000000000000B715C99C
#EXT-X-CUE-OUT
#EXT-X-PROGRAM-DATE-TIME:1970-01-01T00:00:47.144913Z
#EXTINF:6.5978, no desc
emsg-mp4-video=124800-10.ts
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-11.ts
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-12.ts
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-13.ts
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-14.ts
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-15.ts
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-16.ts
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-17.ts
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-18.ts
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-19.ts
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-20.ts
#EXTINF:5.7581, no desc
emsg-mp4-video=124800-21.ts
#EXTINF:1.0396, no desc
emsg-mp4-video=124800-22.ts
#EXT-X-ENDLIST