Available in Classic and VPC
Create a custom image quality setting by grouping the image qualities you want.
Request
This section describes the request format. The method and URI are as follows:
Method | URI |
---|---|
POST | /api/v2/qualitySets |
Request headers
For information about the headers common to all Live Station APIs, see Live Station request headers.
Request body
You can include the following data in the body of your request:
Field | Type | Required | Description |
---|---|---|---|
name |
String | Required | Image quality setting name
|
qualityIds |
Array | Required | Image quality ID list
|
isEnabledUll |
Boolean | Required | Low latency settings
|
segmentDuration |
Integer | Conditional | Playback time per segment (millisecond)
|
segmentCount |
Integer | Conditional | Number of segments
|
enableHlsTimedMetadata |
Boolean | Required | Whether to set time-based metadata
|
timedMetadata |
Object | Conditional | Time-based metadata settings
|
timedMetadata.header |
String | Conditional | Header (identification value)
|
timedMetadata.interval |
Integer | Conditional | Insertion interval (millisecond)
|
timedMetadata.key |
String | Conditional | Key
|
Request example
The request example is as follows:
curl --location --request POST 'https://livestation.apigw.ntruss.com/api/v2/qualitySets' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json' \
--header 'x-ncp-region_code: KR' \
--data '{
"name": "setting000",
"qualityIds": [
****, 5
],
"isEnabledUll": false,
"segmentDuration": 1000,
"segmentCount": 2,
"enableHlsTimedMetadata": true,
"timedMetadata": {
"header": "ncloud.livestation.metadata",
"interval": 1000,
"key": "utc"
}
}'
Response
This section describes the response format.
Response body
The response body includes the following data:
Field | Type | Required | Description |
---|---|---|---|
content |
Object | - | Response result |
content.disabled |
Boolean | - | Whether image quality is disabled
|
content.id |
Integer | - | Image quality setting ID |
content.status |
String | - | Image quality setting status
|
content.createdTime |
Integer | - | Image quality setting creation date and time (millisecond)
|
content.genType |
String | - | Settings classification
|
content.name |
String | - | Image quality setting name |
content.segmentDuration |
Integer | - | Playback time per segment (millisecond)
|
content.segmentCount |
Integer | - | Number of segments
|
content.qualityIds |
Array | - | Image quality ID list |
content.qualities |
Array | - | Image quality list: qualities |
content.enableHlsTimedMetadata |
Boolean | - | Whether to set time-based metadata
|
content.isEnabledUll |
Boolean | - | Low latency settings
|
content.targetLatency |
Integer | - | Low latency target latency (second)
|
content.timedMetadata |
Object | - | Time-based metadata settings
|
content.timedMetadata.key |
String | - | Key
|
content.timedMetadata.header |
String | - | Header (identification value) |
content.timedMetadata.interval |
Integer | - | Insertion interval (millisecond)
|
qualities
The following describes qualities
.
Field | Type | Required | Description |
---|---|---|---|
disabled |
Boolean | - | Whether image quality is disabled
|
id |
Integer | - | Image quality ID |
status |
String | - | Image quality status
|
createdTime |
Integer | - | Image quality creation date and time (millisecond)
|
genType |
String | - | Settings classification
|
name |
String | - | Image quality name |
type |
String | - | Image quality type
|
video |
Object | - | Video settings information
|
video.fps |
Float | - | Number of frames per second (fps) |
video.bitrate |
Integer | - | Video stream's bitrate (bps) |
video.bframes |
Integer | - | Number of B-frames (bidirectional prediction frames) |
video.level |
Integer | - | Video codec level
|
video.width |
Integer | - | Output video width (pixel) |
video.height |
Integer | - | Output video height (pixel) |
video.bypass |
Boolean | - | Whether to bypass the video stream
|
video.codec |
String | - | Video codec format
|
video.orientation |
String | - | Video orientation settings
|
video.profile |
String | - | Video codec profile
|
video.rateControl |
String | - | Bitrate distribution method
|
video.videoH264ParamRefFrames |
Integer | - | H.264 reference frame count
|
audio |
Object | - | Audio settings information |
audio.codec |
String | - | Audio codec format
|
audio.profile |
String | - | Audio codec profile
|
audio.samplerate |
Integer | - | Audio sampling rate (Hz)
|
audio.channels |
Integer | - | Number of audio channels |
audio.bitrate |
Integer | - | Audio stream's bitrate (Kbps) |
audio.bypass |
Boolean | - | Whether to bypass the audio stream
|
Response status codes
For information about the HTTP status codes common to all Live Station APIs, see Live Station response status codes.
Response example
The response example is as follows:
{
"content": {
"disabled": false,
"id": ****,
"status": "CREATED",
"createdTime": 1755138264367,
"genType": "CUSTOM",
"name": "setting000",
"segmentDuration": 1000,
"segmentCount": 2,
"qualityIds": [
5,
****
],
"qualities": [
{
"disabled": false,
"id": 5,
"status": "CREATED",
"createdTime": 1546300800000,
"genType": "SYSTEM",
"name": "720p-9-16",
"type": "NORMAL",
"video": {
"fps": 30.0,
"bitrate": 2500000,
"bframes": 0,
"level": -1,
"width": 720,
"height": 1280,
"bypass": false,
"codec": "H264",
"profile": "MAIN",
"rateControl": "VBR",
"videoH264ParamRefFrames": 1
},
"audio": {
"codec": "AAC",
"profile": "LC",
"samplerate": 48000,
"channels": 0,
"bitrate": 128,
"bypass": false
}
},
{
"disabled": false,
"id": ****,
"status": "CREATED",
"createdTime": 1755134604000,
"genType": "CUSTOM",
"name": "quality000",
"type": "NORMAL",
"video": {
"fps": 60.0,
"bitrate": 204800000,
"bframes": 4,
"level": -1,
"width": 1920,
"height": 1080,
"bypass": true,
"codec": "H264",
"profile": "HIGH",
"rateControl": "VBR",
"videoH264ParamRefFrames": 1
},
"audio": {
"codec": "AAC",
"profile": "LC",
"samplerate": 44100,
"channels": 2,
"bitrate": 320,
"bypass": true
}
}
],
"enableHlsTimedMetadata": true,
"isEnabledUll": false,
"timedMetadata": {
"key": "utc",
"header": "ncloud.livestation.metadata",
"interval": 1000
}
}
}