All Products
Search
Document Center

ApsaraVideo VOD:GetVideoInfo

Last Updated:Mar 27, 2024

Obtains information about multiple audio or video files.

Operation description

  • You can call this operation to obtain basic information about multiple media files based on media IDs. The basic information includes the title, description, duration, thumbnail URL, status, creation time, size, snapshots, category, and tags.
  • After a media file is uploaded, ApsaraVideo VOD processes the source file. Then, information about the media file is asynchronously generated. You can configure notifications for the VideoAnalysisComplete event and call this operation to query information about a media file after you receive notifications for the VideoAnalysisComplete event. For more information, see Overview .

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:
    • 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 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:GetVideoInfoRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
VideoIdstringYes

The ID of the media file. You can use one of the following methods to obtain the ID of the file:

  • 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 called to obtain an upload URL and credential.
  • Obtain the value of VideoId from the response to the SearchMedia operation that you called to query the media ID after the media file is uploaded.
9b73864d75f1d231e9001cd5f8****

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

RequestIdstring

The ID of the request.

25818875-5F78-4AF6-D7393642CA58****
Videoobject

The information about the audio or video file.

StorageLocationstring

The storage address of the media file.

out-201703232251****.oss-cn-shanghai.aliyuncs.com
CreationTimestring

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

2017-11-14T09:15:50Z
Statusstring

The status of the video. For information about the operations that can be performed on videos in different statuses and limits, see the Status: the status of a video section of the Basic data types topic. Valid values:

  • Uploading: The video is being uploaded.
  • UploadFail: The video failed to be uploaded.
  • UploadSucc: The video has been uploaded.
  • Transcoding: The video is being transcoded.
  • TranscodeFail: The video failed to be transcoded.
  • Blocked: The video is blocked.
  • Normal: The video is normal.
Normal
CateIdlong

The category ID of the media file.

781111****
VideoIdstring

The ID of the media file.

9b73864d75f1d231e9001cd5f8****
Tagsstring

The tags of the media file. Multiple tags are separated by commas (,).

Tag 1,Tag 2
ModificationTimestring

The time when the media file was updated. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2017-11-14T10:15:50Z
RegionIdstring

The region where the media file is stored.

cn-shanghai
CustomMediaInfostring

The custom information about the media file.\n\n> This parameter has been deprecated. This parameter is no longer returned after you call the operation.

{"aaa":"test"}
CateNamestring

The name of the category.

Category name
Descriptionstring

The description of the media file.

Video description in ApsaraVideo VOD
AppIdstring

The ID of the application.

app-****
Sizelong

The size of the source file. Unit: bytes.

10897890
CoverURLstring

The thumbnail URL of the media file.

https://example.aliyundoc.com/****.jpg
TemplateGroupIdstring

The ID of the transcoding template group.

9ae2af636ca64835b0c10412f448****
Durationfloat

The duration of the media file. Unit: seconds.

135.6
Titlestring

The title of the media file.

Video title in ApsaraVideo VOD
AuditStatusstring

The review status of the video. Valid values:

  • Normal: pass
  • Blocked: failed
Normal
Snapshotsarray

The video snapshot URLs.

string

The video snapshot URLs.

Note This operation returns only data about the snapshots that are captured when you upload a video. The snapshot data includes data of the thumbnail and snapshot data that is generated based on the workflow setting. To query the snapshot data that is generated after the video is uploaded, call the ListSnapshots operation. For more information, see Video snapshots.
["http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****","http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27243****",...]
StorageClassstring

The storage class of the audio or video file. Valid values:

  • Standard: All media resources are stored as Standard objects.
  • IA: All media resources are stored as IA objects.
  • Archive: All media resources are stored as Archive objects.
  • ColdArchive: All media resources are stored as Cold Archive objects.
  • SourceIA: Only the source files are IA objects.
  • SourceArchive: Only the source files are Archive objects.
  • SourceColdArchive: Only the source files are Cold Archive objects.
  • Changing: The storage class of the audio or video file is being changed.
  • SourceChanging: The storage class of the source file is being changed.
Standard
RestoreStatusstring

The restoration status of the audio or video file. Valid values:

  • Processing
  • Success
  • Failed
Success
RestoreExpirationstring

The period of time in which the object remains in the restored state.

2023-03-30T10:14:14Z

Examples

Sample success responses

JSONformat

{
  "RequestId": "25818875-5F78-4AF6-D7393642CA58****",
  "Video": {
    "StorageLocation": "out-201703232251****.oss-cn-shanghai.aliyuncs.com",
    "CreationTime": "2017-11-14T09:15:50Z",
    "Status": "Normal",
    "CateId": 0,
    "VideoId": "9b73864d75f1d231e9001cd5f8****",
    "Tags": "Tag 1,Tag 2",
    "ModificationTime": "2017-11-14T10:15:50Z",
    "RegionId": "cn-shanghai",
    "CustomMediaInfo": "{\"aaa\":\"test\"}",
    "CateName": "Category name",
    "Description": "Video description in ApsaraVideo VOD",
    "AppId": "app-****",
    "Size": 10897890,
    "CoverURL": "https://example.aliyundoc.com/****.jpg",
    "TemplateGroupId": "9ae2af636ca64835b0c10412f448****",
    "Duration": 135.6,
    "Title": "Video title in ApsaraVideo VOD",
    "AuditStatus": "Normal",
    "Snapshots": {
      "Snapshot": [
        "[\"http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****\",\"http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27243****\",...]"
      ]
    },
    "StorageClass": "Standard",
    "RestoreStatus": "Success",
    "RestoreExpiration": "2023-03-30T10:14:14Z"
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-04-11The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.