---
title: "Update Stream"
method: PATCH
path: "/stream/{stream_id}"
tags: ["Apis", "Streaming"]
---

# Update Stream

`PATCH /stream/{stream_id}`

Update a stream's configuration (merged by `id`, never removing existing entries) and apply live runtime adjustments such as toggling dubbing on or off. Allowed while the stream is scheduled, setting up, or started.

## Path parameters

- `stream_id` integer, required

## Request body

- UpdateStreamDataRequestPayload — Partial update of a stream. All fields are optional; omit anything you do not want to change. List fields carrying `id`s (`audio_selections`, `processing_profiles`, `encoding_profiles`, `pipelines`, `target_streams`) are merged by `id`: entries you send are added or replaced, existing entries are never removed.
  - `name` string, nullable — New display name.
  - `description` string, nullable — New description.
  - `initial_delay` integer, nullable — New setup lead time in seconds.
  - `voices` integer[], nullable — Replacement list of voice IDs. Empty means voices are cloned from the source speakers.
  - `dictionaries` integer[], nullable — Replacement list of dictionary IDs (up to 5).
  - `start_time` string, date-time, nullable — New scheduled start (ISO 8601 with UTC offset). Requires `timezone`.
  - `end_time` string, date-time, nullable — New scheduled end (ISO 8601 with UTC offset). Requires `timezone`.
  - `timezone` string, nullable — IANA time zone the updated times are expressed in.
  - `audio_selections` AudioSelection[], nullable — Audio selections to add or replace (merged by `id`).
    - `id` string, required — Your identifier for this selection, referenced by `pipelines[].audio_selection`.
    - `source` string, required — Audio track selector. Accepts FFmpeg-style selectors (`a:0`, `1`, `eng`, `#0x1fe`, `i:301`, optionally with a channel suffix like `:ch0,1`) or magic selectors (`$first_audio`, `$second_audio`, `$last_audio`). Use [Probe a Source Stream](/api-reference/endpoint/streaming/probe-stream) to discover tracks.
    - `source_language` integer, required — Numeric language ID. Use [`GET /source-languages`](/api-reference/endpoint/get-source-languages) for valid `source_language` values and [`GET /target-languages`](/api-reference/endpoint/get-target-languages) for valid output `language` values. For example, `1` is English (US) and `54` is Spanish (Spain).
    - `background` string, nullable — Optional selector (same syntax as `source`) for a clean background/music track. When set, it is used as the background bed for mixing instead of demixing the source.
  - `processing_profiles` ProcessingProfile[], nullable — Processing profiles to add or replace (merged by `id`).
    - `id` string, required — Your identifier for this profile, referenced by `pipelines[].profile`.
    - `demixing` 'none' | 'best_model' | 'fast_model' — Selects the model tier for a processing step: `none` disables the step, `best_model` prioritises quality, `fast_model` prioritises latency.
    - `transcribing` 'none' | 'best_model' | 'fast_model' — Selects the model tier for a processing step: `none` disables the step, `best_model` prioritises quality, `fast_model` prioritises latency.
    - `translating` 'none' | 'best_model' | 'fast_model' — Selects the model tier for a processing step: `none` disables the step, `best_model` prioritises quality, `fast_model` prioritises latency.
    - `revoicing` 'none' | 'best_model' | 'fast_model' — Selects the model tier for a processing step: `none` disables the step, `best_model` prioritises quality, `fast_model` prioritises latency.
    - `mixing` OverdubConfig — Relative gains used when mixing dubbed audio over the original. `original_audio_gain` + `background_audio_gain` must not exceed 1.0.
      - `original_audio_gain` number, nullable — Volume of the original speaker while dubbed audio plays (0.0-1.0).
      - `background_audio_gain` number, nullable — Volume of background music/ambience during dubbed segments (0.0-1.0).
      - `fallback_audio_gain` number, nullable — Volume of the original audio while nothing is being dubbed (0.0-1.0).
      - `fade_time` number — Cross-fade duration in seconds when switching between original and dubbed audio (0-5).
    - `scte35_dubbing_control` Scte35DubbingControl — Automatically toggles dubbing on SCTE-35 ad-break markers. Each field is the dubbing state to apply on that marker (`enabled` or `disabled`); set a field to `null` to ignore that marker. Omit the whole object to ignore SCTE-35 entirely.
      - `on_out_of_network_start` string, nullable — Dubbing state applied when an ad break starts.
      - `on_out_of_network_end` string, nullable — Dubbing state applied when an ad break ends.
  - `encoding_profiles` EncodingProfile[], nullable — Encoding profiles to add or replace (merged by `id`).
    - `id` string, required — Your identifier for this profile.
    - `audio_codec` string, nullable — Audio codec, e.g. `aac`.
    - `audio_bitrate` string, nullable — Audio bitrate, e.g. `192k`.
    - `audio_channel_layout` string, nullable — Channel layout, e.g. `stereo`.
    - `video_codec` string, nullable — Video codec, e.g. `h264`.
    - `video_bitrate` string, nullable — Video bitrate, e.g. `5M`.
  - `pipelines` ProcessingPipeline[], nullable — Pipelines to add or replace (merged by `id`).
    - `id` string, required — Your identifier for this pipeline.
    - `profile` string, required — `id` of an entry in `processing_profiles`.
    - `audio_selection` string, required — `id` of an entry in `audio_selections`.
    - `outputs` PipelineOutput[], required — Assets this pipeline produces. Output `id`s must be unique across all pipelines.
      - `id` string, required — Your identifier for the produced asset, referenced by `target_streams[].inputs[].asset_id`.
      - `kind` 'audio' | 'subtitle' | 'video' | 'data', required — Type of asset a pipeline output produces.
      - `language` integer — Numeric language ID. Use [`GET /source-languages`](/api-reference/endpoint/get-source-languages) for valid `source_language` values and [`GET /target-languages`](/api-reference/endpoint/get-target-languages) for valid output `language` values. For example, `1` is English (US) and `54` is Spanish (Spain).
  - `source_stream` SourceStream — The live source to ingest.
    - `id` string, required — Your identifier for the source stream, e.g. `main-feed`.
    - `url` string, required — URL of the live source to ingest, e.g. `srt://ingest.example.com:9000`.
    - `category` 1 | 2 | 3 | 4 | 5 | 6 — Content category of the source stream, used to tune processing. | Value | Category | |---|---| | `1` | News and information | | `2` | Sports and entertainment | | `3` | Business and professional | | `4` | Education and training | | `5` | Events and ceremonies | | `6` | Government and official |
    - `passphrase` string, nullable — SRT encryption passphrase for the source, if the source is encrypted (10-79 characters).
    - `streamid` string, nullable — SRT `streamid` to send when connecting to the source, if it requires one. Not the Camb.ai stream ID.
    - `latency` integer, nullable — SRT receive latency in milliseconds (20-8000). Higher values tolerate more network jitter at the cost of delay. Recommended: `2000` for typical internet links.
  - `target_streams` TargetStream[], nullable — Target streams to add or replace (merged by `id`).
    - `id` string, required — Your identifier for the target, e.g. `youtube-es`.
    - `url` string, nullable — Destination URL to push to. Omit for SRT listener (`6`) and HLS recording (`3`) targets - their URLs are generated and returned in the create response and stream status.
    - `type` 1 | 2 | 3 | 4 | 5 | 6, required — Protocol/type of a target stream. | Value | Type | Description | |---|---|---| | `1` | SRT caller | Push output to your SRT endpoint (Camb.ai connects out to `url`). | | `2` | RTMP | Push output to an RTMP ingest `url`. | | `3` | HLS recording | Camb.ai-hosted HLS output; `url` and `inputs` are auto-assigned, and the playback URL is returned. | | `4` | YouTube RTMP | Push directly to a YouTube RTMP ingest URL. | | `5` | YouTube HLS | Push directly to a YouTube HLS ingest URL. | | `6` | SRT listener | Camb.ai hosts an SRT endpoint that you (or your player) pull from; `url` is auto-assigned and returned. |
    - `passthrough_policy` 'all' | 'none' — `all` forwards every source track that is not replaced by a pipeline output; `none` forwards nothing unless explicitly selected.
    - `inputs` TargetStreamInput[] — Tracks to include in this output. May be omitted when `passthrough_policy` is `all` or for auto-hosted target types.
      - `asset_id` string, nullable — `id` of a pipeline output to include.
      - `passthrough_selector` string, nullable — Selector (e.g. `v:0`, `a:eng`) for a source track to forward unprocessed.
      - `pid_policy` 'preserve' | 'auto' | 'explicit' — How MPEG-TS packet identifiers (PIDs) are assigned on the output: `preserve` keeps the source PID (passthrough inputs only), `auto` assigns one automatically, `explicit` uses the provided `pid`.
      - `pid` integer, nullable — Explicit MPEG-TS PID (32-8190). Required when `pid_policy` is `explicit`, forbidden otherwise.
      - `encoding_policy` 'preserve' | 'auto' | 'explicit' — How this input is encoded on the output: `preserve` copies the source codec where possible, `auto` picks sensible defaults, `explicit` applies the referenced `encoding_profile`.
      - `encoding_profile` string, nullable — `id` of an entry in `encoding_profiles`. Required when `encoding_policy` is `explicit`, forbidden otherwise.
    - `passphrase` string, nullable — SRT encryption passphrase to use when pushing to the destination.
    - `streamid` string, nullable — SRT `streamid` to send when connecting to the destination.
    - `constant_bitrate` union — MPEG-TS constant-bitrate control: `false`/omitted for variable bitrate, `true` to derive the mux rate from the source bandwidth, or an explicit rate string such as `"500k"` or `"5M"`.
      - boolean
      - string
    - `latency` integer, nullable — SRT send latency in milliseconds (20-8000). Higher values tolerate more network jitter at the cost of delay. Recommended: `2000` for typical internet links.
  - `pipeline_patches` PipelinePatch[], nullable — Live, runtime-only adjustments to running pipelines: toggle dubbing, adjust the mix, or nudge A/V sync. Applied immediately and not persisted into the stream configuration.
    - `pipeline_id` string, required — `id` of the pipeline to adjust.
    - `dubbing_enabled` boolean, nullable — Turn live dubbing on or off for this pipeline. `false` pauses dubbing and passes the original audio through; `true` resumes it. Takes effect within a few seconds.
    - `mixing` OverdubConfig — Relative gains used when mixing dubbed audio over the original. `original_audio_gain` + `background_audio_gain` must not exceed 1.0.
      - `original_audio_gain` number, nullable — Volume of the original speaker while dubbed audio plays (0.0-1.0).
      - `background_audio_gain` number, nullable — Volume of background music/ambience during dubbed segments (0.0-1.0).
      - `fallback_audio_gain` number, nullable — Volume of the original audio while nothing is being dubbed (0.0-1.0).
      - `fade_time` number — Cross-fade duration in seconds when switching between original and dubbed audio (0-5).
    - `avsync` AVSyncConfig
      - `delay` number, nullable — Audio/video sync adjustment in seconds (-2.0 to 2.0). Positive values delay audio. Unset by default (no adjustment).

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/camb/apis/fastapi.md) · [All operations](https://skmtc.net/camb/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/camb/fastapi/versions/40ebeee64850/schema)
