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 <par> (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 should be defined as XML using the urn:scte:scte35:2013:xml scheme. 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<?xml version="1.0" encoding="UTF-8"?>
 2<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
 3  <body>
 4    <seq>
 5      <par>
 6        <video
 7          src="tears-of-steel-avc1-750k.mp4"
 8          clipBegin="wallclock(1970-01-01T00:00:00.000Z)"
 9          clipEnd="wallclock(1970-01-01T00:00:16.000Z)" />
10        <EventStream xmlns="urn:mpeg:dash:schema:mpd:2011"
11          schemeIdUri="my:scheme">
12          <Event
13            duration="0"
14            id="1">
15            <CustomMetadata xmlns="http://xmlns/2019">
16              <Title>Title</Title>
17              <YearPublished>2019</YearPublished>
18            </CustomMetadata>
19          </Event>
20        </EventStream>
21      </par>
22    </seq>
23  </body>
24</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#EXTM3U
 2#EXT-X-VERSION:4
 3## Created with Unified Streaming Platform (version=1.10.15-devel)
 4#EXT-X-PLAYLIST-TYPE:VOD
 5#EXT-X-MEDIA-SEQUENCE:1
 6#EXT-X-INDEPENDENT-SEGMENTS
 7#EXT-X-TARGETDURATION:4
 8#USP-X-TIMESTAMP-MAP:MPEGTS=900000,LOCAL=1970-01-01T00:00:00Z
 9#EXT-X-DATERANGE:ID="1",CLASS="my:scheme",START-DATE="1970-01-01T00:00:00Z",PLANNED-DURATION=0,X-MESSAGE-DATA="CjxDdXN0b21NZXRhZGF0YQogIHhtbG5zPSJodHRwOi8veG1sbnMvMjAxOSI+CiAgPFRpdGxlPlRpdGxlPC9UaXRsZT4KICA8WWVhclB1Ymxpc2hlZD4yMDE5PC9ZZWFyUHVibGlzaGVkPgo8L0N1c3RvbU1ldGFkYXRhPg=="
10#EXT-X-PROGRAM-DATE-TIME:1970-01-01T00:00:00Z
11#EXTINF:4, no desc
12origin-passthru-video_eng=751000-1.ts
13#EXTINF:4, no desc
14origin-passthru-video_eng=751000-2.ts
15#EXTINF:4, no desc
16origin-passthru-video_eng=751000-3.ts
17#EXTINF:4, no desc
18origin-passthru-video_eng=751000-4.ts
19#EXT-X-ENDLIST

The resulting MPEG-DASH client manifest (MPD):

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

Inserting ID3 tags as Timed Metadata

To easily add ID3 tags as Timed Metadata:

  • Set the schemeIdUri to http://www.id3.org/

  • Specify the presentationTime at which the tag should be inserted

  • Add the binary ID3 tag as a base64 encoded string in the Event element

  • Specify that the Event element contains a base64 encoded string by adding the contentEncoding attribute and setting its value to base64

As an example, see the following:

<?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"/>
        <EventStream xmlns="urn:mpeg:dash:schema:mpd:2011"
          schemeIdUri="http://www.id3.org/">
          <Event
            presentationTime="4"
            id="0"
            contentEncoding="base64">SUQzBAAgAAAASlBSSVYAAABAAAB3d3cucGx1dG8udHY6Y2xpazpZM0pwWkF4YnJCbzZPb1NjTVRVWXhEcGphV1I0QWdBQWJXbGtlQUlBSGc9PQBQ</Event>
        </EventStream>
      </par>
    </seq>
  </body>
</smil>

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.

Ad substitution opportunity is indicated by a single SCTE 35 splice_insert() with the out_of_network_indicator field set to 1. The break_duration() must be present and the duration must be greater than zero matching the duration of the substitution. The auto_return flag shall be 1 (Auto Return Mode).

An insertion opportunity is indicated by a single SCTE 35 splice_insert() with the out_of_network_indicator field set to 1. The break_duration() must be present and the duration must be set to zero. The auto_return flag shall be 1 (Auto Return Mode).

The Event@duration is always zero for insertion opportunities.

The Event@duration is always greater than zero for substitution opportunities.

recommendations for ad slot signalling using SCTE-35 in (DVB-)DASH are available on .. _DVB-TA part 3: https://dvb.org/?standard=dynamic-substitution-of-content-in-linear-broadcast-part-3-carriage-and-signalling-of-placement-opportunity-information-in-dvb-dash

Recommend

Inserting a pre-roll

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

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

The resulting HLS Media Playlist:

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

The resulting MPEG-DASH client manifest (MPD):

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

Inserting a mid-roll

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

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

The resulting HLS Media Playlist:

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

The resulting MPEG-DASH client manifest (MPD):

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

Inserting a post-roll

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

 1<?xml version="1.0" encoding="UTF-8"?>
 2<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
 3  <body>
 4    <seq>
 5      <video
 6        src="tears-of-steel-avc1-750k.mp4"
 7        clipBegin="wallclock(1970-01-01T00:00:00.000Z)"
 8        clipEnd="wallclock(1970-01-01T00:00:16.000Z)" />
 9    </seq>
10    <seq>
11      <par>
12        <EventStream xmlns="urn:mpeg:dash:schema:mpd:2011"
13          schemeIdUri="urn:scte:scte35:2013:xml">
14          <Event
15            duration="0"
16            id="1">
17            <Signal xmlns="http://www.scte.org/schemas/35/2016">
18              <SpliceInfoSection>
19                <SpliceInsert
20                  spliceEventId="1234"
21                  outOfNetworkIndicator="1"
22                  spliceImmediateFlag="1">
23                  <Program />
24                  <BreakDuration
25                    autoReturn="1"
26                    duration="0" />
27                </SpliceInsert>
28              </SpliceInfoSection>
29            </Signal>
30          </Event>
31        </EventStream>
32      </par>
33    </seq>
34  </body>
35</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#EXTM3U
 2#EXT-X-VERSION:4
 3## Created with Unified Streaming Platform (version=1.10.15-devel)
 4#EXT-X-PLAYLIST-TYPE:VOD
 5#EXT-X-MEDIA-SEQUENCE:1
 6#EXT-X-INDEPENDENT-SEGMENTS
 7#EXT-X-TARGETDURATION:4
 8#USP-X-TIMESTAMP-MAP:MPEGTS=900000,LOCAL=1970-01-01T00:00:00Z
 9#EXT-X-PROGRAM-DATE-TIME:1970-01-01T00:00:00Z
10#EXTINF:4, no desc
11origin-postroll-video_eng=751000-1.ts
12#EXTINF:4, no desc
13origin-postroll-video_eng=751000-2.ts
14#EXTINF:4, no desc
15origin-postroll-video_eng=751000-3.ts
16## splice_insert(auto_return)
17#EXT-X-DATERANGE:ID="1234",START-DATE="1970-01-01T00:00:16Z",PLANNED-DURATION=0,SCTE35-OUT=0xFC302000000000000000FFF00F05000004D27FFFFE000000000000000000007C85771D
18#EXT-X-CUE-OUT:0
19#EXT-X-CUE-IN
20#EXTINF:4, no desc
21origin-postroll-video_eng=751000-4.ts
22#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 certain third-party services require that all markers in a HLS playlist precede a media segment, so post-roll signaling is inserted before the last media segment. to precede a media segment.

The resulting MPEG-DASH client manifest (MPD):

 1<?xml version="1.0" encoding="utf-8"?>
 2<!-- Created with Unified Streaming Platform (version=1.10.15-devel) -->
 3<MPD
 4  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 5  xmlns="urn:mpeg:dash:schema:mpd:2011"
 6  xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
 7  type="static"
 8  mediaPresentationDuration="PT16S"
 9  maxSegmentDuration="PT4S"
10  minBufferTime="PT10S"
11  profiles="urn:mpeg:dash:profile:isoff-live:2011,urn:com:dashif:dash264,urn:hbbtv:dash:profile:isoff-live:2012">
12  <Period
13    id="1"
14    duration="PT16S">
15    <BaseURL>dash/</BaseURL>
16    <EventStream
17      schemeIdUri="urn:scte:scte35:2014:xml+bin"
18      timescale="1">
19      <!-- 1970-01-01T00:00:16Z -->
20      <Event
21        presentationTime="16"
22        duration="0"
23        id="1">
24        <Signal xmlns="http://www.scte.org/schemas/35/2016">
25          <Binary>/DAgAAAAAAAAAP/wDwUAAATSf//+AAAAAAAAAAAAAHyFdx0=</Binary>
26        </Signal>
27      </Event>
28    </EventStream>
29    <AdaptationSet
30      id="1"
31      group="2"
32      contentType="video"
33      lang="en"
34      par="56:25"
35      segmentAlignment="true"
36      width="448"
37      height="200"
38      sar="1:1"
39      frameRate="24"
40      mimeType="video/mp4"
41      codecs="avc3.42C016"
42      startWithSAP="1">
43      <InbandEventStream
44        schemeIdUri="urn:scte:scte35:2013:xml">
45      </InbandEventStream>
46      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
47      <SegmentTemplate
48        timescale="600"
49        initialization="origin-postroll-$RepresentationID$.dash"
50        media="origin-postroll-$RepresentationID$-$Time$.dash">
51        <SegmentTimeline>
52          <S t="0" d="2400" r="3" />
53        </SegmentTimeline>
54      </SegmentTemplate>
55      <Representation
56        id="video_eng=751000"
57        bandwidth="751000"
58        scanType="progressive">
59      </Representation>
60    </AdaptationSet>
61  </Period>
62</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<?xml version="1.0" encoding="UTF-8"?>
  2<!--
  3
  4https://mediaperspectives.nl/app/uploads/2018/11/2019-01-29-Media-Perspectives-ETDSS.pdf
  5
  65.4. Program Transition.
  7
  8The following example specifies the syntax transmitted at the end of
  9"Program 1 - Chapter 4" and the start of "Program 2 - Chapter 1".
 10
 11-->
 12<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
 13  <body>
 14    <seq>
 15      <video
 16        src="tears-of-steel-avc1-750k.mp4"
 17        clipBegin="wallclock(1970-01-01T00:00:00.000Z)"
 18        clipEnd="wallclock(1970-01-01T00:00:16.000Z)" />
 19    </seq>
 20    <seq>
 21      <par>
 22        <video
 23          src="tears-of-steel-avc1-750k.mp4"
 24          clipBegin="wallclock(1970-01-01T00:00:16.000Z)"
 25          clipEnd="wallclock(1970-01-01T00:00:32.000Z)" />
 26        <EventStream xmlns="urn:mpeg:dash:schema:mpd:2011"
 27          schemeIdUri="urn:scte:scte35:2013:xml">
 28          <!-- The following example specifies the syntax transmitted at the -->
 29          <!-- end of "Program 1 - Chapter 4" -->
 30          <Event
 31            duration="0"
 32            id="1">
 33            <Signal xmlns="http://www.scte.org/schemas/35/2016">
 34              <SpliceInfoSection>
 35                <TimeSignal />
 36                <!-- Chapter End (4th Chapter within the running Program. -->
 37                <!-- A total of 4 Chapters expected). -->
 38                <SegmentationDescriptor
 39                  segmentationEventId="3131961357"
 40                  segmentationTypeId="33"
 41                  segmentNum="4"
 42                  segmentsExpected="4">
 43                  <!-- Uniquely identifies "Program 1 - Chapter 4". -->
 44                  <SegmentationUpid
 45                    segmentationUpidType="8"
 46                    segmentationUpidFormat="hexbinary">00000386192976FB</SegmentationUpid>
 47                </SegmentationDescriptor>
 48                <!-- Program End -->
 49                <SegmentationDescriptor
 50                  segmentationEventId="3131961358"
 51                  segmentationDuration="0"
 52                  segmentationTypeId="17"
 53                  segmentNum="1"
 54                  segmentsExpected="1">
 55                  <!-- Uniquely identifies "Program 1". -->
 56                  <SegmentationUpid
 57                    segmentationUpidType="8"
 58                    segmentationUpidFormat="hexbinary">000001BFE8C0C990</SegmentationUpid>
 59                </SegmentationDescriptor>
 60              </SpliceInfoSection>
 61            </Signal>
 62          </Event>
 63          <!-- The following example specifies the syntax transmitted at the -->
 64          <!-- start of "Program 2 - Chapter 1". -->
 65          <Event
 66            duration="0"
 67            id="2">
 68            <Signal xmlns="http://www.scte.org/schemas/35/2016">
 69              <SpliceInfoSection>
 70                <TimeSignal />
 71                <!-- Program Start -->
 72                <SegmentationDescriptor
 73                  segmentationEventId="3131961359"
 74                  segmentationDuration="110797200"
 75                  segmentationTypeId="16"
 76                  segmentNum="1"
 77                  segmentsExpected="1">
 78                  <!-- Uniquely identifies "Program 2". -->
 79                  <SegmentationUpid
 80                    segmentationUpidType="8"
 81                    segmentationUpidFormat="hexbinary">000002747B92A2B2</SegmentationUpid>
 82                </SegmentationDescriptor>
 83                <!-- Chapter Start (1st Chapter with the running Program. -->
 84                <!-- A total of 3 Chapters expected). -->
 85                <SegmentationDescriptor
 86                  segmentationEventId="3131961360"
 87                  segmentationDuration="8074800"
 88                  segmentationTypeId="32"
 89                  segmentNum="1"
 90                  segmentsExpected="3">
 91                  <!-- Uniquely identifies "Program 2 - Chapter 1". -->
 92                  <SegmentationUpid
 93                    segmentationUpidType="8"
 94                    segmentationUpidFormat="hexbinary">000002747B92A2B2</SegmentationUpid>
 95                </SegmentationDescriptor>
 96                <!-- Content Identification -->
 97                <SegmentationDescriptor
 98                  segmentationEventId="3131961361"
 99                  segmentationDuration="0"
100                  segmentationTypeId="1"
101                  segmentNum="0"
102                  segmentsExpected="0">
103                  <!-- Managed Private UPID (formatIdentifier = 'TVST'). -->
104                  <!-- Representating the name 'TV Station'. -->
105                  <SegmentationUpid
106                    segmentationUpidType="12"
107                    formatIdentifier="1414943572"
108                    segmentationUpidFormat="hexbinary" />
109                </SegmentationDescriptor>
110              </SpliceInfoSection>
111            </Signal>
112          </Event>
113        </EventStream>
114      </par>
115    </seq>
116  </body>
117</smil>

Importing SCTE 35 Timed Metadata

Unified Remix can also load SCTE 35 SpliceInsert markers from an external ISO BMFF file containing DASHEventMessageBoxes (emsg) or as an ISOBMFF event message track that uses 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<?xml version="1.0" encoding="utf-8"?>
 2<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
 3  <body>
 4    <seq>
 5      <par
 6        clipBegin="wallclock(1970-01-01T00:00:00.000Z)"
 7        clipEnd="wallclock(1970-01-01T99:99:99.999Z)" >
 8        <video src="video.mp4" />
 9        <video src="audio_eng.mp4" />
10        <video src="emsg.mp4" />
11      </par>
12    </seq>
13  </body>
14</smil>

The resulting HLS Media Playlist:

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