获取转码模版列表-GetCodecPattenList

获取转码模版列表

Request Parameters

Parameter nameTypeDescriptionRequired
ProjectIdstring项目编号,未填写则为默认项目No

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
DefaultPattenListarray系统预制的转码模版列表,详细结构见下表No
CustomizedPattenListarray客户定制的转码模版列表,详细结构见下表No

CodecPattenListNode

Parameter nameTypeDescriptionRequired
PattenIdstring模版的IDYes
PattenNamestring模版名称,长度不查过256个字节Yes
DestVideoBitratestring视频码率,单位kbps。Yes
DestVideoResolutionstring视频分辨率,格式为像素宽度x像素高度,例如1280x720。该字段为空表示保持原始视频大小。Yes
DestVideoCodecstring视频的编码类型Yes
DestAudioBitrateint音频码率,单位kbps。Yes
DestAudioSampleint音频采样率,单位hz。Yes
DestAudioChannelint音频声道数量。Yes
DestFormatstring目标视频格式,可选值为mp4、flv、mpegts。Yes
DestSuffixstring目标视频的文件名后缀。Yes
CallbackUrlstring转码任务结束后,回调客户的url地址。Yes

Request Example

http(s)://api.ucloud.cn/?Action=GetCodecPattenList

Response Example

{
    "Action": "GetCodecPattenListResponse",
    " CustomizedPattenList": [],
    "RetCode": 0,
    "DefaultPattenList": [
        {
            "DestVideoResolution ": "864x480",
            "DestAudioBitrate ": 48,
            "PattenName": "默认480p-mp4",
            "DestFormat ": "mp4",
            "DestAudioChannel ": 2,
            "DestVideoBitrate ": 500,
            "PattenId": "1",
            "DestAudioSample ": 44100,
            "DestSuffix": "_480p",
            "CallbackUrl": ""
        }
    ]
}