Start external stream for a room

Use this to start an external stream for a room. This will stream to a list of RTMP endpoints (up to 5).

The external stream will be in starting state to begin with, and turn into running shortly.

POSThttps://api.100ms.live/v2/external-streams/room/<room_id>/start
curl --location --request POST 'https://api.100ms.live/v2/external-streams/room/<room_id>/start' \ --header 'Authorization: Bearer <management_token>' \ --header 'Content-Type: application/json' \ --data-raw '{ "meeting_url" : "<meeting_url>", "rtmp_urls": ["<rtmp_url_1>", "<rtmp_url_2>"], "recording": true, "resolution" : {"width": 1280, "height": 720} }'
RESPONSE
Status: 200 OK
{ "id": "<job_id>", "room_id": "<room_id>>", "session_id": "<session_id>", "status": "starting", "destination": "<destination_name>", "rtmp_urls": ["<rtmp_url_1>", "<rtmp_url_2>"], "meeting_url": "<meeting_url>", "recording": true, "resolution": { "width": 1280, "height": 720 }, "created_at": "2023-03-02T07:44:27.010516042Z", "started_at": "2023-03-02T07:44:27.010516042Z", "stopped_at": "2023-03-02T07:44:27.010516042Z", "updated_at": "2023-03-02T07:44:27.010516042Z", "started_by": "<peer_id>", "stopped_by": "<peer_id>", "recording_assets": null }

Parameters

NameTypeDescriptionRequired
meeting_urlstringSingle click meeting URL for the streamNo[1]
rtmp_urlsarrayList of RTMP output URLs to stream to (up to 5 rtmp:// / rtmps:// URLs supported)Yes
recordingboolFlag to enable recordingNo
resolutionobjectVideo resolution for streamNo
destinationstringName of destination from template to pick up configurationNo[2]

[1] meeting_url is required when

  • External streaming is not enabled on the dashboard
  • The template of this room does not have a subdomain (templates created through the REST API don't have subdomains)

[2] (Advanced usage only) destination is required when

  • There are multiple destinations of this type on the template
meeting_url

This is a URL which lands into the room directly. You can use 100ms room links that look like:

https://<domain>.app.100ms.live/preview/<room_id>/<role>?skip_preview=true

Other supported query parameters:

  • skip_preview=true: skips the preview page and directly joins the meeting with header and controls disabled
  • skip_preview_headful=true: skips the preview page and directly joins the meeting with header and controls enabled
  • auth_token=token1234: Use this to pass an auth token to authenticate the room join action
  • ui_mode=activespeaker: Render active speaker mode by default
  • name=johndoe: Use this to add a name for the peer
rtmp_urls

This URL is the combination of RTMP server URL and stream key. You can add up to 5 URLs (as array of strings) for this parameter.

  • Format: rtmp://server.com/app/STREAM_KEY
  • Example: rtmp://a.rtmp.youtube.com/live2/k0jv-329m-1y7f-ktth-ck48
resolution
  • Minimum supported: 500x480 (in landscape) and 500x500 (in portrait)
  • Maximum supported: 1920x1080 (in landscape) and 1080x1920 (in portrait)
NameTypeDescriptionRequired
widthintWidth of the video, defaults to 1280Yes
heightintHeight of the video, defaults to 720Yes

Have a suggestion? Recommend changes ->

Run in postman

Was this helpful?

1234