Restreams

Creates a new restream for a specified live stream.

Specify the target platform's URI (RTMP, RTMPS, or SRT) and the ID of the source stream.

Restreaming allows you to broadcast a single live stream to multiple platforms or servers simultaneously (e.g., Facebook, YouTube, or a custom media server).

How it works:

  1. Get credentials (stream URL/key or SRT URL) from the target platform.
  2. Create a restream in the Gcore system by specifying the target URI and the source live stream.
  3. Start your live stream; it will be automatically pushed to the target destination.
                +-----------------------+
RTMP/RTMPS      |                       | -------->  Facebook (RTMP)
    or  ------> |    Gcore Streaming    | -------->  YouTube (RTMPS)
SRT             |                       | -------->  Media server (SRT)
                +-----------------------+ -------->  Other RTMP/SRT targets

Supported combinations: RTMP → RTMP, RTMPS → RTMPS, RTMP → SRT, SRT → SRT, SRT → RTMP. For SRT targets, only mode=caller is supported (Gcore initiates a PUSH connection).

Source stream parameters (bitrate, codecs, resolution) are sent "as is". Ensure they match the destination requirements.

For SRT restreams, specify &latency=N explicitly in the SRT target URL instead of relying on a default value. It helps size the recovery buffer for round-trip time, jitter, and packet loss on the route to the target site. Selecting the right latency is crucial for delivering a smooth live stream. It depends on the geographic distance and network conditions between Gcore and your target platform, especially if they located on different continents.

| Network Conditions      | Recommended Latency |
|-------------------------|---------------------|
| Cross-region            | 1-2 seconds         |
| Public internet         | 2-5 seconds         |

Your target SRT server can accept latency format in seconds, milliseconds, or microseconds. Find out what format your target SRT server accepts in its documentation.

Learn more about SRT latency in product documentation.

post/streaming/restreams

Request

  • Base URL
    https://api.gcore.com
  • URL
    https://api.gcore.com/streaming/restreams
  • Auth
    HTTP apikey

Request body

Example request

{
  "restream": {
    "name": "first restream",
    "active": true,
    "uri": "rtmp://a.rtmp.youtube.com/live/k17a-13s8",
    "stream_id": 20,
    "client_user_id": 10,
    "source": "original",
    "no_audio": true,
    "no_audio_mode": "silence"
  }
}

Response

Successful

namestring

Restream name

liveboolean

Indicates that the stream is being published. Has two possible values:

  • true — stream is being published
  • false — stream isn't published
activeboolean

Enables/Disables restream. Has two possible values:

  • true — restream is enabled and can be started
  • false — restream is disabled.

Default is true

uristring

A URL to push the stream to. Supported protocols: rtmp, rtmps, srt. For SRT target URLs, only mode=caller is supported.

stream_idinteger

ID of the stream to restream

client_user_idinteger

Custom field where you can specify user ID in your system

no_audioboolean

Removes the source audio track from the restream. Has two possible values:

  • false – the source audio track is forwarded to the target as is (default)
  • true – the audio track is removed or replaced, depending on no_audio_mode

Useful to avoid copyright claims on platforms like YouTube when the source stream contains licensed music or other copyrighted audio.

Only strict boolean values (true/false) are accepted; any other value returns a 422 error.

no_audio_mode'drop' | 'silence'

Defines how the audio track is handled when no_audio is true. Ignored when no_audio is false.

Types:

  • "drop" – removes the audio track entirely.
  • "silence" – replaces the audio track with a silent track instead of removing it.

Note: YouTube rejects incoming streams with no audio track at all. Use no_audio_mode=silence when restreaming to YouTube.

source'original' | 'transcoded'

Selects which version of the stream is used as the source for the restream.

Types:

  • "original" – uses the original ingested stream without any modifications (default).
  • "transcoded" – uses the transcoded output, including overlays. Use it when you want to restream the stream with enabled overlays.

Note: For transcoded, the highest quality available in the stream's quality ladder is used. For example, if the ladder is 480p/720p/1080p, 1080p is used; if the ladder goes up to 4K, 4K is used.

idinteger

Restream ID

client_idinteger

Client ID

playlist_idinteger nullable

ID of the playlist used as source for the restream, if applicable

quality_idinteger nullable

ID of the specific transcoded quality used as source for the restream, if applicable

Example response

{
  "id": 287834,
  "name": "Live Stream to Youtube 2024-06-21",
  "live": false,
  "active": true,
  "client_id": 102748,
  "uri": "rtmp://a.rtmp.youtube.com/live2/6w4g-9cw7-62dh-c6se-b4hq",
  "stream_id": 1439046,
  "playlist_id": null,
  "client_user_id": 1000,
  "quality_id": null,
  "source": "transcoded"
}

Changes

    • info

      added the new optional request property /

    • info

      added the new optional request property /

    • info

      added the new optional request property /

    • info

      added the media type application/json for the response with the status