> ## Documentation Index
> Fetch the complete documentation index at: https://docs.livepeer.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up a multistream

> Learn how to add multistreaming

[Multistreaming](/developers/core-concepts/core-api/multistream) allows a source
stream and transcoded renditions to be pushed to multiple RTMP(S) targets, such
as Twitch, Facebook Live, and YouTube Live.

## Multistream targets with the API

You can manage multistream target objects from the API - see the
[API reference](/api-reference/multistream/create). Each target represents a
specific endpoint where a stream could be multistreamed to.

Note that the creation of a multistream target itself is not enough - you also
need to reference the target from the stream object that should be
multistreamed. To avoid managing the separate multistream target objects, you
can also create the targets inlined in the stream
[creation](/api-reference/stream/create) and
[update](/api-reference/stream/update) APIs.

You can also create and remove multistream targets individually from a given
stream using the
[Create Multistream Target](/api-reference/stream/add-multistream-target) and
[Delete Multistream Target](/api-reference/stream/delete-multistream-target)
APIs.

<Info>
  Any changes to multistream targets, including creating new targets, will apply
  only to the next active session. If you make changes while a stream is active,
  those changes will not apply until the current session has ended and a new
  session begins.
</Info>

## Multistream targets in the Studio dashboard

To add, manage, and delete multistream targets, navigate to the
[Streams page](https://livepeer.studio/dashboard/streams) and click on a stream
name. On the stream detail page, on the Overview tab, you can view all
configured targets. You must configure new multistream targets for each stream.
This will apply the multistream configuration to that stream. Multistream
targets **do not carry over when you create new streams.**

To add a new target, click `Create` on the right side of the multistream targets
section. You'll be asked to name your target, provide the Ingest URL and a
stream key, Ingest URL being the only required value. The Ingest URL and stream
key should be provided by the platform that you're streaming into and can one
of: RTMP, RTMPS, or SRT protocols. Select the rendition profile that you'd like
to send to that target and click `Create Target`. Once created, you can toggle
the targets on and off.

To edit a multistream target, click on the three dots to the right of the target
name and then on `Edit` to open up the target settings. Select `Update Target`
when you've completed your changes.

To delete a multistream target, click on the three dots to the right of the
target name and then on `Delete`.

<Info>
  Any changes to multistream targets, including creating new targets, will apply
  only to the next active session. If you make changes while a stream is active,
  those changes will not apply until the current session has ended and a new
  session begins.
</Info>

## Understanding Multistream Performance

### Dashboard

While a session is active that has multistream targets configured, you'll be
able to see if a destination is `Active` or `Offline`.

<Info>
  There may be a slight delay between starting the stream and the push
  destinations connecting. When starting to stream to multistream targets, use
  these indicators to understand whether it has connected to its target(s).
</Info>

On the stream page where you've configured your multistream targets, select the
Health tab at the top. While a session is active, you'll see the ingest rate of
the source stream.

### Webhooks

There are three webhooks to help you monitor the state of your multistream
targets:

* `multistream.connected`: When Studio has successfully connected to the
  multistream target and you're also online in the other service you are
  multistreaming to.
* `multistream.error`: In case any error has occurred during connection to the
  multistream target. This means some kind of problem with the configuration or
  the other service you are multistreaming to.
* `multistream.disconnected`: Sent after a stream is ended to indicate that
  Multistream has also ended for the respective target.
