获取转码任务详情-GetCodecTaskDetail

获取转码任务详情

Request Parameters

Parameter nameTypeDescriptionRequired
TaskIdstring任务的id号Yes
ProjectIdstring项目编号,未填写则为默认项目No

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
TaskIdstring任务IDNo
SrcUrlstring原始视频url地址No
DestVideoNamestring输出文件名No
DestBucketstring输出文件的存储空间No
DestFormatstring输出视频封装格式No
Durationint视频时长,单位:秒。只有当任务状态为处理完成时,该参数有意义,其他状态该参数为0。No
CodecPattenDetailobjectCodecPattenDetail类型No
WatermarkDetailobjectWatermarkDetail类型No
CodecLevelstring转码清晰度:superdefinition、highdefinition、mediumdefinition、lowdefinition,分别对应计费的4种规格。只有当任务状态为处理完成时,该参数有意义,其他状态该参数为空字符串。No
CreateTimeint任务创建时间,单位:Unix时间戳No
FinishTimeint任务完成时间,单位:Unix时间戳。当任务状态为排队中或者处理中时,该参数为0。No
Statusstring任务状态:waiting、processing、finished、failed,分别表示排队中,处理中,处理完成,处理失败。No
CallbackUrlstring任务完成后回调客户的url地址。No

CodecPattenDetail

Parameter nameTypeDescriptionRequired
CodecPattenIdstring转码模版IDYes
CodecPattenNamestring转码模版名称Yes
DestFormatstring输出视频格式Yes
DestVideoBitrateint输出文件视频码率Yes
DestVideoResolutionstring输出文件分辨率Yes
DestSuffixstring输出文件后缀Yes
DestVideoCodecstring视频编码类型Yes

WatermarkDetail

Parameter nameTypeDescriptionRequired
WatermarkIdstring任务IDYes
WatermarkNamestring水印名称Yes
WaterMarkTypestringimage表示图片水印,text表示文字水印Yes
ImageUrlstring图片水印的url地址,只有图片水印有该字段。Yes
TextContentstring文字水印内容Yes
Positionstring水印的参考位置,topleft、topright、center、bottomleft、bottomright分别表示左上、右上、居中、左下、右下Yes
PaddingXint水印离最近的水平边线占整个视频宽度的百分比,取值[0-49]No
PaddingYint水印离最近的垂直边线占整个视频高度的百分比,取值[0-49]No

Request Example

https://api.ucloud.cn/?Action=GetCodecTaskDetail&TaskId=1265

Response Example

{
    "FinishTime": 1501149289,
    "Status": "finished",
    "DestBucket": "wangqiguox.cn-bj.ufileos.com",
    "RetCode": 0,
    "WatermarkDetail": {},
    "CodecPattenDetail": {
        "CodecPattenName": "高清-864x480-mpegts",
        "DestVideoBitrate": 500,
        "DestVideoResolution": "864x480",
        "CodecPattenId": "11",
        "DestFormat": "mpegts",
        "DestSuffix": "_480p"
    },
    "DestVideoName": "1080p-1080p_480p.ts",
    "SrcUrl": "http://bushu.cn-bj.ufileos.com/1080p-1080p.ts",
    "Duration": 300,
    "TaskId": "1265",
    "DestFormat": "mpegts",
    "Action": "GetCodecTaskDetailResponse",
    "CodecLevel": "mediumdefinition",
    "CreateTime": 1501149123,
    "CallbackUrl": ""
}