- Print
- PDF
Create channel
- Print
- PDF
This is an API that creates Live Station channels. Channel list search API and Channel information search API are provided to search the created channels.
The following are precautions when creating channels.
- If you are using a streaming redundancy setting, you must stream the main stream first.
- If you need to create LL-HLS channels, you must utilize the quality set for low latency.
- The full version of LL-HLS is only supported in Global Edge CDN integration environments.
- If you are using an existing CDN, you need to renew the previously created CDN. See the User Guide for instructions on how to renew CDNs.
- We recommend setting the keyframe to 1 second for seamless LL-HLS channel usage. See the User Guide for detailed streaming instructions.
- Live Station supports easy integration with One Click Multi DRM, and only supports single-key packaging.
- Channels using quality settings that include passthrough quality do not support DRM encryption.
The following are precautions when using the content authentication (Signed URL/JWT) control of Global Edge in integration with Live Station.
- You must set Edge Auth to the outputProtocol of the channel that created Edge Auth in the cache settings of Global Edge. For more information on how to change Global Edge Edge Auth settings, see the API Guide.
- Extensions excluded from authentication
- HLS: .ts, .jpg
- HLS, DASH: .ts, .jpg, .m4s, .m4v, .m4a
- LL_HLS: .jpg, .m4s, .m4v, .m4a
- Extension that forwards the authentication token to the source
- HLS: .m3u8
- HLS/DASH: .m3u8, .mpd
- LL_HLS: playlist.m3u8
- Extensions excluded from authentication
- When issuing an authentication token, you must enter wildcard path under acl for Signed URL and path for JWT respectively. For more information on how to issue authentication tokens, see the User Guide.
- wildcard path: '/live/video/{channelId}/*'
Set content protection
Live Station DRM Encryption supports multi-DRM for real-time content.
You can easily set the DRM feature in the DRM settings area in the channel creation, and it supports multi-DRM encryption depending on the selected OutputProtocol.
For more information about encryption methods by DRM technology and supported devices and other platforms and versions, see this link.
| Encryption type | Protocol | DRM type | Encryption algorithm | Supported devices |
|--- |--- |--- |--- |--- |
| DRM | HLS | FairPlay | AES-CBC | Mac/iOS Safari browser, iOS/iPadOS/tvOS app, HLS HTML5 |
| DRM | DASH | PlayReady, Widevine | CENC (Common Encryption) | MS Edge, Internet Explorer 11, Google Chrome, Firefox, Opera DASH HTML5 |
- DRM type
- FairPlay: A DRM technology protocol provided by Apple. It encrypts each HLS segment with the AES-CBC method.
- Widevine: A DRM technology protocol provided by Google. It encrypts with the AES-128 method according to the Common Encryption Standard.
- PlayReady: A DRM technology protocol provided by Microsoft. It encrypts with the AES-128 method according to the Common Encryption Standard.
Request
POST https://livestation.apigw.ntruss.com/api/v2/channels
Request headers
Header name | Required | Description |
---|---|---|
x-ncp-apigw-timestamp | YES | It indicates the elapsed time in milliseconds since January 1, 1970 00:00:00 UTC Request is considered invalid if the timestamp differs from the current time by more than 5 minutes x-ncp-apigw-timestamp:{Timestamp} |
x-ncp-iam-access-key | YES | Access key ID value issued on NAVER Cloud Platform portalx-ncp-iam-access-key:{Sub Account Access Key} |
x-ncp-apigw-signature-v2 | YES | Signature encrypted with the access key ID value and secret keyx-ncp-apigw-signature-v2:{API Gateway Signature} |
Content-Type | YES | Specify the request body content type as application/jsonContent-Type: application/json |
x-ncp-region_code | YES | Region code (KR) |
Request body
Field name | Required | Type | Restrictions | Description |
---|---|---|---|---|
channelName | Yes | String | Between 3 and 20 characters are allowed Special character underscore (_) is allowed | Name of the channel to create |
envType | Optional | String | DEV STAGE REAL | Default to REAL if not entered |
outputProtocol | Optional | String | HLS HLS,DASH LL_HLS | Default to HLS if not entered |
cdn | Yes | Object | CDN Object | |
cdn.createCdn | Yes | Boolean | true, false | CDN Object |
cdn.cdnType | Yes | String | GLOBAL_CDN,GLOBAL_EDGE | CDN+ not supported |
cdn.profileId | Yes | Integer | Global Edge profile required for new GLOBAL_EDGE creation | |
cdn.regionType | Yes | String | KOREA,JAPAN,GLOBAL | Global Edge service area |
cdn.cdnInstanceNo | Optional | Integer | Must be set if cdn.createCdn is false | |
qualitySetId | Yes | Integer | When creating LL-HLS channels, request a quality set for low latency | |
useDvr | Yes | Boolean | true, false | |
immediateOnAir | Optional | Boolean | true, false | Auto-record option to record at the same time as streaming |
timemachineMin | Optional | Integer | The unit is minutes and can only be set to 360 | Options for the Time Machine feature, which lets you rewind video back to the start of recording Must be set if useDvr is true |
record | Yes | Object | ||
record.format | Optional | String | MP4,HLS,ALL | Specify the type of recording files that are automatically saved to a bucket |
record.type | Yes | String | NO_RECORD, AUTO_UPLOAD, MANUAL_UPLOAD | Specify the type of saved recording file upload Disable recording feature when set to "NO_RECORD" |
record.bucketName | Optional | String | Auto-save feature automatically saves recordings to the entered bucket after the live broadcast ends | |
record.filePath | Optional | String | Auto-save feature automatically saves recordings to the entered bucket after the live broadcast ends filePath must start with "/" | |
record.accessControl | Optional | String | PRIVATE, PUBLIC_READ | Option to specify Object Storage bucket disclosure scope when uploading recording files via autosave feature Default: PRIVATE |
isStreamFailOver | Optional | Boolean | true, false | Option for applying streaming redundancy Configure egress encoder redundancy through streaming redundancy settings |
drmEnabledYn | Yes | Boolean | Whether DRM encryption settings are applied | |
drm | Optional | Object | Set DRM encryption using Live Station When setting DRM, FairPlay, Widevine/PlayReady DRMs are supported | |
drm.siteId | Optional | String | Site id created with One Click Multi DRM product | |
drm.contentId | Optional | String | Unique ID of the content to apply DRM encryption to It is used for DRM packaging and can be at least 3 characters and up to 100 characters, including English letter, numbers, "-" (hyphen), and "_" (underscore) |
Response
Field name | Type | Description | Remarks |
---|---|---|---|
channelId | String | ||
channelName | String | ||
envType | String | Default to REAL if not entered | DEV STAGE REAL |
outputProtocol | String | Default to HLS if not entered | HLS HLS,DASH LL_HLS |
cdn | Object | ||
cdn.createCdn | Boolean | ||
cdn.cdnType | String | GLOBAL_CDN,GLOBAL_EDGE | |
cdn.profileId | Integer | Global Edge profile required for new GLOBAL_EDGE creation | |
cdn.regionType | String | Global Edge service area | KOREA,JAPAN,GLOBAL |
cdn.cdnInstanceNo | Integer | Must be set if cdn.createCdn is false | |
qualitySetId | Integer | ||
useDvr | Boolean | ||
immediateOnAir | Boolean | ||
timemachineMin | Integer | ||
record | Object | ||
record.format | String | MP4,HLS,ALL | |
record.type | String | NO_RECORD, AUTO_UPLOAD, MANUAL_UPLOAD | |
record.bucketName | String | ||
record.filePath | String | ||
record.accessControl | String | PRIVATE, PUBLIC_READ | |
uploadPath | String | Recording file upload file path when AUTO_UPLOAD is enabled | |
backupStreamKey | String | Backup stream key for streaming redundancy | |
isStreamFailOver | Boolean | Whether to apply streaming redundancy | true, false |
origin | Object | Live Station origin information for CDN integration | |
origin.originDomain | String | Live Station origin domain for CDN integration | |
origin.originPath | String | Live Station origin detailed path for CDN integration | |
drmEnabledYn | Boolean | Whether DRM encryption settings are applied | |
drm | Object | Set DRM encryption using Live Station When setting DRM, FairPlay, Widevine/PlayReady DRMs are supported | |
drm.siteId | String | Site id created with One Click Multi DRM product | |
drm.contentId | String | Unique ID of the content to apply DRM encryption to It is used for DRM packaging and can be at least 3 characters and up to 100 characters, including English letter, numbers, "-" (hyphen), and "_" (underscore) |
Examples
Request example
POST /api/v2/channels
HOST: livestation.apigw.ntruss.com
Content-Type: application/json
x-ncp-apigw-timestamp:1521787414578
x-ncp-iam-access-key:6uxz1nKkcYwUjWRG5Q1V7NsW0i5jErlu2NjBXXgy
x-ncp-apigw-signature-v2:iJFK773KH0WwQ79PasqJ+ZGixtpDQ/abS57WGQdld2M=
x-ncp-region_code:KR
Request body (if cdn.createCdn == true)
{
"channelName" : "testchannel",
"cdn" : {
"createCdn":true,
"cdnType":"GLOBAL_EDGE",
"profileId" : 291,
"regionType" : "KOREA"
},
"qualitySetId" : 12345,
"useDvr" : true,
"immediateOnAir" : true,
"timemachineMin" : 360,
"envType" : "DEV",
"outputProtocol" : "LL_HLS",
"record": {
"type": "AUTO_UPLOAD",
"format": "MP4",
"bucketName": "hls",
"filePath": "/livestation",
"accessControl": "PRIVATE"
},
"isStreamFailOver": true,
"drmEnabledYn": true,
"drm": {
"siteId": "drm-20231115142326-nHyNw",
"contentId": "my-Test-Multidrm"
}
}
Request body (if cdn.createCdn == false)
{
"channelName" : "testchannel",
"cdn" : {
"createCdn" : false,
"cdnType": "GLOBAL_EDGE",
"cdnDomain": "mycdn.edge.naverncp.com",
"profileId": 299,
"cdnInstanceNo": 1541959
},
"qualitySetId" : 12345,
"useDvr" : true,
"immediateOnAir" : true,
"timemachineMin" : 360,
"envType" : "DEV",
"outputProtocol" : "HLS",
"record": {
"type": "AUTO_UPLOAD",
"format": "MP4",
"bucketName": "hls",
"filePath": "/livestation",
"accessControl": "PRIVATE"
},
"isStreamFailOver": true,
"drmEnabledYn": true,
"drm": {
"siteId": "drm-20231115142326-nHyNw",
"contentId": "my-Test-Multidrm"
}
}
Response example
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 26 Feb 2021 09:53:32 GMT
Content-Type: application/json;charset=utf-8
Connection: keep-alive
Access-Control-Allow-Origin: *
x-ncp-trace-id: 36c9k60om4p3238cpmc9gm4cj4
{
"content": {
"channelName": "testchannel",
"channelId": "ls-20200217154656-Rnd49",
"cdn": {
"createCdn": false,
"cdnType": "GLOBAL_EDGE",
"cdnDomain": "mycdn.edge.naverncp.com",
"profileId": 299,
"cdnInstanceNo": 1541959
},
"qualitySetId": 12345,
"useDvr": true,
"immediateOnAir": true,
"timemachineMin": 360,
"envType": "DEV",
"outputProtocol": "HLS,DASH",
"uploadPath": "/hls/livestation",
"record": {
"type": "AUTO_UPLOAD",
"bucketName": "hls",
"filePath": "/livestation",
"format": "MP4",
"accessControl": "PRIVATE"
},
"origin": {
"originDomain": "ls-k1.video.media.ntruss.com",
"originPath": "1"
},
"drmEnabledYn": true,
"drm": {
"siteId": "drm-20231115142326-nHyNw",
"contentId": "my-Test-Multidrm"
}"backupStreamKey": "lbuy4dcrxk2ctxs8uqxanpy833p08vvz?backup=true",
"isStreamFailOver": true
}
}