Unified Origin - Recommendations for DAI

Important

The Unified Origin - Recommendations for Live should be follwed first.

Preparing your media for OTT delivery is important to achieve efficiency and quality of experience.

Media alignment at splice boundaries

We recommend alignment between audio and video fragments, constant fragment durations and efficient encoding (one GOP per fragment). This will optimize the media for streaming delivery, in terms of bandwidth usage, manifest sizes and for clipping and archiving of the content.

However, the introduction of SCTE 35 markers and additional IDR frames can have an impact on the alignment of your output. This is due to the fact AVC video (with a framerate of 25 FPS) & AAC audio (with a sample rate of 48kHz) only fully align at a 0,32s interval. If the SCTE marker does not match this interval (which is often won't) the resulting audio and video duration will not be fully aligned. The same issue can also occur with other framerates (such as 23.97, 24, 30) resulting in a different alignment interval.

../_images/dai_splice_general.png

Whilst normally this has no impact on quality of experience, it should be noted that poor quality of experience can occur (depending upon content, platform, and player behavior).

One example would be any large change in audio level between main program and advertisement at splice points. Therefore it is recommended to review content creation guidelines and test your content before deploying in production.

Unified Origin requirements

The following requirements are separated into two sections. Ingress relates to the formatting, structure, and method of delivery to Packager or Origin, to ensure data is processed as efficiently as possible. The 'ingress' requirements apply to the encoding platform generating the SCTE 35 message and stream. 'Egress' relates to options configured within for Packager or Origin to ensure successful delivery to the Ad Insertion Service.

Ingress

  • Received as DASH event messages (contained in a emsg box inside a fMP4 container) OR Cablelabs ESAM (XML contained in an mdat inside a fMP4 container)
  • Received ahead of the desired presentation. At least 2x ahead of the target fragment length. If this is not available time shift can be used to delay the presentation live edge, allowing for correct calculation of segment duration.
  • Received as a separate track
  • Each message received must have a corresponding IDR frame for at each timestamp that is signaled in a SCTE 35 message.
  • When Inserting an IDR frame the encoder should not shorten or lengthen any of the media segments but keep the original length intact.
  • Ensure urn:scte:scte35:2013:bin is used when delivering DASH Events (emsg).

Egress

  • Always set --hls_minimum_fragment_length equal to or multiple of (if encoder splices) the GOP, unless the source encoder segmentation divides evenly into the default value of 4 seconds
  • --dvr_window_length is shorter than --archive_length to mitigate fragment length changes when transitioning from between dvr windows.
  • Only splice_insert() OR time_signal() messages can actioned upon, not both.

Important configurable options

  • --timed_metadata (Packager and Origin)
  • --splice_media (Packager and Origin)
  • --time_signal (Packager and Origin)
  • --[hls|mpd].minimum_fragment_length (Origin only)
  • --mpd.segment_template=[time|number] (Origin only)

When only --splice_media is used, Packager or Origin may slice a media segment (at the times specified by the splice_insert() message).

When both --splice_media and --time_signal are used, splice_insert() messages will be ignored and time_signal() messages will be used instead. When relying on time_signal() messages make sure that specify the types of messages that Origin needs to act on.

This results in the following (example):

  • Option A - splice_insert() --timed_metadata --splice_media
  • Option B - time_signal() --timed_metadata --splice_media --time_signal=34,35

Note

It is not possible to use a query parameter to filter out the timed metadata track, or to disable it. If the stream ingested by Origin contains SCTE 35 messages you can either enable passthrough using the --timed_metadata option when creating the server manifest, or disable it by not specyfing it.

Req.: Receive SCTE markers 2x ahead

SCTE markers are received by the Origin ahead of the desired presentation. At least 2x ahead of the target fragment length. If this is not possibe, time shift can be used to delay the presentaiton live edge allowing time for stream conditioning. [Example]

Req.: Set hls_minimum_fragment_length

Always set hls_minimum_fragment_length equal to or multiple of (if encoder splices) the GOP, unless the source encoder segmentation divides evenly into the default value of 4 seconds

Rec.: Set mpd_segment_template

Should mpd_minumum_fragment_length be set ensure mpd_segment_template is also set to equal either time or number.

Req.: Set dvr_window_length

dvr_window_length should always be set to a duration greater than the longest duration advertisement.