Classic/VPC環境で利用できます。
System画質以外の画質が必要な場合は、目的の画質を定義して Custom画質を作成します。
リクエスト
リクエスト形式を説明します。リクエスト形式は次の通りです。
| メソッド | URI |
|---|---|
| POST | /api/v2/qualityProfiles |
リクエストヘッダ
Live Station APIで共通して使用されるヘッダの詳細は、Live Stationのリクエストヘッダをご参照ください。
リクエストボディ
リクエストボディの説明は次の通りです。
| フィールド | タイプ | 必須の有無 | 説明 |
|---|---|---|---|
name |
String | Required | 画質名
|
type |
String | Required | 画質タイプ
|
video |
Object | Conditional | ビデオ設定情報
|
video.codec |
String | Conditional | ビデオコーデックの形式
|
video.profile |
String | Conditional | ビデオコーデックプロファイル
|
video.level |
Integer | Conditional | ビデオコーデックレベル
|
video.width |
Integer | Conditional | 出力ビデオの幅(ピクセル)
|
video.height |
Integer | Conditional | 出力ビデオの高さ(ピクセル)
|
video.fps |
Float | Conditional | 1秒当たりのフレーム数(fps)
|
video.bitrate |
Integer | Conditional | ビデオストリームのビットレート(bps)
|
video.videoH264ParamRefFrames |
Integer | Optional | H.264参照フレーム数
|
video.rateControl |
String | Optional | ビットレートの配分方式
|
video.bframes |
Integer | Optional | Bフレーム(双方向予測フレーム)数
|
video.bypass |
Boolean | Optional | ビデオストリームバイパス
|
video.orientation |
String | Optional | ビデオの方向転換設定
|
audio |
Object | Required | オーディオ設定情報 |
audio.codec |
String | Required | オーディオコーデックの形式
|
audio.profile |
String | Conditional | オーディオコーデックプロファイル
|
audio.samplerate |
Integer | Required | オーディオサンプリングレート(Hz)
|
audio.channels |
Integer | Required | オーディオチャンネル数
|
audio.bitrate |
Integer | Required | オーディオストリームのビットレート(Kbps)
|
audio.bypass |
Boolean | Optional | オーディオストリームバイパス
|
リクエスト例
リクエストのサンプルコードは次の通りです。
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
}
}'
レスポンス
レスポンス形式を説明します。
レスポンスボディ
レスポンスボディの説明は次の通りです。
| フィールド | タイプ | 必須の有無 | 説明 |
|---|---|---|---|
content |
Object | - | レスポンス結果 |
content.disabled |
Boolean | - | 画質を無効化するか
|
content.id |
Integer | - | 画質 ID |
content.status |
String | - | 画質の状態
|
content.createdTime |
Integer | - | 画質作成日時(ミリ秒)
|
content.genType |
String | - | 設定の分類
|
content.name |
String | - | 画質名 |
content.type |
String | - | 画質タイプ
|
content.video |
Object | - | ビデオ設定情報
|
content.video.fps |
Float | - | 1秒当たりのフレーム数(fps) |
content.video.bitrate |
Integer | - | ビデオストリームのビットレート(bps) |
content.video.bframes |
Integer | - | Bフレーム(双方向予測フレーム)数 |
content.video.level |
Integer | - | ビデオコーデックレベル
|
content.video.width |
Integer | - | 出力ビデオの幅(ピクセル) |
content.video.height |
Integer | - | 出力ビデオの高さ(ピクセル) |
content.video.bypass |
Boolean | - | ビデオストリームバイパス
|
content.video.codec |
String | - | ビデオコーデックの形式
|
content.video.orientation |
String | - | ビデオの方向転換設定
|
content.video.profile |
String | - | ビデオコーデックプロファイル
|
content.video.rateControl |
String | - | ビットレート配分方式
|
content.video.videoH264ParamRefFrames |
Integer | - | H.264参照フレーム数
|
content.audio |
Object | - | オーディオ設定情報 |
content.audio.codec |
String | - | オーディオコーデックの形式
|
content.audio.profile |
String | - | オーディオコーデックプロファイル
|
content.audio.samplerate |
Integer | - | オーディオサンプリングレート(Hz)
|
content.audio.channels |
Integer | - | オーディオチャンネル数 |
content.audio.bitrate |
Integer | - | オーディオストリームのビットレート(Kbps) |
content.audio.bypass |
Boolean | - | オーディオストリームバイパス
|
レスポンスステータスコード
Live Station APIで共通して使用されるレスポンスステータスコードの詳細は、Live Stationのレスポンスステータスコードをご参照ください。
レスポンス例
レスポンスのサンプルコードは次の通りです。
{
"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
}
}
}