Skip to main content

Schedule a live stream

Schedule a live stream

To Schedule a live stream you need to send an HTTP POST request to the API Endpoint, with the authentication Header.

https://app.tpstreams.com/api/v1/<organization_id>/assets/live_streams/

Fields

NameTypeDescriptionRequired
titlestringSpecify a text string or identifier which can be used for filtering or searching the live stream.Yes
startstringSpecify the date and time (in the format: "YYYY-MM-DD HH:MM:SS") when the live stream should be scheduled.Yes
enable_drm_for_recordingbooleanA boolean value to enable or disable DRM for live stream recording.No

Sample request body

{
"title": "Data science Live class",
"start": "2024-10-05 15:30:00",
"enable_drm_for_recording": false
}

For valid requests the API server returns a JSON:

{
"title": "Data science Live class",
"bytes": null,
"type": "livestream",
"video": null,
"id": "AuC9yX2EtBr",
"live_stream": {
"rtmp_url": "",
"stream_key": null,
"status": "Not Started",
"hls_url": "https://d28qihy7z761lk.cloudfront.net/live/gnarys/AuC9yX2EtBr/video.m3u8",
"start": "2024-10-05 15:30:00",
"transcode_recorded_video": true,
"enable_drm_for_recording": false,
"chat_embed_url": null,
"resolutions": [
"240p",
"480p",
"720p"
]
},
"parent": null,
"parent_id": null
}

Live stream is created with the scheduled time for you to start the server later.

Above response has the details of the live stream scheduled which can also be obtained by API /api/v1/<organization_id>/assets/<asset_id>/

info
  • Scheduled live streams will not automatically start at the specified time; they must be manually initiated.
  • RTMP URL and stream key will be available once you start the stream