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
Name | Type | Description | Required |
---|---|---|---|
meeting_url | string | Single click meeting URL for the stream | No[1] |
rtmp_urls | array | List of RTMP output URLs to stream to (up to 5 rtmp:// / rtmps:// URLs supported) | Yes |
recording | bool | Flag to enable recording | No |
resolution | object | Video resolution for stream | No |
destination | string | Name of destination from template to pick up configuration | No[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 disabledskip_preview_headful=true
: skips the preview page and directly joins the meeting with header and controls enabledauth_token=token1234
: Use this to pass an auth token to authenticate the room join actionui_mode=activespeaker
: Render active speaker mode by defaultname=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)
Name | Type | Description | Required |
---|---|---|---|
width | int | Width of the video, defaults to 1280 | Yes |
height | int | Height of the video, defaults to 720 | Yes |
Have a suggestion? Recommend changes ->