Start Ad Breaks from Incoming SCTE

PLAYDECK can send SCTE markers with clip and block commands. It can also listen for incoming SCTE-35 or SCTE-104 and jump into a Break Block when a marker matches.

That is useful when an upstream encoder, automation, or another PLAYDECK channel fires the OUT cue — and you want your ad block to start automatically, then return when the break is over.

You need an SCTE license. The block must be a Break Block (Block End → Break), so PLAYDECK knows where to return after the ads.

In this article:
→ Open the SCTE Trigger editor
→ How matching works
→ Start Time
→ Block Duration modes
→ HTML overlay countdown (break duration from SCTE)
→ Re-emit OUT with cue duration (and CUE-IN on Block Exit)
→ Quick recipe (typical FAST / server cue)
→ Related


Open the SCTE Trigger editor

Select the Break Block header and open Edit SCTE Trigger (playlist shows a small SCTE hint when triggers are saved).

Each trigger has:

  • SCTE OUT — Play this Block — pattern(s) that start the Break
  • SCTE IN — Return — optional pattern(s) that end the Break early (depending on duration mode)
  • Start Time — when the Break starts after an OUT match
  • Block Duration — how long the Break runs before return


Use SCTE Logs in the dialog (or Logs → SCTE) while testing.


How matching works

Put one match string per line in the OUT and IN memos. Every non-empty line must appear in the incoming marker text (All lines = AND). Spaces and quotes are ignored. Samples for SCTE-35 / SCTE-104 (and duration variants) are in the dialog — use them as a starting point, then trim to what your feed really sends.

The OUT pattern must match what PLAYDECK actually receives. Open Logs → SCTE while testing. Lines starting with << show the inbound cue — copy distinctive fragments into your match lines.

Examples of fragments people often match:

  • SCTE-35 immediate OUT: SpliceInfoSection, SpliceInsert, outOfNetworkIndicator=”1″, spliceImmediateFlag=”1″
  • SCTE-35 IN: SpliceInfoSection, SpliceInsert, outOfNetworkIndicator=”0″
  • SCTE-104 OUT (decoded inbound, not raw hex data): SCTE-104, multiple_operation_message, opID 257, splice_insert_type 2
  • SCTE-35 timed start with ptsTime (for example TimeSignal): SpliceInfoSection, TimeSignal, ptsTime


If your OUT pattern still requires spliceImmediateFlag="1", a cue with Flag="0" or a TimeSignal-only marker will never fire. Always align the pattern with a real << line from your log.

Triggers react only to inbound << cues, not to >> send lines alone. For a loopback test, the listening input must see the stream that carries the marker.


Start Time

When the OUT pattern matches, Start Time decides when the Break Block actually starts.

ModeWhat happens
Immediately after arrivalStart the Break as soon as the OUT pattern matches (default).
Delay from SCTE cue (pre-roll / PTS / timestamp)Read a start delay from the cue (see below). If nothing usable is found, PLAYDECK starts now and writes a note in the SCTE log.
Fixed Delay (MM:SS:FF)Wait this long after the match, then start. FF is handled like show duration, then applied using the channel frame rate.

Delay from SCTE cue — what is read

SCTE-104

  • pre_roll_time in milliseconds
  • and/or <timestamp>: time_type 0 = process now; 1 = UTC (NTP); 2 = VITC-style wall-clock (hours / minutes / seconds / frames)
  • Effective delay = time until that moment (if still in the future) plus pre-roll


SCTE-35

  • spliceImmediateFlag="1" → delay 0 (same as immediate for start)
  • otherwise ptsTime / pts_time (90 kHz program clock), compared to the stream clock on the same frame that carried the cue → delay until that point (with a safety cap)


If the target time is already in the past (VITC or PTS), the Break starts immediately.

Not every send path preserves ptsTime on every cue type. What matters in production is whether your << inbound log still contains ptsTime (or 104 pre-roll / timestamp). TimeSignal markers that include ptsTime are a common case for timed SCTE-35 starts.


Block Duration modes

ModeWhat happens
Wait for SCTE INOUT starts the Break (after Start Time). Return when an IN pattern matches. You must set Pattern IN.
Duration from SCTE OUT (break duration)OUT starts the Break. Return after the break duration carried in that OUT marker: SCTE-35 BreakDuration / duration (90 kHz ticks), or SCTE-104 break_duration (tenths of a second). If no duration is found, PLAYDECK falls back to waiting for IN (if you set one).
Fixed DurationOUT starts the Break. Return after the time you enter (HH:MM:SS).
Play until Block endOUT starts the Break. Return when the Break Block finishes normally (same idea as a scheduled/action Break reaching its end).

