All Products
Search
Document Center

ApsaraVideo VOD:GetVideoInfo

Last Updated:Jul 19, 2024

Queries information such as the title, description, duration, thumbnail URL, status, creation time, size, snapshots, category, and tags about a single audio or video files based on the ID.

Operation description

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

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
VideoIdstringYes

The ID of the audio or video file. You can specify only one ID in each call. 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 called to obtain the 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 response parameters.

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 media file. For more information about the operations that you can perform on files in different statuses and usage limits, see Status: the status of a video. Valid values:

  • Uploading
  • UploadFail
  • UploadSucc
  • Transcoding
  • TranscodeFail
  • Blocked
  • Normal
Normal
CateIdlong

The category ID of the media file.

781111****
VideoIdstring

The ID of the media file.

9b73864d75f1d231e9001cd5f8****
DownloadSwitchstring

Indicates whether the offline download feature is enabled. If you enable the offline download feature, users can download and play videos by using the ApsaraVideo Player on a local PC. For more information, see Configure download settings. Valid values:

  • on: the offline download feature is enabled.
  • off: the offline download feature is not enabled.
on
Tagsstring

The tags of the audio or video file. Multiple tags are separated by commas (,).

Tag 1,Tag 2
ModificationTimestring

The time when the audio or video file was last 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 final review result of the audio or video file. Valid values:

  • Normal: pass
  • Blocked: blocked
Normal
Snapshotsarray

The video snapshot URLs.

string

The video snapshot URL.

Note Only information about the thumbnail snapshot is returned. To obtain information about normal, sprite, source sprite, WebVTT snapshots, 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****",
    "DownloadSwitch": "on",
    "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
2024-05-23The response structure of the API has changedView Change Details
2023-04-11The response structure of the API has changedView Change Details