Custom Ad Breaks

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <source>[SourceFile]</source> <!-- required-->
    <format>
        <output>[advanced_hls|fmp4_hls|advanced_fmp4|advanced_dash]</output>
        <apply_timecode>[yes|no]</apply_timecode>
        <!-- multiple ad_breaks may be included -->
        <ad_break>
            <start>[StartTime]</start>
            <end>[EndTime]</end>
            <duration>[BreakDuration]</duration>
            <drop_segments>[yes|no]</drop_segments>
            <!-- multiple marker_type parameters may be included -->
            <marker_type>[MarkerType1]</marker_type>
            <marker_type>[MarkerType2]</marker_type>
            <marker_type>[MarkerTypeN]</marker_type>
            <id>[BreakID]</id>
            <!-- multiple upid_data sections may be included -->
            <upid_data>
                <segmentation_upid_type>[SegmentationUPIDType]<segmentation_upid_type>
                <segmentation_upid>[SegmentationUPID]<segmentation_upid>
            </upid_data>
            <upid_data>
                <!-- upid_data params -->
            </upid_data>
            <add_cue_in_tag>[yes|no]</add_cue_in_tag>
            <add_discontinuity_tag>[yes|no]</add_discontinuity_tag>
        </ad_break>
        <ad_break>
            <!-- ad_break params -->
        </ad_break>
        <!-- multiple cue_inserts may be included -->
        <cue_insert>
            <start>[StartTime]</start>
            <end>[EndTime]</end>
            <duration>[BreakDuration]</duration>
            <drop_segments>[yes|no]</drop_segments>
            <!-- multiple marker_type parameters may be included -->
            <marker_type>[MarkerType]</marker_type>
            <marker_type>[MarkerType2]</marker_type>
            <marker_type>[MarkerTypeN]</marker_type>
            <id>[BreakID]</id>
            <!-- multiple upid_data sections may be included -->
            <upid_data>
                <segmentation_upid_type>[SegmentationUPIDType]<segmentation_upid_type>
                <segmentation_upid>[SegmentationUPID]<segmentation_upid>
            </upid_data>
            <upid_data>
                <!-- upid_data params -->
            </upid_data>
        </cue_insert>
        <cue_insert>
            <!-- cue_insert params -->
        </cue_insert>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>", // required
        "userkey": "<<key>>", // required
        "action": "[Action]", //  // requiredrequired
        "source": "[SourceFile]",
        "format": { // required
            "output": "[advanced_hls|fmp4_hls|advanced_fmp4|advanced_dash]",
            "apply_timecode": "[yes|no]",
            "ad_break": [
                {
                    "start": "[StartTime]",
                    "end": "[EndTime]",
                    "duration": "[BreakDuration]",
                    "drop_segments": "[yes|no]",
                    "marker_type": [
                        "[MarkerType1]",
                        "[MarkerType2]",
                        "[MarkerTypeN]"
                    ],
                    "id": "[BreakID]",
                    "upid_data": [
                        {
                            "segmentation_upid_type": "[SegmentationUPIDType]",
                            "segmentation_upid": "[SegmentationUPID]",
                        },
                        {
                            // upid_data params
                        }
                    ],
                    "add_cue_in_tag": "[yes|no]",
                    "add_discontinuity_tag": "[yes|no]"
                },
                {
                    // ad_break params
                }
            ],
            "cue_insert": [
                {
                    "start": "[StartTime]",
                    "end": "[EndTime]",
                    "duration": "[BreakDuration]",
                    "drop_segments": "[yes|no]",
                    "marker_type": [
                        "[MarkerType1]",
                        "[MarkerType2]",
                        "[MarkerTypeN]"
                    ],
                    "id": "[BreakID]",
                    "upid_data": [
                        {
                            "segmentation_upid_type": "[SegmentationUPIDType]",
                            "segmentation_upid": "[SegmentationUPID]",
                        },
                        {
                            // upid_data params
                        }
                    ]
                },
                {
                    // cue_insert params
                }
            ]
        }
    }
}

🚧

Note

ad_break options are only available for advanced_hls, fmp4_hls, advanced_fmp4, and advanced_dash output formats.

🚧

For start and end parameters

Specifying <apply_timecode /> will affect timecode value conversion of the <start /> and <end /> parameters of <ad_break />/<cue_insert />.

👍

SCTE35 credits

For SCTE35 opening and closing credits, you can use a <cue_insert /> parameter block. It has the same sub-parameters as <ad_break /> except <marker_type/>.

Parameter

Description

Allowed Values

Default Values

marker_type (ad_break)

Break Marker Type

For advanced_dash:

  • scte-35 — adds <scte35:signal /> block.

For advanced_hls, fmp4_hls, advanced_fmp4:

  • cue-out-in — adds #EXT-X-CUE-OUT/EXT-X-CUE-IN tag.
  • scte-35 — adds #EXT-X-SCTE35 tag.
  • cue — adds #EXT-X-CUE tag.
  • daterange — adds #EXT-X-DATERANGE tag.

cue-out-in

marker_type (cue_insert)

For advanced_dash:

  • scte35-opening-credit — adds <scte35:signal /> opening credits block.
  • scte35-closing-credit — adds <scte35:signal /> closing credits block.
  • scte35-chapter-marker — adds <scte35:signal /> chapter marker block.
  • scte35-content-identification — adds <scte35:signal /> content identification block.

For advanced_hls, fmp4_hls, advanced_fmp4:

  • scte35-opening-credit — adds #EXT-X-SCTE35 opening credits tag.
  • scte35-closing-credit — adds #EXT-X-SCTE35 closing credits tag.
  • scte35-chapter-marker — adds #EXT-X-SCTE35 chapter marker tag.
  • scte35-content-identification — adds #EXT-X-SCTE35 content identification tag.

scte35-opening-credit

id

Marker ID attribute

Positive integer

none

start

Place cue IN marker in it's value position of manifest

  • positive float number in seconds
  • timecode in format HH:MM:SS[:;]FF
    HH – hours
    MM – minutes
    SS – seconds
    FF – frames
    [:;] – : – non drop-frame, ; – drop-frame;

none

end

Place cue OUT marker in it's value position of manifest

  • positive float number in seconds
  • timecode in format HH:MM:SS[:;]FF
    HH – hours
    MM – minutes
    SS – seconds
    FF – frames
    [:;] – : – non drop-frame, ; – drop-frame;

none

duration

Specify the break duration in seconds.

  • positive float number in seconds
  • string in format HH:MM:SS[:;]FF
    HH – hours
    MM – minutes
    SS – seconds
    FF – frames
    [:;] – : – non drop-frame, ; – drop-frame;

none

drop_segments

Specify whether or not to drop segments during a break.

yes, no

no - for <ad_break />
yes - for <cue_insert />

add_cue_in_tag

Add CUE IN tag in HLS manifest

yes, no

yes

add_discontinuity_tag

Add discontinuity tag in HLS manifest before break

yes, no

no

upid_data parameters

segmentation_upid_type

UPID type

Positive integer number.

none

segmentation_upid

Unique UPID string for cue

Valid UPID string

none

🚧

For duration and end parameters

If the <end /> parameter is specified, the <duration /> will be ignored.

🚧

For segmentation_upid_type parameter

For now, we only support value 14 for the <segmentation_upid_type /> parameter.