All Products
Search
Document Center

ApsaraVideo VOD:GetTranscodeTask

Last Updated:Feb 06, 2025

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

Operation description

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

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vod:GetTranscodeTaskget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TranscodeTaskIdstringNo

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.
b1b65ab107e14*****3dbb900f6c1fe0
JobIdsstringNo

Transcoding job ID. Supports up to 10 IDs, and multiple IDs should be separated by a comma (,). You can obtain this value in the following ways:

When initiating a transcoding task through the SubmitTranscodeJobs interface, it is the value of the returned parameter JobId.

86c1925fba0****,7afb201e7fa****,2cc4997378****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

F4C6D5BE-BF13-45*****6C-516EA8906DCD
NonExistJobIdsarray

The nonexistent job ID.

JobIdstring

The nonexistent job ID.

["hhhhhhh"]
TranscodeJobInfoListarray<object>

List of transcode job information.

TranscodeJobInfoobject
Definitionstring

The clarity and audio quality types are defined as follows:

  • SD: Standard Definition.
  • HD: High Definition.
  • FHD: Full High Definition.
  • OD: Original Definition.
  • 2K: 2K.
  • 4K: 4K.
  • SQ: Standard Audio Quality.
  • HQ: High Audio Quality.
  • AUTO: Adaptive Bitrate. This is only available when the transcoding template is configured with packaging settings. Please refer to the Transcoding Template Configuration - Package Setting for more details.
Note This value represents the clarity label configured in the transcoding template and does not indicate the actual resolution range of the transcoded output file.
LD
CreationTimestring

The creation time of the transcoding job. The format is yyyy-MM-dd'T'HH:mm:ssZ (UTC time).

2019-02-26T08:27:16Z
InputFileUrlstring

The OSS address of the source file for transcoding.

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

The error message returned.

ErrorMessage
ErrorCodestring

The error code.

200
CompleteTimestring

The complete time of the transcoding job. The format is yyyy-MM-dd'T'HH:mm:ssZ (UTC time).

2019-02-26T08:30:16Z
TranscodeProgresslong

The processing progress of the transcoding job. The value range is [0, 100].

80
Prioritystring

The priority of the transcoding task.

6
TranscodeJobStatusstring

The status of the transcoding job:

Transcoding: Transcoding in progress. TranscodeSuccess: Transcoding successful. TranscodeFail: Transcoding failed.

Transcoding
TranscodeTemplateIdstring

The ID of the template used for the transcode job.

174b0534fea3*****b51c8f0ad1374
TranscodeJobIdstring

The ID of the transcode job.

38f0e513c88*****85515f9d50be188
OutputFileobject

Information about the transcoded output files.

VideoStreamListstring

List of video streams.

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

OSS address of the transcoded output file.

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

