Requirements - Conditioning Media

Unified Remix can optionally transcode H264 encoded media segments in order to ensure that a keyframe is present at splice points. This generally affects only one segment per track for each splice point; all other segments are referenced as is.

Transcoding is done using the Intel Media SDK / Media Server Studio.

When transcoding is required the original GOP containing the splice point will be split into two GOPs with an additional keyframe at the time of the splice point. If the presentation time of the event does not match up exactly with the keyframe's presentation time because the event's time falls within the duration of the keyframe, the presentation time of the event will be adjusted to match that of the keyframe.

The transcoded media is included in the remixed MP4 created by Unified Remix.

As this means the final video will have been encoded by two different encoders some decoding parameters may vary. This is why the resultant video will be signaled as 'avc3' rather than 'avc1'. This may cause issues with players that do not support it.

In SMIL playlists for Unified Remix you define conditioning information either using the @clipMode="gop|sample" attribute that specifies how the @clipBegin and @clipEnd values are to be interpreted relative to the media, or using the syntax defined by the OpenCable Event Signaling and Management API specification.

Specifying conditioning info using 'clipMode'

The @clipMode="gop|sample" attribute specifies how @clipBegin and @clipEnd values are interpreted relative to the media:

@clipMode Description
gop Aligns to the keyframe using the time given and searching backwards (default).
sample Condition the media by inserting a keyframe when not present at the given time.

In an example SMIL playlist:

<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)"
  clipMode="sample" />

When @clipMode is set to gop, Unified Remix adjusts the provided start and end times if necessary, so that the selected timespan begins and ends with a keyframe (on the media's timeline, Remix will scan towards the left in search of a keyframe, starting from the provided start or end time).

When @clipMode is set to sample, Unified Remix reconditions the content if necessary, so that the start and end of the specified timespan both coincide with a keyframe.

Specifying conditioning info using CableLabs' Event Signaling and Management API

You can also use the the syntax defined by the OpenCable Event Signaling and Management API specification to specify the exact points where content needs to be conditioned. To do this, you need to add a separate element to your SMIL playlist:

<ConditioningInfo xmlns="urn:cablelabs:iptvservices:esam:xsd:signal:1"
  startOffset="PT1S"
  duration="PT6S" />

The @startOffset is relative to the begin of the surrounding seq and signals where Unified Remix needs to create a keyframe for a seamless splice out.

The @duration signals the duration of the break/pod/avail where Unified Remix creates a keyframe for a seamless splice return.

The @presentationTime of the corresponding DASH Event Message must match @startOffset.

The example below shows how to specify ConditioningInfo in a SMIL playlist. It also signals the event that the conditioning information is associated with. As you can see on the highlighted lines, the event and the conditioning info share the same @duration, and the @presentationTime of the event matches the @startOffset of the specified conditioning info:

 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
<?xml version="1.0" encoding="UTF-8"?>
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
  <head>
  </head>
  <body>
    <seq>
      <par
        clipBegin="wallclock(1970-01-01T00:00:00.000Z)"
        clipEnd="wallclock(1970-01-01T00:00:16.000Z)" >
        <audio
          src="tears-of-steel-aac-128k.mp4" />
        <video
          src="tears-of-steel-avc1-400k.mp4" />
        <video
          src="tears-of-steel-avc1-750k.mp4" />
        <video
          src="tears-of-steel-avc1-1500k.mp4" />
        <video
          src="tears-of-steel-en.ismt" />
        <EventStream xmlns="urn:mpeg:dash:schema:mpd:2011"
          schemeIdUri="urn:scte:scte35:2014:xml+bin"
          timescale="90000">
          <Event
            presentationTime="90000"
            duration="540000"
            id="1">
            <Signal xmlns="http://www.scte.org/schemas/35/2016">
              <SpliceInfoSection>
                <SpliceInsert
                  spliceEventId="1234"
                  outOfNetworkIndicator="1"
                  spliceImmediateFlag="1"
                  availNum="0"
                  availsExpected="0">
                  <Program />
                  <BreakDuration
                    autoReturn="1"
                    duration="540000" />
                </SpliceInsert>
              </SpliceInfoSection>
            </Signal>
          </Event>
        </EventStream>
        <ConditioningInfo xmlns="urn:cablelabs:iptvservices:esam:xsd:signal:1"
          startOffset="PT1S"
          duration="PT6S" />
      </par>
    </seq>
  </body>
</smil>