Create channel
    • PDF

    Create channel

    • PDF

    Article summary

    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.

    Note

    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.
    Note

    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
    • 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 nameRequiredDescription
    x-ncp-apigw-timestampYESIt 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-keyYESAccess key ID value issued on NAVER Cloud Platform portal
    x-ncp-iam-access-key:{Sub Account Access Key}
    x-ncp-apigw-signature-v2YESSignature encrypted with the access key ID value and secret key
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    Content-TypeYESSpecify the request body content type as application/json
    Content-Type: application/json
    x-ncp-region_codeYESRegion code (KR)

    Request body

    Field nameRequiredTypeRestrictionsDescription
    channelNameYesStringBetween 3 and 20 characters are allowed
    Special character underscore (_) is allowed
    Name of the channel to create
    envTypeOptionalStringDEV
    STAGE
    REAL
    Default to REAL if not entered
    outputProtocolOptionalStringHLS
    HLS,DASH
    LL_HLS
    Default to HLS if not entered
    cdnYesObjectCDN Object
    cdn.createCdnYesBooleantrue, falseCDN Object
    cdn.cdnTypeYesStringGLOBAL_CDN,GLOBAL_EDGECDN+ not supported
    cdn.profileIdYesIntegerGlobal Edge profile required for new GLOBAL_EDGE creation
    cdn.regionTypeYesStringKOREA,JAPAN,GLOBALGlobal Edge service area
    cdn.cdnInstanceNoOptionalIntegerMust be set if cdn.createCdn is false
    qualitySetIdYesIntegerWhen creating LL-HLS channels, request a quality set for low latency
    useDvrYesBooleantrue, false
    immediateOnAirOptionalBooleantrue, falseAuto-record option to record at the same time as streaming
    timemachineMinOptionalIntegerThe unit is minutes and can only be set to 360Options for the Time Machine feature, which lets you rewind video back to the start of recording
    Must be set if useDvr is true
    recordYesObject
    record.formatOptionalStringMP4,HLS,ALLSpecify the type of recording files that are automatically saved to a bucket
    record.typeYesStringNO_RECORD, AUTO_UPLOAD, MANUAL_UPLOADSpecify the type of saved recording file upload
    Disable recording feature when set to "NO_RECORD"
    record.bucketNameOptionalStringAuto-save feature automatically saves recordings to the entered bucket after the live broadcast ends
    record.filePathOptionalStringAuto-save feature automatically saves recordings to the entered bucket after the live broadcast ends
    filePath must start with "/"
    record.accessControlOptionalStringPRIVATE, PUBLIC_READOption to specify Object Storage bucket disclosure scope when uploading recording files via autosave feature
    Default: PRIVATE
    isStreamFailOverOptionalBooleantrue, falseOption for applying streaming redundancy
    Configure egress encoder redundancy through streaming redundancy settings
    drmEnabledYnYesBooleanWhether DRM encryption settings are applied
    drmOptionalObjectSet DRM encryption using Live Station
    When setting DRM, FairPlay, Widevine/PlayReady DRMs are supported
    drm.siteIdOptionalStringSite id created with One Click Multi DRM product
    drm.contentIdOptionalStringUnique 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 nameTypeDescriptionRemarks
    channelIdString
    channelNameString
    envTypeStringDefault to REAL if not enteredDEV
    STAGE
    REAL
    outputProtocolStringDefault to HLS if not enteredHLS
    HLS,DASH
    LL_HLS
    cdnObject
    cdn.createCdnBoolean
    cdn.cdnTypeStringGLOBAL_CDN,GLOBAL_EDGE
    cdn.profileIdIntegerGlobal Edge profile required for new GLOBAL_EDGE creation
    cdn.regionTypeStringGlobal Edge service areaKOREA,JAPAN,GLOBAL
    cdn.cdnInstanceNoIntegerMust be set if cdn.createCdn is false
    qualitySetIdInteger
    useDvrBoolean
    immediateOnAirBoolean
    timemachineMinInteger
    recordObject
    record.formatStringMP4,HLS,ALL
    record.typeStringNO_RECORD, AUTO_UPLOAD, MANUAL_UPLOAD
    record.bucketNameString
    record.filePathString
    record.accessControlStringPRIVATE, PUBLIC_READ
    uploadPathStringRecording file upload file path when AUTO_UPLOAD is enabled
    backupStreamKeyStringBackup stream key for streaming redundancy
    isStreamFailOverBooleanWhether to apply streaming redundancytrue, false
    originObjectLive Station origin information for CDN integration
    origin.originDomainStringLive Station origin domain for CDN integration
    origin.originPathStringLive Station origin detailed path for CDN integration
    drmEnabledYnBooleanWhether DRM encryption settings are applied
    drmObjectSet DRM encryption using Live Station
    When setting DRM, FairPlay, Widevine/PlayReady DRMs are supported
    drm.siteIdStringSite id created with One Click Multi DRM product
    drm.contentIdStringUnique 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
      }
    }
    

    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.