Encryption configuration used for the transcoded output file. Values:

  • AliyunVoDEncryption: Alibaba Cloud Video Encryption (private encryption).
  • HLSEncryption: HLS standard encryption.
{\"EncryptType\":\"AliyunVoDEncryption\"}
Heightstring

Height of the video frame in the transcoded output file. Unit: pixels (px).

360
SubtitleStreamListstring

List of subtitle streams.

[]
Bitratestring

Average bitrate of the transcoded output file. Unit: Kbps.

964
AudioStreamListstring

List of audio streams.

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

Width of the video frame in the transcoded output file. Unit: pixels (px).

640
Fpsstring

Frame rate of the transcoded output file. Unit: frames per second (fps).

25
Durationstring

Duration of the transcoded output file. Unit: seconds (s).

12
Formatstring

Container format of the transcoded output file.

m3u8
Filesizelong

Size of the transcoded output file. Unit: bytes (B).

851076
WatermarkIdListarray

List of watermarks used for transcoding.

WatermarkIdstring

List of watermarks used for transcoding.

["64079a0e3e286*****b48a8c9413"]
TranscodeTaskobject

Details about transcoding tasks.

CreationTimestring

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.

2019-01-23T12:35:12Z
Triggerstring

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.
Auto
TaskStatusstring

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.
Processing
VideoIdstring

The ID of the audio or video file.

883f5d98107*****b7f20aaa352f
CompleteTimestring

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.

2019-01-23T12:40:12Z
TranscodeTemplateGroupIdstring

The ID of the transcoding template group.

b500c7094bd241*****3e9900752d7c3
TranscodeTaskIdstring

The ID of the transcoding task.

b1b65ab107e14*****3dbb900f6c1fe0
TranscodeJobInfoListarray<object>

Details about transcoding jobs.

TranscodeJobInfoobject
Definitionstring

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.
LD
CreationTimestring

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.

2019-02-26T08:27:16Z
InputFileUrlstring

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

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

The error message returned when the transcoding job failed.

ErrorMessage
ErrorCodestring

The error code returned when the transcoding job failed.

200
CompleteTimestring

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.

2019-02-26T08:30:16Z
TranscodeProgresslong

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

100
Prioritystring

The priority of the transcoding job.

6
TranscodeJobStatusstring

The status of the transcoding job.

  • Transcoding
  • TranscodeSuccess
  • TranscodeFail
Transcoding
TranscodeTemplateIdstring

The ID of the transcoding template.

174b0534fea3*****b51c8f0ad1374
TranscodeJobIdstring

The ID of the transcoding job.

38f0e513c88*****85515f9d50be188
OutputFileobject

The information about the output file.

VideoStreamListstring

The video streams.

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

The OSS URL of the output file.

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

The encryption method of the output file. Valid values:

  • AliyunVoDEncryption: Alibaba Cloud proprietary cryptography
  • HLSEncryption: HTTP Live Streaming (HLS) encryption
{\"EncryptType\":\"AliyunVoDEncryption\"}
Heightstring

The height of the output video. Unit: pixels.

360
SubtitleStreamListstring

The subtitle streams.

[]
Bitratestring

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

964
AudioStreamListstring

The audio streams.

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

The width of the output video. Unit: pixels.

640
Fpsstring

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

25
Durationstring

The length of the output file. Unit: seconds.

12
Formatstring

The container format of the output file.

m3u8
Filesizelong

The size of the output file. Unit: byte.

851076
WatermarkIdListarray

The IDs of the watermarks used by the output file.

WatermarkIdstring

The IDs of the watermarks used by the output file.

["64079a0e3e286*****b48a8c9413"]

Examples

Sample success responses

JSONformat

{
  "RequestId": "F4C6D5BE-BF13-45*****6C-516EA8906DCD",
  "NonExistJobIds": [
    "[\"hhhhhhh\"]"
  ],
  "TranscodeJobInfoList": [
    {
      "Definition": "LD",
      "CreationTime": "2019-02-26T08:27:16Z",
      "InputFileUrl": "http://outin-40564*****e1403e7.oss-cn-shanghai.aliyuncs.com/customerTrans/5b95e568f8e*****47f38e/31f1184c-*****b2a2-f94-c213f.wmv",
      "ErrorMessage": "ErrorMessage",
      "ErrorCode": "200",
      "CompleteTime": "2019-02-26T08:30:16Z\n",
      "TranscodeProgress": 80,
      "Priority": "6",
      "TranscodeJobStatus": "Transcoding",
      "TranscodeTemplateId": "174b0534fea3*****b51c8f0ad1374",
      "TranscodeJobId": "38f0e513c88*****85515f9d50be188",
      "OutputFile": {
        "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\\\"}]",
        "OutputFileUrl": "http://outin-40564*****e1403e7.oss-cn-shanghai.aliyuncs.com/883f5d*****f20aaa352f/c3be4f073*****7d5193ec8-{DestMd5}-od-S00000001-200000.mp4",
        "Encryption": "{\\\"EncryptType\\\":\\\"AliyunVoDEncryption\\\"}",
        "Height": "360",
        "SubtitleStreamList": "[]",
        "Bitrate": "964",
        "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\\\"}]",
        "Width": "640",
        "Fps": "25",
        "Duration": "12",
        "Format": "m3u8",
        "Filesize": 851076,
        "WatermarkIdList": [
          "[\"64079a0e3e286*****b48a8c9413\"]"
        ]
      }
    }
  ],
  "TranscodeTask": {
    "CreationTime": "2019-01-23T12:35:12Z",
    "Trigger": "Auto ",
    "TaskStatus": "Processing",
    "VideoId": "883f5d98107*****b7f20aaa352f",
    "CompleteTime": "2019-01-23T12:40:12Z",
    "TranscodeTemplateGroupId": "b500c7094bd241*****3e9900752d7c3",
    "TranscodeTaskId": "b1b65ab107e14*****3dbb900f6c1fe0",
    "TranscodeJobInfoList": [
      {
        "Definition": "LD",
        "CreationTime": "2019-02-26T08:27:16Z",
        "InputFileUrl": "http://outin-40564*****e1403e7.oss-cn-shanghai.aliyuncs.com/customerTrans/5b95e568f8e*****47f38e/31f1184c-*****b2a2-f94-c213f.wmv",
        "ErrorMessage": "ErrorMessage",
        "ErrorCode": "200",
        "CompleteTime": "2019-02-26T08:30:16Z",
        "TranscodeProgress": 100,
        "Priority": "6",
        "TranscodeJobStatus": "Transcoding",
        "TranscodeTemplateId": "174b0534fea3*****b51c8f0ad1374",
        "TranscodeJobId": "38f0e513c88*****85515f9d50be188",
        "OutputFile": {
          "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\\\"}]",
          "OutputFileUrl": "http://outin-40564*****e1403e7.oss-cn-shanghai.aliyuncs.com/883f5d*****f20aaa352f/c3be4f073*****7d5193ec8-{DestMd5}-od-S00000001-200000.mp4",
          "Encryption": "{\\\"EncryptType\\\":\\\"AliyunVoDEncryption\\\"}",
          "Height": "360",
          "SubtitleStreamList": "[]",
          "Bitrate": "964",
          "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\\\"}]",
          "Width": "640",
          "Fps": "25",
          "Duration": "12",
          "Format": "m3u8",
          "Filesize": 851076,
          "WatermarkIdList": [
            "[\"64079a0e3e286*****b48a8c9413\"]"
          ]
        }
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-12-05The request parameters of the API has changed. The response structure of the API has changedView Change Details

Common errors

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

Error codeError messageHTTP status codeDescription
NoSuchResourceThe specified resource %s does not exist.404The error message returned because the specified information does not exist. %s indicates the specified information.