Black out or replace the program on a running Live stream
Available in: UI · API
Use this how-to when a running Live stream must temporarily stop showing the live input — for an unscheduled break, a compliance event or a planned slate. The runtime operation is runtimeApplyBlackout; it persists the change and the encoder reconciles within a few seconds.
When to use this
When the live input must be cut to a black frame or a static media file (slate, holding card, rights-blocked replacement), and then resumed cleanly. The blackout also supports a Keep input audio during blackout option that preserves the live audio while only the video is replaced — for radio-as-video broadcasts, see Broadcast radio as video for the end-to-end walkthrough.
Prerequisites
- A Live stream that is currently running (
LiveStream.status = 2). - A user with the Operator or System Administrator role.
- The Live stream's Encoding video codec is H.264, HEVC, or
logo. The UI disables the Blackout tab on other codecs and the API rejects the call. Thelogocodec produces H.264 video underneath, so it works with Blackout the same way H.264 does — combined with the Keep input audio during blackout option below, it powers the radio-as-video pattern. - When replacing the output with a media file (
mode = File): an Asset whose filename is reachable by the encoder. List candidate assets withlistAssets({ fileType: "files" }).
Compatibility — when Blackout is not available
The UI disables the Blackout tab when one of these conditions holds. The reason code is computed in RuntimeOperations.vue:
| Reason code | Meaning |
|---|---|
invalid_codec | The bound Encoding's video codec is neither H.264 nor HEVC. |
hevc_above_1080p | The Encoding is HEVC above 1080p. Blackout relay corrupts the stream in this combination. |
hevc_hdr | The Encoding is HEVC with HDR active. |
hevc_hdr_above_1080p | The Encoding is HEVC with HDR active and above 1080p. |
To use Blackout on a UHD HEVC ladder, downscale the Encoding to 1080p or switch the codec to H.264.
Via UI
Navigation: On air → <row> → Blackout tab in the runtime panel.
Open the runtime panel
Click the row of the running Live stream on On air to expand its runtime panel.
Switch to the Blackout tab
Click the Blackout icon (blackout.svg) in the runtime cluster. The Blackout panel renders inline; if the Live stream is in one of the unsupported configurations above, the panel renders the corresponding reason message instead.
Pick a mode
| UI mode | API value | Effect |
|---|---|---|
| Live | Live | Resume the live input. Use this to exit a blackout. |
| Black frame | BlackFrame | Replace the output with a black frame. |
| File | File | Replace the output with the chosen media file (asset filename required). |
(Optional) Keep the live audio
Tick the Keep input audio during blackout checkbox to preserve the live audio of the input Channel while only the video is replaced. The encoder generates the slate video-only and the publish loop forwards the live audio untouched. Useful for radio-as-video broadcasts and for compliance situations where the audio commentary must continue while the video is held.
The checkbox is enabled in BlackFrame and File modes; it is hidden in Live mode (returning to the live input always restores both video and audio).
Submit
Submit. The new state lands on the output within a few seconds.
Via API
| Action | Method + path | operationId |
|---|---|---|
| Apply blackout | POST /c21apiv2/livestreams/{id}/runtimeOptions/blackout | runtimeApplyBlackout |
Black frame:
curl -X POST "https://<your-host>/c21apiv2/livestreams/<livestreamId>/runtimeOptions/blackout" \
-H "Authorization: Bearer <YOUR_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "mode": "BlackFrame" }'
Replace with a media file:
curl -X POST "https://<your-host>/c21apiv2/livestreams/<livestreamId>/runtimeOptions/blackout" \
-H "Authorization: Bearer <YOUR_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "mode": "File", "file": "intro_slate.mp4" }'
Resume the live input:
curl -X POST "https://<your-host>/c21apiv2/livestreams/<livestreamId>/runtimeOptions/blackout" \
-H "Authorization: Bearer <YOUR_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "mode": "Live" }'
Replace the video only (keep the live audio):
curl -X POST "https://<your-host>/c21apiv2/livestreams/<livestreamId>/runtimeOptions/blackout" \
-H "Authorization: Bearer <YOUR_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "mode": "File", "file": "weather_map.mp4", "keep_input_audio": true }'
Body shape:
| Field | Notes |
|---|---|
mode | One of Live, BlackFrame, File. The accepted-but-deprecated alias Black Frame (with a space) is preserved for backwards compatibility; new integrations use BlackFrame. |
file | Required when mode = File. The handler rejects the request with APIf517 if file is omitted, contains a path separator or is not found on disk. |
keep_input_audio | Optional boolean. Applies in any mode other than Live. When true, the slate is generated video-only and the live audio of the input Channel is forwarded untouched. Defaults to false (slate carries both video and audio — legacy behavior). Idempotency takes the flag into account — (BlackFrame, false) → (BlackFrame, true) is a real transition, not a skip. |
Response data. { mode, file, keep_input_audio, applied_at, changed, warning? }. changed: false means the broadcast was already in the requested state (idempotent skip). warning is present only when the encoder did not acknowledge in time; the new state is persisted and the encoder reconciles on its own.
Verify
- The Live stream's row on On air reflects the new state.
- A subsequent
GET /c21apiv2/livestreams/{livestreamId}/statusreturns the updated blackout state. - The next keyframe on the output stream carries the new program.
FAQ
mode = Live (or the Live stream stops). The state is persisted on the broadcast.APIf517 "With File mode of blackout must be select a file" and the broadcast keeps its current mode. Upload the file to the encoder via the standard Assets flow before retrying.hevc_above_1080p, hevc_hdr or hevc_hdr_above_1080p. To use Blackout, downscale the Encoding to 1080p or switch the codec to H.264.