Create custom image quality

Prev Next

Available in Classic and VPC

If you need a separate image quality other than system qualities, create a custom image quality by defining the desired image quality.

Request

This section describes the request format. The method and URI are as follows:

Method URI
POST /api/v2/qualityProfiles

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 name
  • Enter 3 to 20 characters using a combination of English letters, numbers, and the special character "-".
  • Names can be duplicated.
type String Required Image quality type
  • NORMAL | AUDIO
    • NORMAL: Video and audio output
    • AUDIO: Audio-only output
video Object Conditional Video settings information
  • Required if type is NORMAL
video.codec String Conditional Video codec format
  • H264 (valid value)
video.profile String Conditional Video codec profile
  • BASELINE | MAIN | HIGH
    • BASELINE: Default option (for low-end devices, with minimal features)
    • MAIN: Recommended HD option
    • HIGH: Recommended full HD option
  • A predefined standard specification that enables the use of specific technologies in the H.264 codec for the intended use of the video.
  • If video.widthxvideo.height is smaller than 1280x720, only BASELINE can be entered.
video.level Integer Conditional Video codec level
  • -1: AUTO (valid value)
  • A predefined standard specification of the performance limits of the hardware required for playback (decoding)
video.width Integer Conditional Output video width (pixel)
  • 128-1920
  • Only even numbers are allowed.
video.height Integer Conditional Output video height (pixel)
  • 96-1920
  • Only even numbers are allowed.
video.fps Float Conditional Number of frames per second (fps)
  • 1-60
video.bitrate Integer Conditional Video stream's bitrate (bps)
  • 1-204800000
video.videoH264ParamRefFrames Integer Optional H.264 reference frame count
  • 1 (valid value)
video.rateControl String Optional Bitrate distribution method
  • VBR (default) | CBR
    • VBR: Variable bitrate
    • CBR: Constant bitrate
video.bframes Integer Optional Number of B-frames (bidirectional prediction frames)
  • 0-4 (default: 0)
  • If video.widthxvideo.height is smaller than 1280x720, 0-2 can be entered.
  • If video.widthxvideo.height is smaller than 854x480, only 0 can be entered.
video.bypass Boolean Optional Whether to bypass the video stream
  • true | false (default)
    • true: Use the source stream as is (pass-through).
    • false: Transcode to match the settings information.
video.orientation String Optional Video orientation settings
  • FIX | FREE
    • FIX: Fixed
    • FREE: Switchable
audio Object Required Audio settings information
audio.codec String Required Audio codec format
  • AAC | MP3
audio.profile String Conditional Audio codec profile
  • LC: AAC-LC (valid value)
  • It can be entered only if audio.codec is AAC, and it is required.
audio.samplerate Integer Required Audio sampling rate (Hz)
  • If audio.codec is AAC, available values: 8000 | 11025 | 12000 | 16000 | 22050 | 24000 | 32000 | 44100 (default) | 48000 | 64000 |88200 | 96000
  • If audio.codec is MP3, available values: 8000 | 11025 | 12000 | 16000 | 22050 | 24000 |32000 | 44100 (default) | 48000
  • Samples per second
audio.channels Integer Required Number of audio channels
  • If audio.codec is AAC, available range: 0-8 (default: 0)
  • If audio.codec is MP3, available range: 0-2 (default: 0)
audio.bitrate Integer Required Audio stream's bitrate (Kbps)
  • 16-320
audio.bypass Boolean Optional Whether to bypass the audio stream
  • true | false (default)
    • true: Use the source stream as is (pass-through).
    • false: Transcode to match the settings information.

Request example

The request example is as follows:

curl --location --request POST 'https://livestation.apigw.ntruss.com/api/v2/qualityProfiles' \
--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": "quality000",
    "type": "NORMAL",
    "video": {
        "codec": "H264",
        "profile": "HIGH",
        "level": -1,
        "width": 1920,
        "height": 1080,
        "fps": 60,
        "bitrate": 204800000,
        "videoH264ParamRefFrames": 1,
        "rateControl": "VBR",
        "bframes": 4,
        "bypass": false
    },
    "audio": {
        "codec": "AAC",
        "profile": "LC",
        "samplerate": 44100,
        "channels": 2,
        "bitrate": 320,
        "bypass": false
    }
}'

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
  • true | false
    • true: Disabled
    • false: Enabled
content.id Integer - Image quality ID
content.status String - Image quality status
  • CREATED: Creation completed (valid value)
content.createdTime Integer - Image quality creation date and time (millisecond)
  • Unix timestamp format
content.genType String - Settings type
  • CUSTOM: Create manually (valid value)
content.name String - Image quality name
content.type String - Image quality type
  • NORMAL | AUDIO
    • NORMAL: Video and audio output
    • AUDIO: Audio-only output
content.video Object - Video settings information
  • Not displayed if content.type is AUDIO
content.video.fps Float - Number of frames per second (fps)
content.video.bitrate Integer - Video stream's bitrate (bps)
content.video.bframes Integer - Number of B-frames (bidirectional prediction frames)
content.video.level Integer - Video codec level
  • -1: AUTO (valid value)
  • A predefined standard specification of the performance limits of the hardware required for playback (decoding)
content.video.width Integer - Output video width (pixel)
content.video.height Integer - Output video height (pixel)
content.video.bypass Boolean - Whether to bypass the video stream
  • true | false
    • true: Use the source stream as is (pass-through).
    • false: Transcode to match the settings information.
content.video.codec String - Video codec format
  • H264 (valid value)
content.video.orientation String - Video orientation settings
  • FIX | FREE
    • FIX: Fixed
    • FREE: Switchable
content.video.profile String - Video codec profile
  • BASELINE | MAIN | HIGH
    • BASELINE: Default option (for low-end devices, with minimal features)
    • MAIN: Recommended HD option
    • HIGH: Recommended full HD option
  • A predefined standard specification that enables the use of specific technologies in the H.264 codec for the intended use of the video
content.video.rateControl String - Bitrate distribution method
  • VBR | CBR
    • VBR: Variable bitrate
    • CBR: Constant bitrate
content.video.videoH264ParamRefFrames Integer - H.264 reference frame count
  • 1 (valid value)
content.audio Object - Audio settings information
content.audio.codec String - Audio codec format
  • AAC | MP3
content.audio.profile String - Audio codec profile
  • LC: AAC-LC (valid value)
content.audio.samplerate Integer - Audio sampling rate (Hz)
  • Samples per second
content.audio.channels Integer - Number of audio channels
content.audio.bitrate Integer - Audio stream's bitrate (Kbps)
content.audio.bypass Boolean - Whether to bypass the audio stream
  • true | false
    • true: Use the source stream as is (pass-through).
    • false: Transcode to match the settings information.

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": 1755134603531,
        "genType": "CUSTOM",
        "name": "quality000",
        "type": "NORMAL",
        "video": {
            "fps": 60.0,
            "bitrate": 204800000,
            "bframes": 4,
            "level": -1,
            "width": 1920,
            "height": 1080,
            "bypass": false,
            "codec": "H264",
            "profile": "HIGH",
            "rateControl": "VBR",
            "videoH264ParamRefFrames": 1
        },
        "audio": {
            "codec": "AAC",
            "profile": "LC",
            "samplerate": 44100,
            "channels": 2,
            "bitrate": 320,
            "bypass": false
        }
    }
}