Skip to Content

Live Streams

A Live Stream represents a unique live stream of video being pushed to Mux. It includes configuration details (a Stream Key) for live broadcasting software/hardware and a Playback ID for playing the stream anywhere. Currently, RTMP is the only supported method of ingesting video. Use rtmp://global-live.mux.com:5222/app with the Live Stream's Stream Key for getting the video into Mux, and use https://stream.mux.com with the Live Stream's Playback ID for playback.

A Live Stream can be used once for a specific event, or re-used forever. If you're building an application like Facebook Live or Twitch, you could create one Live Stream per user. This allows them to configure their broadcasting software once, and the Live Stream Playback ID will always show their latest stream.

Each RTMP session creates a new video asset automatically. You can set up a webhook to be notified each time a broadcast (or Live Stream RTMP session) begins or ends with the video.live_stream.active and video.live_stream.idle events respectively. Assets that are created from a Live Stream have the same behavior as other Assets you create.

Learn more about how to go live in our guides.

id
string

Unique identifier for the Live Stream. Max 255 characters.

created_at
string

Time the Live Stream was created, defined as a Unix timestamp (seconds since epoch).

stream_key
string

Unique key used for streaming to a Mux RTMP endpoint. This should be considered as sensitive as credentials, anyone with this stream key can begin streaming.

active_asset_id
string

The Asset that is currently being created if there is an active broadcast.

recent_asset_ids
array

An array of strings with the most recent Asset IDs that were created from this Live Stream. The most recently generated Asset ID is the last entry in the list.

status
string
Possible values: "active""idle""disabled"

idle indicates that there is no active broadcast. active indicates that there is an active broadcast and disabled status indicates that no future RTMP streams can be published.

playback_ids
array

An array of Playback ID objects. Use these to create HLS playback URLs. See Play your videos for more details.

playback_ids[].id
string

Unique identifier for the PlaybackID

playback_ids[].policy
string
Possible values: "public""signed""drm"
  • public playback IDs are accessible by constructing an HLS URL like https://stream.mux.com/${PLAYBACK_ID}

  • signed playback IDs should be used with tokens https://stream.mux.com/${PLAYBACK_ID}?token={TOKEN}. See Secure video playback for details about creating tokens.

  • drm playback IDs are protected with DRM technologies. See DRM documentation for more details.

playback_ids[].drm_configuration_id
string

The DRM configuration used by this playback ID. Must only be set when policy is set to drm.

new_asset_settings
object

The settings to be used when creating a new asset. You can use any of the usual settings when creating an asset normally, with the exception to not include file url for creating the asset in input. You could optionally add overlay_setting and input urls to add Subtitles / Captions.

passthrough
string

Arbitrary user-supplied metadata set for the asset. Max 255 characters.

audio_only
boolean

The live stream only processes the audio track if the value is set to true. Mux drops the video track if broadcasted.

embedded_subtitles
array

Describes the embedded closed caption configuration of the incoming live stream.

embedded_subtitles[].name
string

A name for this live stream closed caption track.

embedded_subtitles[].passthrough
string

Arbitrary user-supplied metadata set for the live stream closed caption track. Max 255 characters.

embedded_subtitles[].language_code
string (default: en)

The language of the closed caption stream. Value must be BCP 47 compliant.

embedded_subtitles[].language_channel
string (default: cc1)
Possible values: "cc1""cc2""cc3""cc4"

CEA-608 caption channel to read data from.

generated_subtitles
array

Configure the incoming live stream to include subtitles created with automatic speech recognition. Each Asset created from a live stream with generated_subtitles configured will automatically receive two text tracks. The first of these will have a text_source value of generated_live, and will be available with ready status as soon as the stream is live. The second text track will have a text_source value of generated_live_final and will contain subtitles with improved accuracy, timing, and formatting. However, generated_live_final tracks will not be available in ready status until the live stream ends. If an Asset has both generated_live and generated_live_final tracks that are ready, then only the generated_live_final track will be included during playback.

generated_subtitles[].name
string

A name for this live stream subtitle track.

generated_subtitles[].passthrough
string

Arbitrary metadata set for the live stream subtitle track. Max 255 characters.

generated_subtitles[].language_code
string (default: en)
Possible values: "en""en-US"

The language to generate subtitles in.

generated_subtitles[].transcription_vocabulary_ids
array

Unique identifiers for existing Transcription Vocabularies to use while generating subtitles for the live stream. If the Transcription Vocabularies provided collectively have more than 1000 phrases, only the first 1000 phrases will be included.

reconnect_window
number (default: 60, minimum: 0, maximum: 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. Max: 1800s (30 minutes).

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. If this is not set, the default slate media will be used.

simulcast_targets
array

Each Simulcast Target contains configuration details to broadcast (or "restream") a live stream to a third-party streaming service. See the Stream live to 3rd party platforms guide.

simulcast_targets[].id
string

ID of the Simulcast Target

simulcast_targets[].passthrough
string

Arbitrary user-supplied metadata set when creating a simulcast target.

simulcast_targets[].status
string
Possible values: "idle""starting""broadcasting""errored"

The current status of the simulcast target. See Statuses below for detailed description.

  • idle: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state.
  • starting: The simulcast target transitions into this state when the parent live stream transition into connected state.
  • broadcasting: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service.
  • errored: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. When a simulcast target has this status it will have an error_severity field with more details about the error.
simulcast_targets[].stream_key
string

Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. Only used for RTMP(s) simulcast destinations.

simulcast_targets[].url
string

The RTMP(s) or SRT endpoint for a simulcast destination.

  • For RTMP(s) destinations, this should include the application name for the third party live streaming service, for example: rtmp://live.example.com/app.
  • For SRT destinations, this should be a fully formed SRT connection string, for example: srt://srt-live.example.com:1234?streamid={stream_key}&passphrase={srt_passphrase}.

Note: SRT simulcast targets can only be used when an source is connected over SRT.

simulcast_targets[].error_severity
string
Possible values: "normal""fatal"

The severity of the error encountered by the simulcast target. This field is only set when the simulcast target is in the errored status. See the values of severities below and their descriptions.

  • normal: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. A simulcast may transition back into the broadcasting state if a connection with the service can be re-established.
  • fatal: The simulcast target is incompatible with the current input to the parent live stream. No further attempts to this simulcast target will be made for the current live stream asset.
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.

test
boolean

True means this live stream is a test live stream. Test live streams can be used to help evaluate the Mux Video APIs for free. There is no limit on the number of test live streams, but they are watermarked with the Mux logo, and limited to 5 minutes. The test live stream is disabled after the stream is active for 5 mins and the recorded asset also deleted after 24 hours.

max_continuous_duration
integer (default: 43200, minimum: 60, maximum: 43200)

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

srt_passphrase
string

Unique key used for encrypting a stream to a Mux SRT endpoint.

active_ingest_protocol
string
Possible values: "rtmp""srt"

The protocol used for the active ingest stream. This is only set when the live stream is active.