Injecting SCTE-35 with a Plan โ
When it comes to inserting SCTE-35 markers, the encoder is usually the first thing that comes to mind. However, for testing or demos, touching the encoder is cumbersome. StreamLive has a reserved event resource called Plan, and using the SCTE35_SPLICE_INSERT type there lets you push markers straight in without an encoder.
Request Example โ
Suppose you insert one 60 seconds ad break into a live channel that is currently running.
cat > /tmp/plan.json <<'EOF'
{"EventName":"justinkim_ad_break_001",
"TimingSettings":{"StartType":"IMMEDIATE"},
"EventSettings":{"EventType":"SCTE35_SPLICE_INSERT",
"SpliceEventID":909001,
"SpliceDuration":"5400000"}}
EOF
tccli mdl CreateStreamLivePlan --region ap-seoul \
--ChannelId 6941****5240 \
--Plan "$(cat /tmp/plan.json)"The moment the Plan is created, the marker enters the channel. If you look at the media playlist about 10 seconds later, here is the output example.
#EXT-X-CUE-OUT-CONT:ElapsedTime=8.2,Duration=60,SCTE35=/AAgAAGuKZt0AAAADwUADd7KAPCAAFJlwAAAAAAAANYfkZ8=
#EXT-X-PROGRAM-DATE-TIME:2026-09-14T06:29:22.361Z
#EXTINF:4.000, seq 40778661After 60 seconds, #EXT-X-CUE-IN is displayed and the ad break ends.
Calculating SpliceDuration โ
The unit of SpliceDuration is 90kHz ticks. Thinking in seconds is confusing.
tick = seconds ร 90000| Ad Break | Tick Value |
|---|---|
15 seconds | 1350000 |
30 seconds | 2700000 |
60 seconds | 5400000 |
90 seconds | 8100000 |
Pass this value in string format.
TimingSettings โ
| StartType | Behavior |
|---|---|
IMMEDIATE | Executes immediately when the Plan is created |
ABSOLUTE | Executes at the time specified in Time |
IMMEDIATE fires as soon as it is created. It is confusing at first that this is not a "turn it on later" concept. If you need scheduling, use ABSOLUTE together with Time.
{
"StartType": "ABSOLUTE",
"Time": "2026-09-15T12:00:00Z"
}Attaching a Segmentation Descriptor โ
The default splice_insert alone is often sufficient, but if the ad system requires a segmentation type, specify SCTE35SegmentationDescriptor as well.
{
"EventName": "justinkim_ad_break_002",
"TimingSettings": {
"StartType": "IMMEDIATE"
},
"EventSettings": {
"EventType": "SCTE35_SPLICE_INSERT",
"SpliceEventID": 909002,
"SpliceDuration": "5400000",
"SCTE35SegmentationDescriptor": [
{
"EventID": 909002,
"EventCancelIndicator": 0,
"Duration": 5400000,
"UPIDType": 0,
"UPID": "justinkim-ad-break-002",
"TypeID": 52,
"Num": 0,
"Expected": 0,
"SubSegmentNum": 0,
"SubSegmentsExpected": 0
}
]
}
}The TypeID value is the SCTE-35 segmentation_type_id.
| TypeID | Meaning |
|---|---|
48 | Provider Advertisement Start |
49 | Distributor Advertisement Start |
52 | Provider Placement Opportunity Start |
53 | Distributor Placement Opportunity Start |
54 | Break Start |
The value put in AdTriggers and this TypeID must match each other. Choose while also looking at the AdTriggers values table.
EventType Types โ
| EventType | Purpose |
|---|---|
SCTE35_SPLICE_INSERT | Entering an ad break (the main subject of this document) |
SCTE35_RETURN_TO_NETWORK | Ending an ad break |
SCTE35_TIME_SIGNAL | Time signal |
TIMED_METADATA | ID3 metadata insertion |
ID3_SEGMENT_TAGGING | Per-segment tagging |
INPUT_SWITCH | Input switching |
TIMED_RECORD | Segment recording |
With SCTE35_SPLICE_INSERT alone, both entry and exit are handled together. When SpliceDuration ends, CUE-IN is issued automatically.
Managing Plans โ
The Plan API provides create / query / delete.
# List
tccli mdl DescribeStreamLivePlans --region ap-seoul --ChannelId 6941****5240
# Delete
tccli mdl DeleteStreamLivePlan --region ap-seoul \
--ChannelId 6941****5240 --EventName justinkim_ad_break_001A IMMEDIATE Plan executes immediately after creation. Clean up the execution history when testing is finished.
How to Verify โ
The fastest way to check whether the marker was actually sent is to look at the media playlist.
curl -s "https://<endpoint>/<rendition>.m3u8" | grep -E "CUE-OUT|CUE-IN"After the marker executes, check #EXT-X-CUE-OUT-CONT; after the specified segment ends, check #EXT-X-CUE-IN. Query at intervals shorter than the playlist retention period.
Notes โ
SpliceDuration is in units of 90kHz ticks. Specify 60 seconds with 60 ร 90000 = 5400000.
Apply Plans to StreamLive channels in the RUNNING state.
SpliceEventID is a 32-bit unique value. It is safer to change the ID each time you repeat a test.