GetVideoInfo
Retrieves the details of a single audio or video file by its ID, including the title, description, duration, thumbnail URL, status, creation time, size, snapshots, category, and tags.
Operation description
After an audio or video file is uploaded, ApsaraVideo VOD analyzes the uploaded source file. Therefore, media asset information is generated asynchronously. You can configure event notifications for audio and video analysis completion. After receiving the event notification for audio and video analysis completion, call this operation to retrieve the audio or video information.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vod:GetVideoInfo |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| VideoId |
string |
No |
The audio or video ID. Only one audio or video ID is supported. You can obtain the ID by using one of the following methods:
|
9b73864d75f1d231e9001cd5f8**** |
| ReferenceId |
string |
No |
The custom ID. The ID must be 6 to 64 characters in length and can contain only lowercase letters, uppercase letters, digits, hyphens, and underscores. The ID must be unique per user. |
123-123 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The request ID. |
25818875-5F78-4AF6-D7393642CA58**** |
| Video |
object |
The audio or video information. |
|
| StorageLocation |
string |
The storage address of the audio or video file. |
out-201703232251****.oss-cn-shanghai.aliyuncs.com |
| CreationTime |
string |
The time when the audio or video file was created. The time follows the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2017-11-14T09:15:50Z |
| Status |
string |
The status of the audio or video file. For more information about the operations that can be performed and the limits in each status, see Status: Audio and video status. Valid values:
|
Normal |
| CateId |
integer |
The category ID. |
781111**** |
| VideoId |
string |
The audio or video ID. |
9b73864d75f1d231e9001cd5f8**** |
| DownloadSwitch |
string |
The status of the offline download switch. After the offline download feature is enabled, mobile users can use ApsaraVideo Player to cache videos to their local devices for playback. For more information, see Offline download. Valid values:
|
on |
| Tags |
string |
The tags of the audio or video file. Multiple tags are separated by commas (,). |
tag1, tag2 |
| ModificationTime |
string |
The last time when the audio or video file was updated. The time follows the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2017-11-14T10:15:50Z |
| RegionId |
string |
The region where the audio or video file is stored. |
cn-shanghai |
| CustomMediaInfo |
string |
The custom media asset information. Note
[Deprecated] This parameter is deprecated and is no longer returned when you call this operation. |
{"aaa":"test"} |
| CateName |
string |
The category name. |
cate1 |
| Description |
string |
The description of the audio or video file. |
Alibaba Cloud VOD video description |
| AppId |
string |
The application ID. |
app-**** |
| Size |
integer |
The size of the audio or video source file. Unit: bytes. |
10897890 |
| CoverURL |
string |
The thumbnail URL of the audio or video file. |
https://example.aliyundoc.com/****.jpg |
| TemplateGroupId |
string |
The ID of the transcoding template group. |
9ae2af636ca64835b0c10412f448**** |
| Duration |
number |
The duration of the audio or video file. Unit: seconds. |
135.6 |
| Title |
string |
The title of the audio or video file. |
Alibaba Cloud VOD Video Title |
| AuditStatus |
string |
The final moderation result of the audio or video file. Valid values:
|
Normal |
| Snapshots |
object |
||
| Snapshot |
array |
The array of video snapshot URLs. |
|
|
string |
The array of video snapshot URLs. Note
This operation returns only the thumbnail data of the video. To query the data of normal snapshots, sprite snapshots, original sprite images, and WebVTT snapshots captured by using the video snapshot feature, call the ListSnapshots operation. |
["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 |
string |
The storage class of the media asset. Valid values:
|
Standard |
| RestoreStatus |
string |
The restoration status of the media asset. Valid values:
|
Success |
| RestoreExpiration |
string |
The expiration time of the media asset restoration. |
2023-03-30T10:14:14Z |
| UserData |
string |
The custom settings. The value is a JSON string that supports settings such as message callbacks and upload acceleration. For more information, see UserData. |
{"MessageCallback":{"CallbackURL":"http://example.aliyundoc.com"},"Extend":{"localId":"*****","test":"www"}} |
| ReferenceId |
string |
The custom ID. The ID must be 6 to 64 characters in length and can contain only lowercase letters, uppercase letters, digits, hyphens, and underscores. The ID must be unique per user. |
123-123 |
Examples
Success response
JSON format
{
"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": "tag1, tag2",
"ModificationTime": "2017-11-14T10:15:50Z",
"RegionId": "cn-shanghai",
"CustomMediaInfo": "{\"aaa\":\"test\"}",
"CateName": "cate1",
"Description": "Alibaba Cloud VOD video description",
"AppId": "app-****",
"Size": 10897890,
"CoverURL": "https://example.aliyundoc.com/****.jpg",
"TemplateGroupId": "9ae2af636ca64835b0c10412f448****",
"Duration": 135.6,
"Title": "Alibaba Cloud VOD Video Title",
"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",
"UserData": "{\"MessageCallback\":{\"CallbackURL\":\"http://example.aliyundoc.com\"},\"Extend\":{\"localId\":\"*****\",\"test\":\"www\"}}",
"ReferenceId": "123-123"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.