Queries details about transcoding jobs based on the transcoding task ID.

Usage notes

You can call this operation to query only transcoding tasks created within the past year.

QPS limit

You can call this operation up to 15 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits on API operations in ApsaraVideo VoD.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetTranscodeTask

The operation that you want to perform. Set the value to GetTranscodeTask.

TranscodeTaskId String Yes b1b65ab107e14*****3dbb900f6c1fe0

The ID of the transcoding task. You can use one of the following methods to obtain the ID:

  • Obtain the value of TranscodeTaskId from the response to the SubmitTranscodeJobs operation.
  • Obtain the value of TranscodeTaskId from the response to the ListTranscodeTask operation.

Response parameters

Parameter Type Example Description
RequestId String F4C6D5BE-BF13-45*****6C-516EA8906DCD

The ID of the request.

TranscodeTask Object

Details about transcoding tasks.

CreationTime String 2019-01-23T12:35:12Z

The time when the transcoding task was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

Trigger String Auto

The mode in which the transcoding task is triggered. Valid values:

  • Auto: The transcoding task is automatically triggered when the video is uploaded.
  • Manual: The transcoding task is triggered by calling the SubmitTranscodeJobs operation.
TaskStatus String Processing

The status of the transcoding task. Valid values:

  • Processing: In progress.
  • Partial: Some transcoding jobs were complete.
  • CompleteAllSucc: All transcoding jobs were successful.
  • CompleteAllFail: All transcoding jobs failed. If an exception occurs in the source file, no transcoding job is initiated and the transcoding task fails.
  • CompletePartialSucc: All transcoding jobs were complete but only some were successful.
VideoId String 883f5d98107*****b7f20aaa352f

The ID of the audio or video file.

CompleteTime String 2019-01-23T12:40:12Z

The time when the transcoding task was complete. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

TranscodeTemplateGroupId String b500c7094bd241*****3e9900752d7c3

The ID of the transcoding template group.

TranscodeTaskId String b1b65ab107e14*****3dbb900f6c1fe0

The ID of the transcoding task.

TranscodeJobInfoList Array of TranscodeJobInfo

Details about transcoding jobs.

Definition String LD

The video resolution. Valid values:

  • LD: low definition
  • SD: standard definition
  • HD: high definition
  • FHD: ultra high definition
  • OD: original definition
  • 2K: 2K
  • 4K: 4K
  • SQ: standard sound quality
  • HQ: high sound quality
  • AUTO: adaptive bitrate Adaptive bitrate streams are returned only if PackageSetting is set in the transcoding template. For more information, see Basic structures.
Note This parameter indicates the definition that is configured in the transcoding template and does not indicate the actual resolution of the output video.
CreationTime String 2019-02-26T08:27:16Z

The time when the transcoding job was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

InputFileUrl String http://outin-40564*****e1403e7.oss-cn-shanghai.aliyuncs.com/customerTrans/5b95e568f8e*****47f38e/31f1184c-*****b2a2-f94-c213f.wmv

The Object Storage Service (OSS) URL of the input file.

ErrorMessage String ErrorMessage

The error message returned when the transcoding job failed.

ErrorCode String 200

The error code returned when the transcoding job failed.

CompleteTime String 2019-02-26T08:30:16Z

The time when the transcoding job was complete. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

TranscodeProgress Long 100

The progress of the transcoding job. Valid values: [0,100].

Priority String 6

The priority of the transcoding job.

TranscodeJobStatus String Transcoding

The status of the transcoding job.

  • Transcoding
  • TranscodeSuccess
  • TranscodeFail
TranscodeTemplateId String 174b0534fea3*****b51c8f0ad1374

The ID of the transcoding template.

TranscodeJobId String 38f0e513c88*****85515f9d50be188

The ID of the transcoding job.

OutputFile Object

The information about the output file.

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\"}]

The video streams.

OutputFileUrl String http://outin-40564*****e1403e7.oss-cn-shanghai.aliyuncs.com/883f5d*****f20aaa352f/c3be4f073*****7d5193ec8-{DestMd5}-od-S00000001-200000.mp4

The OSS URL of the output file.

Encryption String {\"EncryptType\":\"AliyunVoDEncryption\"}

The encryption method of the output file. Valid values:

  • AliyunVoDEncryption: Alibaba Cloud proprietary cryptography
  • HLSEncryption: HTTP Live Streaming (HLS) encryption
Height String 360

The height of the output video. Unit: pixels.

SubtitleStreamList String []

The subtitle streams.

Bitrate String 964

The average bitrate of the output file. Unit: Kbit/s.

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\"}]

The audio streams.

Width String 640

The width of the output video. Unit: pixels.

Fps String 25

The frame rate of the output file. Unit: frames per second.

Duration String 12

The length of the output file. Unit: seconds.

Format String m3u8

The container format of the output file.

FileSize Long 851076

The size of the output file. Unit: bytes.

WatermarkIdList Array of String ["64079a0e3e286*****b48a8c9413"]

The IDs of the watermarks that are applied to the output file.

Examples

Sample requests

https://vod.{ApiRegion}.aliyuncs.com/?Action=GetTranscodeTask
&TranscodeTaskId=b1b65ab107e14*****3dbb900f6c1fe0
&<Common request parameters>

Sample responses

XML format

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 format

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"
  }
}

Error codes

For a list of error codes, visit the API Error Center.

Common errors

The following table describes the common errors that this operation can return.

Error code

Error message

HTTP status code

Description

NoSuchResource

The specified resource %s does not exist.

404

The error message returned because the specified information does not exist. %s indicates the specified information.