Skip to Content
Update a live stream
patch

Updates the parameters of a previously-created live stream. This currently supports a subset of variables. Supply the live stream ID and the updated parameters and Mux will return the corresponding live stream information. The information returned will be the same after update as for subsequent get live stream requests.

Request body params
passthrough
string

Arbitrary user-supplied metadata set for the live stream. Max 255 characters. In order to clear this value, the field should be included with an empty-string value.

latency_mode
string
Possible values: "low""reduced""standard"

Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this as an alternative to setting low latency or reduced latency flags.

reconnect_window
number
(default: 60, min: 0, max: 1800)

When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset.

If not specified directly, Standard Latency streams have a Reconnect Window of 60 seconds; Reduced and Low Latency streams have a default of 0 seconds, or no Reconnect Window. For that reason, we suggest specifying a value other than zero for Reduced and Low Latency streams.

Reduced and Low Latency streams with a Reconnect Window greater than zero will insert slate media into the recorded asset while waiting for the streaming software to reconnect or when there are brief interruptions in the live stream media. When using a Reconnect Window setting higher than 60 seconds with a Standard Latency stream, we highly recommend enabling slate with the use_slate_for_standard_latency option.

use_slate_for_standard_latency
boolean
(default: false)

By default, Standard Latency live streams do not have slate media inserted while waiting for live streaming software to reconnect to Mux. Setting this to true enables slate insertion on a Standard Latency stream.

reconnect_slate_url
string

The URL of the image file that Mux should download and use as slate media during interruptions of the live stream media. This file will be downloaded each time a new recorded asset is created from the live stream. Set this to a blank string to clear the value so that the default slate media will be used.

max_continuous_duration
integer
(default: 43200, min: 60, max: 43200)

The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours.

Updates the new asset settings to use to generate a new asset for this live stream. Only the mp4_support, master_access, and video_quality settings may be updated.

new_asset_settings.mp4_support
string
Deprecated
Possible values: "none""capped-1080p""audio-only""audio-only,capped-1080p""standard" (Deprecated)

Deprecated. See the Static Renditions API for the updated API.
Specify what level of support for mp4 playback should be added to new assets generated from this live stream.

  • The none option disables MP4 support for new assets. MP4 files will not be produced for an asset generated from this live stream.
  • The capped-1080p option produces a single MP4 file, called capped-1080p.mp4, with the video resolution capped at 1080p. This option produces an audio.m4a file for an audio-only asset.
  • The audio-only option produces a single M4A file, called audio.m4a for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset.
  • The audio-only,capped-1080p option produces both the audio.m4a and capped-1080p.mp4 files. Only the capped-1080p.mp4 file is produced for a video-only asset, while only the audio.m4a file is produced for an audio-only asset.
  • The standard(deprecated) option produces up to three MP4 files with different levels of resolution (high.mp4, medium.mp4, low.mp4, or audio.m4a for an audio-only asset).
new_asset_settings.master_access
string
Possible values: "temporary""none"

Add or remove access to the master version of the video.

new_asset_settings.video_quality
string
Possible values: "plus""premium"

The video quality controls the cost, quality, and available platform features for the asset. See the video quality guide for more details.

new_asset_settings.meta.title
string

The video title. Max 512 code points.

new_asset_settings.meta.creator_id
string

This is an identifier you provide to keep track of the creator of the video. Max 128 code points.

new_asset_settings.meta.external_id
string

This is an identifier you provide to link the video to your own data. Max 128 code points.

Request path & query params
LIVE_STREAM_ID
string

The live stream ID

patch
200
/video/v1/live-streams/{LIVE_STREAM_ID}
Request
(application/json)
{
  "latency_mode": "standard",
  "reconnect_window": 30,
  "max_continuous_duration": 1200
}
Response
(application/json)
{
  "data": {
    "stream_key": "831b5bde-cd8a-5bc4-115d-4ba34b19f481",
    "status": "idle",
    "reconnect_window": 30,
    "playback_ids": [
      {
        "policy": "public",
        "id": "HNRDuwff3K2VjTZZAPuvd2Kx6D01XUQFv02GFBHPUka018"
      }
    ],
    "new_asset_settings": {
      "playback_policies": [
        "public"
      ]
    },
    "id": "ZEBrNTpHC02iUah025KM3te6ylM7W4S4silsrFtUkn3Ag",
    "created_at": "1609937654",
    "latency_mode": "standard",
    "max_continuous_duration": 1200
  }
}