Custom Ad Breaks

<?xml version="1.0"?>
<query>
    <userid>[UserID]</userid> <!-- required-->
    <userkey>[UserKey]</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>
            <custom_tag>[CustomTag]</custom_tag>
            <add_video_keyframe>[yes|no]</add_video_keyframe>
        </cue_insert>
        <cue_insert>
           	<!-- cue_insert params -->
        </cue_insert>
    </format>
</query>
{
    "query": {
        "userid": "[UserID]", // required
        "userkey": "[UserKey]", // 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
                        }
                    ],
                    "custom_tag": "[CustomTag]",
                    "add_video_keyframe": "[yes|no]"
                },
                {
                    // 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 />.

ParameterDescriptionAllowed ValuesDefault Values
startPlace 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
durationSpecify 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_segmentsSpecify whether or not to drop segments during a break.yes, nono - for <ad_break />
yes - for <cue_insert />
marker_type (ad_break)Break Marker TypeFor 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 – #EXT-X-SCTE35 tag.
• cue – adds #EXT-X-CUE tag.
• daterange – adds #EXT-X-DATERANGE tag.
cue-out-in
idMarker ID attributePositive integernone
endPlace 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
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.
• scte35-alternate-content – adds <scte35:signal /> alternate content 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-provider-overlay – adds #EXT-X-SCTE35 provider overlay placement opportunity data.
• custom-tag – adds custom CUE point tag specified in <scte35:custom_tag /> parameter.
• scte35-alternate-content – adds #EXT-X-SCTE35 alternate content tag.
scte35-opening-credit
upid_data parameters---
segmentation_upid_typeUPID typePositive integer number.none
segmentation_upidUnique UPID string for cueValid UPID stringnone
add_cue_in_tagAdd CUE IN tag in HLS manifestyes, noyes
add_discontinuity_tagAdd discontinuity tag in HLS manifest before breakyes, nono
custom_tagValue of custom cue_insert with "custom-tag" marker_type.Valid HLS m3u8 tagnone
add_video_keyframeSegment video stream at given CUE pointyes, noyes

🚧

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.

🚧

For custom-tag marker_type and custom_tag parameter

  • The <marker_type /> value custom-tag available only for <cue_insert /> of HLS output formats.
  • The <custom_tag /> parameter is required for <cue_insert /> if <marker_type /> set to custom-tag.