Classic/VPC 환경에서 이용 가능합니다.
Object Storage에 저장된 미디어 원본 파일을 모바일, PC 등 다양한 디바이스에서 다양한 화질로 시청할 수 있도록 변환하기 위한 인코딩 옵션을 생성합니다.
요청
요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.
메서드 | URI |
---|---|
POST | /api/v2/encoding-option |
요청 헤더
VOD Station API에서 공통으로 사용하는 헤더에 대한 정보는 VOD Station 요청 헤더를 참조해 주십시오.
요청 바디
요청 바디에 대한 설명은 다음과 같습니다.
필드 | 타입 | 필수 여부 | 설명 |
---|---|---|---|
encodingOptionType |
String | Optional | 인코딩 옵션 타입
|
name |
String | Required | 사용자 지정 인코딩 옵션 이름
|
format |
String | Required | 변환된 미디어 파일 컨테이너 포맷
|
video |
Object | Required | 비디오 인코딩 옵션 정보
|
video.codec |
String | Required | 비디오 코덱 포맷
|
video.codecOptions |
Object | Required | 비디오 코덱 상세 옵션 정보 |
video.codecOptions.profile |
String | Required | 비디오 코덱 프로필(Video Codec Profile)
|
video.codecOptions.level |
String | Required | 비디오 코덱 레벨(Video Codec Level)
|
video.bitrate |
Integer | Required | 비디오 스트림의 비트레이트(Kbps)
|
video.width |
Integer | Required | 출력 비디오의 너비(픽셀)
|
video.height |
Integer | Required | 출력 비디오의 높이(픽셀)
|
video.framerate |
Double | Required | 초당 프레임 수(fps)
|
video.maxFramerate |
Double | Optional | 최대 초당 프레임 수(fps)
|
video.keyframeInterval |
Integer | Required | 비디오에 키 프레임이 생성되는 간격(초)
|
video.rateControl |
String | Required | 비디오 변환 시의 비트레이트 배분 방식
|
video.pass |
String | Required | 비디오 변환 시의 인코딩 패스 설정
|
audio |
Object | Required | 오디오 인코딩 옵션 정보 |
audio.codec |
String | Required | 오디오 코덱 포맷
|
audio.bitrate |
Integer | Required | 오디오 스트림의 비트레이트(Kbps)
|
audio.channel |
Integer | Required | 출력 오디오의 채널 수 설정
|
audio.samplingRate |
Integer | Required | 출력 오디오 샘플링 레이트(Hz)
|
요청 예시
요청 예시는 다음과 같습니다.
curl --location --request POST 'https://vodstation.apigw.ntruss.com/api/v2/encoding-option' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--data '{
"encodingOptionType": "NORMAL",
"name": "vodstation_uhd",
"format": "MP4",
"video": {
"codec": "AVC",
"codecOptions": {
"profile": "HIGH",
"level": "5.1"
},
"bitrate": 18000,
"width": 3840,
"height": 2160,
"framerate": -2.0,
"maxFramerate": 30,
"keyframeInterval": 2,
"rateControl": "ABR",
"pass": "1-Pass"
},
"audio": {
"codec": "AAC",
"bitrate": 192,
"channel": 2,
"samplingRate": 48000.0
}
}'
응답
응답 형식을 설명합니다.
응답 바디
응답 바디에 대한 설명은 다음과 같습니다.
필드 | 타입 | 필수 여부 | 설명 |
---|---|---|---|
content |
Object | - | 응답 결과 |
content.disabled |
Boolean | - | Sub Account 비활성화 여부
|
content.id |
Integer | - | 인코딩 옵션 아이디 |
content.encodingOptionType |
String | - | 인코딩 옵션 타입
|
content.name |
String | - | 인코딩 옵션 이름 |
content.format |
String | - | 변환된 미디어 파일 컨테이너 포맷 |
content.video |
Object | - | 비디오 인코딩 옵션 정보 |
content.video.codec |
String | - | 비디오 코덱 포맷 |
content.video.codecOptions |
Object | - | 비디오 코덱 상세 옵션 정보 |
content.video.codecOptions.profile |
String | - | 비디오 코덱 프로필(Video Codec Profile) |
content.video.codecOptions.level |
String | - | 비디오 코덱 레벨(Video Codec Level) |
content.video.bitrate |
Integer | - | 비디오 스트림의 비트레이트(Kbps) |
content.video.width |
Integer | - | 출력 비디오의 너비(픽셀) |
content.video.height |
Integer | - | 출력 비디오의 높이(픽셀) |
content.video.framerate |
Double | - | 초당 프레임 수(fps) |
content.video.maxFramerate |
Double | - | 최대 초당 프레임 수(fps) |
content.video.keyframeInterval |
Double | - | 비디오에 키 프레임이 생성되는 간격(초) |
content.video.rateControl |
String | - | 비트레이트 배분 방식
|
content.video.pass |
String | - | 비디오 변환 시의 인코딩 패스 설정
|
content.audio |
Object | - | 오디오 인코딩 옵션 정보 |
content.audio.codec |
String | - | 오디오 코덱 포맷 |
content.audio.bitrate |
Integer | - | 오디오 스트림의 비트레이트(Kbps) |
content.audio.channel |
Integer | - | 출력 오디오의 채널 수 설정
|
content.audio.samplingRate |
Double | - | 출력 오디오 샘플링 레이트(Hz) |
content.regionNo |
String | - | 리전 번호
|
content.memberNo |
Integer | - | 멤버 번호 |
응답 상태 코드
VOD Station API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 VOD Station 응답 상태 코드를 참조해 주십시오.
응답 예시
응답 예시는 다음과 같습니다.
{
"content": {
"disabled": false,
"id": 1111,
"encodingOptionType": "NORMAL",
"name": "vodstation_uhd",
"format": "MP4",
"video": {
"codec": "AVC",
"codecOptions": {
"profile": "HIGH",
"level": "5.1"
},
"bitrate": 18000,
"width": 3840,
"height": 2160,
"framerate": -2.0,
"maxFramerate": 30.0,
"keyframeInterval": 2.0,
"rateControl": "ABR",
"pass": "1-Pass"
},
"audio": {
"codec": "AAC",
"bitrate": 192,
"channel": 2,
"samplingRate": 48000.0
},
"regionNo": "1",
"memberNo": 2*****2
}
}