调用GetTranscodeTask根据转码任务ID查询转码作业详细信息。
使用说明
本接口仅支持查询一年内的转码任务数据。QPS限制
本接口的单用户QPS限制为15次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见QPS限制。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
| 名称 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | GetTranscodeTask |
系统规定参数。取值:GetTranscodeTask。 |
| TranscodeTaskId | String | 是 | b1b65ab107e14*****3dbb900f6c1fe0 |
转码任务ID,可通过以下方式获取:
|
返回数据
| 名称 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| RequestId | String | F4C6D5BE-BF13-45*****6C-516EA8906DCD |
请求ID。 |
| TranscodeTask | Object |
转码任务信息。 |
|
| CreationTime | String | 2019-01-23T12:35:12Z |
转码任务创建时间。格式为:yyyy-MM-ddTHH:mm:ssZ(UTC时间)。 |
| Trigger | String | Auto |
触发类型。取值:
|
| TaskStatus | String | Processing |
转码任务状态。取值:
|
| VideoId | String | 883f5d98107*****b7f20aaa352f |
音/视频ID。 |
| CompleteTime | String | 2019-01-23T12:40:12Z |
转码任务完成时间。格式为:yyyy-MM-ddTHH:mm:ssZ(UTC时间)。 |
| TranscodeTemplateGroupId | String | b500c7094bd241*****3e9900752d7c3 |
转码使用的模板组ID。 |
| TranscodeTaskId | String | b1b65ab107e14*****3dbb900f6c1fe0 |
转码任务ID。 |
| TranscodeJobInfoList | Array of TranscodeJobInfo |
转码作业信息。 |
|
| Definition | String | LD |
视频清晰度。取值:
说明 该值为转码模板配置的清晰度标记,不表示转码输出文件实际的分辨率范围。
|
| CreationTime | String | 2019-02-26T08:27:16Z |
转码作业创建时间。格式为:yyyy-MM-ddTHH:mm:ssZ(UTC时间)。 |
| InputFileUrl | String | http://outin-40564*****e1403e7.oss-cn-shanghai.aliyuncs.com/customerTrans/5b95e568f8e*****47f38e/31f1184c-*****b2a2-f94-c213f.wmv |
转码源文件的OSS地址。 |
| ErrorMessage | String | ErrorMessage |
转码失败错误信息。 |
| ErrorCode | String | 200 |
转码失败错误码。 |
| CompleteTime | String | 2019-02-26T08:30:16Z |
转码作业完成时间。格式为:yyyy-MM-ddTHH:mm:ssZ(UTC时间)。 |
| TranscodeProgress | Long | 100 |
转码作业处理进度。取值范围: |
| Priority | String | 6 |
转码任务优先级。 |
| TranscodeJobStatus | String | Transcoding |
转码作业状态。
|
| TranscodeTemplateId | String | 174b0534fea3*****b51c8f0ad1374 |
转码使用的转码模板ID。 |
| TranscodeJobId | String | 38f0e513c88*****85515f9d50be188 |
转码作业ID。 |
| OutputFile | Object |
转码输出文件的信息。 |
|
| VideoStreamList | String | [{\"AvgFPS\":\"30.0\",\"Bitrate\":\"933.814\",\"CodecLongName\":\"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10\",\"CodecName\":\"h264\",\"CodecTag\":\"0x31637661\",\"CodecTagString\":\"avc1\",\"CodecTimeBase\":\"1/60\",\"Dar\":\"9:16\",\"Duration\":\"12.033333\",\"Fps\":\"30.0\",\"HasBFrames\":\"2\",\"Height\":\"360\",\"Index\":\"0\",\"Lang\":\"und\",\"Level\":\"30\",\"PixFmt\":\"yuv420p\",\"Profile\":\"High\",\"Sar\":\"81:256\",\"StartTime\":\"0.000000\",\"Timebase\":\"1/15360\",\"Width\":\"640\"}] |
视频流列表。 |
| OutputFileUrl | String | http://outin-40564*****e1403e7.oss-cn-shanghai.aliyuncs.com/883f5d*****f20aaa352f/c3be4f073*****7d5193ec8-{DestMd5}-od-S00000001-200000.mp4 |
转码输出文件的OSS地址。 |
| Encryption | String | {\"EncryptType\":\"AliyunVoDEncryption\"} |
转码输出文件使用的加密配置。取值:
|
| Height | String | 360 |
转码输出文件视频画面高。单位:px。 |
| SubtitleStreamList | String | [] |
字幕流列表。 |
| Bitrate | String | 964 |
转码输出文件平均码率。单位:Kbps。 |
| AudioStreamList | String | "AudioStreamList": "[{\"Bitrate\":\"64.533\",\"ChannelLayout\":\"stereo\",\"Channels\":\"2\",\"CodecLongName\":\"AAC (Advanced Audio Coding)\",\"CodecName\":\"aac\",\"CodecTag\":\"0x6134706d\",\"CodecTagString\":\"mp4a\",\"CodecTimeBase\":\"1/44100\",\"Duration\":\"12.615533\",\"Index\":\"1\",\"Lang\":\"und\",\"SampleFmt\":\"fltp\",\"Samplerate\":\"44100\",\"StartTime\":\"-0.046440\",\"Timebase\":\"1/44100\"}] |
音频流列表。 |
| Width | String | 640 |
转码输出文件视频画面宽。单位:px。 |
| Fps | String | 25 |
转码输出文件的帧率。单位:帧/秒。 |
| Duration | String | 12 |
转码输出文件时长。单位:秒。 |
| Format | String | m3u8 |
转码输出文件的封装格式。 |
| Filesize | Long | 851076 |
转码输出文件大小。单位:Byte。 |
| WatermarkIdList | Array of String | ["64079a0e3e286*****b48a8c9413"] |
转码输出文件使用的水印ID列表。 |
示例
请求示例
https://vod.{ApiRegion}.aliyuncs.com/?Action=GetTranscodeTask
&TranscodeTaskId=b1b65ab107e14*****3dbb900f6c1fe0
&<公共请求参数>
正常返回示例
XML格式
HTTP/1.1 200 OK
Content-Type:application/xml
<GetTranscodeTaskResponse>
<RequestId>F4C6D5BE-BF13-45*****6C-516EA8906DCD</RequestId>
<TranscodeTask>
<TranscodeJobInfoList>
<TranscodeTemplateId>174b0534fea3*****b51c8f0ad1374</TranscodeTemplateId>
<Priority>6</Priority>
<InputFileUrl>http://outin-40564*****e1403e7.oss-cn-shanghai.aliyuncs.com/customerTrans/5b95e568f8e*****47f38e/31f1184c-*****b2a2-f94-c213f.wmv</InputFileUrl>
<Definition>LD</Definition>
<CreationTime>2019-02-26T08:27:16Z</CreationTime>
<TranscodeJobStatus>Transcoding</TranscodeJobStatus>
<TranscodeJobId>38f0e513c88*****85515f9d50be188</TranscodeJobId>
<ErrorCode>200</ErrorCode>
<TranscodeProgress>100</TranscodeProgress>
<ErrorMessage>ErrorMessage</ErrorMessage>
<CompleteTime>2019-02-26T08:30:16Z</CompleteTime>
</TranscodeJobInfoList>
<TranscodeJobInfoList>
<OutputFile>
<OutputFileUrl>http://outin-40564*****e1403e7.oss-cn-shanghai.aliyuncs.com/883f5d*****f20aaa352f/c3be4f073*****7d5193ec8-{DestMd5}-od-S00000001-200000.mp4</OutputFileUrl>
<Fps>25</Fps>
<VideoStreamList>[{\"AvgFPS\":\"30.0\",\"Bitrate\":\"933.814\",\"CodecLongName\":\"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10\",\"CodecName\":\"h264\",\"CodecTag\":\"0x31637661\",\"CodecTagString\":\"avc1\",\"CodecTimeBase\":\"1/60\",\"Dar\":\"9:16\",\"Duration\":\"12.033333\",\"Fps\":\"30.0\",\"HasBFrames\":\"2\",\"Height\":\"360\",\"Index\":\"0\",\"Lang\":\"und\",\"Level\":\"30\",\"PixFmt\":\"yuv420p\",\"Profile\":\"High\",\"Sar\":\"81:256\",\"StartTime\":\"0.000000\",\"Timebase\":\"1/15360\",\"Width\":\"640\"}]</VideoStreamList>
<Duration>12</Duration>
<AudioStreamList>"AudioStreamList": "[{\"Bitrate\":\"64.533\",\"ChannelLayout\":\"stereo\",\"Channels\":\"2\",\"CodecLongName\":\"AAC (Advanced Audio Coding)\",\"CodecName\":\"aac\",\"CodecTag\":\"0x6134706d\",\"CodecTagString\":\"mp4a\",\"CodecTimeBase\":\"1/44100\",\"Duration\":\"12.615533\",\"Index\":\"1\",\"Lang\":\"und\",\"SampleFmt\":\"fltp\",\"Samplerate\":\"44100\",\"StartTime\":\"-0.046440\",\"Timebase\":\"1/44100\"}]</AudioStreamList>
<Encryption>{\"EncryptType\":\"AliyunVoDEncryption\"}</Encryption>
<Filesize>851076</Filesize>
<Bitrate>964</Bitrate>
<WatermarkIdList>["64079a0e3e286*****b48a8c9413"]</WatermarkIdList>
<Format>m3u8</Format>
<SubtitleStreamList>[]</SubtitleStreamList>
<Height>360</Height>
<Width>640</Width>
</OutputFile>
</TranscodeJobInfoList>
<Trigger>Auto </Trigger>
<VideoId>883f5d98107*****b7f20aaa352f</VideoId>
<TranscodeTemplateGroupId>b500c7094bd241*****3e9900752d7c3</TranscodeTemplateGroupId>
<CreationTime>2019-01-23T12:35:12Z</CreationTime>
<TaskStatus>Processing</TaskStatus>
<CompleteTime>2019-01-23T12:40:12Z</CompleteTime>
<TranscodeTaskId>b1b65ab107e14*****3dbb900f6c1fe0</TranscodeTaskId>
</TranscodeTask>
</GetTranscodeTaskResponse>
JSON格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "F4C6D5BE-BF13-45*****6C-516EA8906DCD",
"TranscodeTask" : {
"TranscodeJobInfoList" : [ {
"TranscodeTemplateId" : "174b0534fea3*****b51c8f0ad1374",
"Priority" : "6",
"InputFileUrl" : "http://outin-40564*****e1403e7.oss-cn-shanghai.aliyuncs.com/customerTrans/5b95e568f8e*****47f38e/31f1184c-*****b2a2-f94-c213f.wmv",
"Definition" : "LD",
"CreationTime" : "2019-02-26T08:27:16Z",
"TranscodeJobStatus" : "Transcoding",
"TranscodeJobId" : "38f0e513c88*****85515f9d50be188",
"ErrorCode" : "200",
"TranscodeProgress" : "100",
"ErrorMessage" : "ErrorMessage",
"CompleteTime" : "2019-02-26T08:30:16Z"
}, {
"OutputFile" : {
"OutputFileUrl" : "http://outin-40564*****e1403e7.oss-cn-shanghai.aliyuncs.com/883f5d*****f20aaa352f/c3be4f073*****7d5193ec8-{DestMd5}-od-S00000001-200000.mp4",
"Fps" : "25",
"VideoStreamList" : "[{\\\"AvgFPS\\\":\\\"30.0\\\",\\\"Bitrate\\\":\\\"933.814\\\",\\\"CodecLongName\\\":\\\"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10\\\",\\\"CodecName\\\":\\\"h264\\\",\\\"CodecTag\\\":\\\"0x31637661\\\",\\\"CodecTagString\\\":\\\"avc1\\\",\\\"CodecTimeBase\\\":\\\"1/60\\\",\\\"Dar\\\":\\\"9:16\\\",\\\"Duration\\\":\\\"12.033333\\\",\\\"Fps\\\":\\\"30.0\\\",\\\"HasBFrames\\\":\\\"2\\\",\\\"Height\\\":\\\"360\\\",\\\"Index\\\":\\\"0\\\",\\\"Lang\\\":\\\"und\\\",\\\"Level\\\":\\\"30\\\",\\\"PixFmt\\\":\\\"yuv420p\\\",\\\"Profile\\\":\\\"High\\\",\\\"Sar\\\":\\\"81:256\\\",\\\"StartTime\\\":\\\"0.000000\\\",\\\"Timebase\\\":\\\"1/15360\\\",\\\"Width\\\":\\\"640\\\"}]",
"Duration" : "12",
"AudioStreamList" : "\"AudioStreamList\": \"[{\\\"Bitrate\\\":\\\"64.533\\\",\\\"ChannelLayout\\\":\\\"stereo\\\",\\\"Channels\\\":\\\"2\\\",\\\"CodecLongName\\\":\\\"AAC (Advanced Audio Coding)\\\",\\\"CodecName\\\":\\\"aac\\\",\\\"CodecTag\\\":\\\"0x6134706d\\\",\\\"CodecTagString\\\":\\\"mp4a\\\",\\\"CodecTimeBase\\\":\\\"1/44100\\\",\\\"Duration\\\":\\\"12.615533\\\",\\\"Index\\\":\\\"1\\\",\\\"Lang\\\":\\\"und\\\",\\\"SampleFmt\\\":\\\"fltp\\\",\\\"Samplerate\\\":\\\"44100\\\",\\\"StartTime\\\":\\\"-0.046440\\\",\\\"Timebase\\\":\\\"1/44100\\\"}]",
"Encryption" : "{\\\"EncryptType\\\":\\\"AliyunVoDEncryption\\\"}",
"Filesize" : "851076",
"Bitrate" : "964",
"WatermarkIdList" : "[\"64079a0e3e286*****b48a8c9413\"]",
"Format" : "m3u8",
"SubtitleStreamList" : "[]",
"Height" : "360",
"Width" : "640"
}
} ],
"Trigger" : "Auto ",
"VideoId" : "883f5d98107*****b7f20aaa352f",
"TranscodeTemplateGroupId" : "b500c7094bd241*****3e9900752d7c3",
"CreationTime" : "2019-01-23T12:35:12Z",
"TaskStatus" : "Processing",
"CompleteTime" : "2019-01-23T12:40:12Z",
"TranscodeTaskId" : "b1b65ab107e14*****3dbb900f6c1fe0"
}
}
错误码
访问错误中心查看更多错误码。
接口错误码
下表列举了本接口特有的错误码。
|
错误代码 |
错误信息 |
HTTP 状态码 |
说明 |
|---|---|---|---|
|
NoSuchResource |
The specified resource %s does not exist. |
404 |
特定的信息不存在,%s表示指定的信息。 |