An IN match always returns early and cancels a running timer.

Cues without a break duration (for example many TimeSignal-only markers) need Fixed Duration, Wait for SCTE IN, or Play until Block end — otherwise PLAYDECK has no return path and will log that.

When OUT fires, PLAYDECK remembers the clip that was playing and jumps into the Break. Return uses that saved position (via the Break’s After Break setting / normal return path).


HTML overlay countdown (break duration from SCTE)

When Block Duration is Duration from SCTE OUT (break duration), PLAYDECK remembers the break length from that OUT cue. You can show it in an HTML or Text overlay (FAST “no ad to insert” slate / countdown) — no extra webhook needed.

Put these placeholders in your HTML (file or URL query) or in a simple Text overlay. They fill while an SCTE cue with a usable duration is active; otherwise they stay empty (no leftover {…} on screen).

  • {scteduration} — break length as a time string (same style as other duration placeholders)
  • {sctedurationsec} — break length in seconds (decimal)
  • {sctereceivedunix} — Unix time when the OUT cue was received
  • {sctestartunix} — Unix time when the Break is scheduled to start (after Start Time / delay)
  • {eventlastid} / {eventlastidhex} — last splice event ID issued on this channel (same counter as outbound SCTE commands)

Tip: drop {scteduration} into a Text Overlay first to confirm the value before you wire HTML.

On Backup with Follow / status, these cue values are copied so a countdown on the Backup box stays in sync with Main.

Typical setup:

  • Break Block + Edit SCTE Trigger → Duration from SCTE OUT
  • Looping background / slate in the Break
  • Overlay on that clip (Clip start → Clip end) reading {scteduration} / {sctedurationsec}

Return still follows your duration mode. Attach the overlay to the Break clip so it hides when playout leaves the Break.


Re-emit OUT with cue duration (and CUE-IN on Block Exit)


Sometimes the machine that plays the Break does not see the live SCTE feed, but still must signal the packager when the Break starts (and ends).

  • Block Start command: outbound SCTE-35 / SCTE-104 Out. Use {scteduration} (SCTE-35, 90 kHz ticks) or {scteduration10} / {scteduration10hex} (SCTE-104 tenths) instead of {blockduration} when the length must match the incoming cue — not the playlist block length.
  • Block Exit command: outbound In / CUE-IN with {eventlastid} (or hex). Block Exit runs when you leave the Block for any reason — natural end or early return (SCTE timer / IN, Action). Block End still means only “last clip reached last frame”.

Same placeholders appear under Show Placeholder in the Commands dialog. Details and XML samples: Sending SCTE-35 · SCTE-104 on SDI · Ad Breaks.


Quick recipe (typical FAST / server cue)

  • Commands on clips/blocks/Actions = send SCTE (>> in the log). See SCTE-35 / SCTE-104 articles.
  • SCTE Triggers on a Break Block = react to incoming markers (<<) and drive playout.


Both can live in the same project. A Break can still carry outbound SCTE commands Block Start / Block Exit, if your packager also needs markers from PLAYDECK.

For live ingest that must survive the Break, use a permanent Channel Input (not a playlist stream URL) — see Ad Breaks.

Typical setups

  • Server sends immediate SCTE-35 OUT → Start Time: Immediately after arrival; Duration: from SCTE OUT, or Fixed / Wait for IN
  • SCTE-104 with pre-roll or timestamp → Start Time: Delay from SCTE cue; Duration as needed
  • SCTE-35 with ptsTime in the inbound cue → Start Time: Delay from SCTE cue; OUT pattern must match that cue (not only Flag="1"); Duration often Fixed or Wait for IN if the marker has no break duration


While testing

  • >> in the log = something was sent
  • << = PLAYDECK received a cue
  • OUT/DELAY, OUT/PLAY, START/PLAY, IN/RETURN, TIMER/RETURN = trigger actions

Related

ArticleTopic
Closed Captions & SCTE — OverviewFull matrix, domains, embed flags
Sending SCTE-35 to a stream serverUDP/SRT/DVB, Nimble, HLS
Closed Captions & SubtitlesCC burn-in / pass-through
Recording CC & SCTEMKV vs TS, sidecars, playback checks
Using SCTE-104 on SDISDI VANC markers
Ad BreaksOverlays on Break clips