Create event jobs
Description: create a new job for linear tv¶
POST https://lms-api.swiftfederation.com/v7.4.0/live_event_job¶
Request¶
-
Header
-
Body
Field | Required | Type | Description |
---|---|---|---|
app | M | String | app name. this should be unique and doesn't conflict with other customers. Only letters, numbers, and underscore are allowed. |
stream | M | String | stream name. Only letters, numbers, and underscore are allowed. |
inbound | M | Object | Refer to inbound object |
outbound_protocols | M | Array of String | Expected formats of outbound streams. "rtmp", "http-flv", "hls" and "dash". |
presets | M | Array of String | The array of live transcoding presets. 'transmux', 'audio_only' are special presets reserved. |
gpu_transcoding | O | Boolean | enable GPU for transcoding or not. Default is disabled. It means CPU is default for transscoding. |
drm | O | Array of String | Enable DRM for spec outbound. 'hls-aes128', 'hls-fairplay', 'dash-aes128', 'dash-widevine' are options for multiple selection |
drm_resource_id | O(M) | String | if drm not null, drm_resource_id must not be null |
recording | O | Boolean | Enable VAS live recording. Default is false |
recording_format | O(M) | String | Either "hls" or "mp4" is the format of recording files |
recording_storage | O(M) | String | Information of storage to store the live recording files. e.g. ftp://{file_transfer_name}:{path} sftp://{file_transfer_name}:{path} lfd://{LFD_Name}:{path} |
screenshot | O | Boolean | Enable VAS live screenshot or not. Default is false |
screenshot_format | O(M) | String | "jpg" in the supported format only. |
screenshot_storage | O(M) | String | Information of storage to store the live screenshots. e.g. ftp://{file_transfer_name}:{path} sftp://{file_transfer_name}:{path} lfd://{LFD_Name}:{path} |
Response¶
-
Header
-
Body
Field | Type | Description |
---|---|---|
request_id | String | Unique id of current HTTP request. |
job | Object | Refer to Job Object |
Examples¶
-
Common¶
-
Request
POST https://lms-api.swiftfederation.com/v7.4.0/live_event_job
Content-Type: application/json; charset=UTF-8
Authorization: ...
{
"app": "a2021091702",
"stream": "s20210917",
"inbound": {
"protocol": "rtmp"
},
"outbound_protocols": [
"hls"
],
"presets": [
"transmux",
"360H"
]
}
-
Enable recording¶
-
Request
POST https://lms-api.swiftfederation.com/v7.4.0/live_event_job
Content-Type: application/json; charset=UTF-8
Authorization: ...
{
"app": "a2021091702",
"stream": "s20210917",
"inbound": {
"protocol": "rtmp"
},
"outbound_protocols": [
"hls"
],
"presets": [
"transmux",
"360H"
],
"recording": true,
"recording_format": "hls",
"recording_storage": "ftp://recording_ftp:/20210916"
}
-
Enable DRM¶
-
Request
POST https://lms-api.swiftfederation.com/v7.4.0/live_event_job
Content-Type: application/json; charset=UTF-8
Authorization: ...
{
"app": "a2021092306",
"stream": "s20210923",
"inbound": {
"protocol": "rtmp"
},
"outbound_protocols": [
"hls"
],
"presets": [
"transmux",
"360H"
],
"drm": "hls-aes128",
"drm_resource_id": "123456"
}
-
Enable live screenshot¶
-
Request
POST https://lms-api.swiftfederation.com/v7.4.0/live_event_job
Content-Type: application/json; charset=UTF-8
Authorization: ...
{
"app": "a2021091702",
"stream": "s20210917",
"inbound": {
"protocol": "rtmp"
},
"outbound_protocols": [
"hls"
],
"presets": [
"transmux",
"360H"
],
"screenshot": true,
"screenshot_format": "jpg",
"screenshot_storage": "lfd://screenshot_lfd:/pub/20210916"
}
- Response
{
"request_id": "ef78eb18b59c4144a8c170aef1ba7d68.39.16318695552410049",
"job": {
"app": "a2021091702",
"stream": "s20210917",
"ingestion": {
"protocol": "rtmp",
"url": "rtmp://192.168.1.25/a2021091702/s20210917?token=1631955955-c0db75c7844e5f1c8c0f86f1fd9a3aa5"
},
"origin": [
{
"protocol": "hls",
"manifest": "/a2021091702/s20210917_ma.m3u8",
"playlist": [
{
"preset": "transmux",
"uri": "/a2021091702/s20210917-transmux.m3u8"
},
{
"preset": "360H",
"uri": "/a2021091702/s20210917-360H.m3u8"
}
]
}
]
}
}