All Products
Search
Document Center

GetVideoInfo

Last Updated: Mar 04, 2019

Description

You can call this operation to obtain the basic information about a video based on the video ID. The basic information includes the title, description, duration, thumbnail URL, status, creation time, size, snapshots, category, and tags of the video.

Request parameters

NameTypeRequiredDescription
ActionStringYesThe operation that you want to perform. Set the value to GetVideoInfo.
VideoIdStringYesThe video ID.

Response parameters

NameTypeDescription
RequestId StringThe GUID generated by Alibaba Cloud for the request.
Video VideoThe video information.

Examples

Sample requests

  1. http://vod.cn-shanghai.aliyuncs.com/?Action=GetVideoInfo&VideoId=93ab850b4f6f44eab54b6e91d24d81d4&Format=JSON&<Common request parameters>

Note: For more information about common request parameters, see Common parameters.

Sample responses

JSON format

  1. {
  2. "RequestId": "25818875-5F78-4A13-BEF6-D7393642CA58",
  3. "Video": {
  4. "VideoId": "93ab850b4f6f44eab54b6e91d24d81d4",
  5. "Title": "ApsaraVideo for VOD video title",
  6. "Description": "ApsaraVideo for VOD video description",
  7. "Duration": 135.6,
  8. "CoverURL": "https://image.example.com/coversample.jpg",
  9. "Status": "Normal",
  10. "CreationTime": "2017-06-26T05:38:48Z",
  11. "Size": 10897890,
  12. "Snapshots": {
  13. "Snapshot":[
  14. "http://image.example.com/snapshot/sample000001.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e273334f52",
  15. "http://image.example.com/snapshot/sample00002.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e272434f52",
  16. ...
  17. ]
  18. },
  19. "CateId": 78,
  20. "CateName": "Category name",
  21. "Tags": "Tag 1,Tag 2"
  22. }
  23. }

Error codes

The following table lists the error code that this operation can return. For more information, see Error codes.

Error codeError messageHTTP status codeDescription
InvalidVideo.NotFoundThe video does not exist.404The error message returned when the specified video does not exist.