All Products
Search
Document Center

ApsaraVideo VOD:GetTranscodeSummary

Last Updated:Dec 14, 2022

Queries transcoding summaries of media files based on the file ID. A transcoding summary includes the status and progress of media transcoding.

Operation Description

  • A media file may be transcoded multiple times. This operation returns only the latest transcoding summary.
  • You can query transcoding summaries for a maximum of 10 media files in one request.
  • You can call the ListTranscodeTask operation to query historical transcoding tasks.
  • You can call this operation to query information only about transcoding tasks created within the past year.

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • 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:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All resources is used in the Resource type column of the operation.
  • Condition keyword: refers to the condition keyword defined by the cloud product itself.
  • 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.
Operateaccess levelResource typeconditional keywordAssociation operation
vod:GetTranscodeSummaryRead
  • VOD
    acs:vod:*:{#accountId}:*
    without
without

Request parameters

ParameterTypeRequiredDescriptionExample
VideoIdsstringYes

The ID of the audio or video file. You can specify up to 10 IDs. Separate the IDs with commas (,). You can use one of the following methods to obtain the ID:

  • Log on to the ApsaraVideo VOD console. In the left-side navigation pane, choose Media Files > Audio/Video. On the Video and Audio page, view the ID of the audio or video file. This method is applicable to files that are uploaded by using the ApsaraVideo VOD console.
  • Obtain the value of VideoId from the response to the CreateUploadVideo operation that you call to obtain the upload URL and credential.
  • Obtain the value of VideoId by calling the SearchMedia operation. This method is applicable to files that have been uploaded.
"d4860fcc6ae9fed52e8938244****,e1db68cc586644b83e562bcd94****,hhhhhhh"

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

25818875-5F78-4A*****F6-D7393642CA58
NonExistVideoIdsarray

The IDs of the audio or video files that do not exist.

string

The IDs of the audio or video files that do not exist.

["hhhhhhh"]
TranscodeSummaryListarray

The transcoding summary of the file.

object
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
VideoIdstring

The ID of the audio or video file.

e1db68cc586644b83e562bcd94****
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
TranscodeStatusstring

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
TranscodeTemplateGroupIdstring

The ID of the transcoding template group.

44f9e406bbb*****736a9abe876ecc0
TranscodeJobInfoSummaryListarray

The summaries of transcoding jobs.

object
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-27T03:34:46Z
ErrorMessagestring

The error message returned when the transcoding job failed.

ErrorMessage
Heightstring

The height of the output video. Unit: pixels.

960
TranscodeProgresslong

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

100
TranscodeTemplateIdstring

The ID of the transcoding template.

57496724ae2*****0968d6e08acc8f6
Bitratestring

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

749
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-27T03:40:51Z
Widthstring

The width of the output video. Unit: pixels.

544
Durationstring

The duration of the output video. Unit: seconds.

12
Fpsstring

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

30
TranscodeJobStatusstring

The status of the transcoding job. Valid values:

  • Transcoding
  • TranscodeSuccess
  • TranscodeFail
Transcoding
Filesizelong

The size of the output video. Unit: bytes.

1144259
Formatstring

The container format of the output video.

mp4
WatermarkIdListarray

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

string

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

["af2afe4761992c*****d947dae97337"]

Example

Normal return example

JSONFormat

{
  "RequestId": "25818875-5F78-4A*****F6-D7393642CA58",
  "NonExistVideoIds": [
    "[\"hhhhhhh\"]"
  ],
  "TranscodeSummaryList": [
    {
      "CreationTime": "2019-01-23T12:35:12Z",
      "VideoId": "e1db68cc586644b83e562bcd94****",
      "CompleteTime": "2019-01-23T12:40:12Z",
      "TranscodeStatus": "Processing",
      "TranscodeTemplateGroupId": "44f9e406bbb*****736a9abe876ecc0",
      "TranscodeJobInfoSummaryList": [
        {
          "CreationTime": "2019-02-27T03:34:46Z",
          "ErrorMessage": "ErrorMessage",
          "Height": "960",
          "TranscodeProgress": 100,
          "TranscodeTemplateId": "57496724ae2*****0968d6e08acc8f6",
          "Bitrate": "749",
          "ErrorCode": "200",
          "CompleteTime": "2019-02-27T03:40:51Z",
          "Width": "544",
          "Duration": "12",
          "Fps": "30",
          "TranscodeJobStatus": "Transcoding",
          "Filesize": 1144259,
          "Format": "mp4",
          "WatermarkIdList": [
            "[\"af2afe4761992c*****d947dae97337\"]"
          ]
        }
      ]
    }
  ]
}

Error codes

For a list of error codes, visit the API error center.