Skip to main content

Livestreaming any RTMP input using Dyte

Dyte can livestream any service that can accept an RTMP input (Zoom, YouTube etc.) in few simple steps.

  1. Create a live stream using the API call
  2. Add the RTMP input received from the response into your service.

Create a live stream#

Request:

curl --location --request POST 'https://api.dyte.in/v2/livestreams' \--header 'Content-Type: application/json' \--header 'Authorization: Basic ORGID:APIKEY' \--data-raw '{    "name": "some name"}'

Response:

{    "success": true,    "data": {        "id": "STREAMID",        "title": "STREAMNAME",        "input_rtmp_url": "rtmp://URL/LiveApp/STREAMID?token=TOKENID",        "token_id": "TOKENID",        "stream_key": "STREAMID?token=TOKENID",        "player_url": "https://URL/LiveApp/play.html?name=STREAMID",        "status": "OFFLINE",        "hls_play_url": "https://URL/LiveApp/streams/STREAMID.m3u8"    }}

From the response

  1. data.input_rtmp_url can be used as an input to any other RTMP compatible app or API (such as OBS, Twitch, YouTube, etc)

For example, for adding it to OBS:

obs-example

User is adding the input stream to OBS

Get a livestream instance information#

Request:

curl --location --request GET 'https://api.cluster.dyte.in/v2/livestreams/STREAMID' \--header 'Authorization: Basic your-api-key'

Respone:

{    "success": true,    "data": {        "id": "STREAMID",        "title": "STREAMNAME",        "input_rtmp_url": "rtmp://URL/LiveApp/STREAMID?token=TOKENID",        "token_id": "TOKENID",        "stream_key": "STREAMID?token=TOKENID",        "player_url": "https://URL/LiveApp/play.html?name=STREAMID",        "status": "OFFLINE",        "hls_play_url": "https://URL/LiveApp/streams/STREAMID.m3u8"    }}