Query Videos
Service Address
http://api-az-cn.danghongyun.com/rest
Request Method
GET
Request Parameters
Parameter | Description | Type | Required |
---|---|---|---|
accessKey | The user access key | String | Required |
action | API name, this api is "queryVideo" | String | Required |
version | API version, currently must be 2.0 | String | Required |
timestamp | Invoke time in milliseconds since january 1 1970, eg: 1466488681033 | String | Required |
signature | Signature generated by signature rule. | String | Required |
start | start | String | Required |
number | number | String | Required |
sort | Sort the results by this field, Can only be title, size, category, uploadTime, status, tag | String | Required |
order | Asc order, desc reverse order | String | Required |
searchType | Search for videos, with search types of title, tag, and all, which are search by title, search by tag, and search together by title and tag. When searching, the parameter keyword must be entered simultaneously. When it is empty, in order to obtain the video list, it is not necessary to enter the parameter keyword | String | Optional |
keyword | keyword | String | Optional |
categoryId | categoryId, While searching according to the above requirements, check the results that belong to that category. If left blank, all categories will be included | Integer | Optional |
videoType | 0:normal video, 1:VR, If this value is not passed, it defaults to 0 | Integer | Optional |
status | Video status. If this value is not passed, all status videos are returned. Status values: 0,1,2,3,4,5,6,7 Please refer to the following instructions for details | Integer | Optional |
Description of Status Value:
0:TRANSCODE_STATUS_UPLOAD_FINISHED
1:TRANSCODE_STATUS_START
2:TRANSCODE_STATUS_COMPLETED
3:TRANSCODE_STATUS_FAILED
4:TRANSCODE_STATUS_UPLOAD_FAILED
5:TRANSCODE_STATUS_UNKNOWN_FILE_TYPE
6:TRANSCODE_STATUS_SECOND_TRANSCODE_START
7:TRANSCODE_STATUS_WAITTING
Response Example
{
"code":0,
"message":"success",
"result":
[
{
"id":"b01811bcb49a4bef9847f3555752a3c6",
"parentId":null,
"playrate":"1.0",
"fileName":"290c4314065646f384ac52d21a718c9e.mp4",
"thumbnail":"http://k35rdw4u.images.danghongyun.com/cover/2017/11/27/b01811bcb49a4bef9847f3555752a3c6/193_b01811bcb49a4bef9847f3555752a3c6_0.jpg",
"cover":"http://k35rdw4u.images.danghongyun.com/cover/2017/11/27/b01811bcb49a4bef9847f3555752a3c6/193_b01811bcb49a4bef9847f3555752a3c6_0.jpg",
"title":"1.mp4",
"width":720,
"height":576,
"bitrate":333209,
"audioBitrate":0,
"duration":286000,
"playNum":0,
"size":11361,
"userId":193,
"categoryId":0,
"category":null,
"status":2,
"date":"2017/11/27",
"uploadTime":1511779239632,
"tag":null,
"description":null,
"contentId":null,
"customId":null,
"sourceContentId":null,
"sourceCustomId":null,
"transcodedVideoList":
[
{
"name":"high-definition",
"hlsUrl":"http://k35rdw4u.vod2.danghongyun.com/target/hls/2017/11/27/193_b01811bcb49a4bef9847f3555752a3c6_10_720x576.m3u8",
"hlsSize":23635592,
"mp4Url":"http://k35rdw4u.vod2.danghongyun.com/target/mp4/2017/11/27/193_b01811bcb49a4bef9847f3555752a3c6_10_720x576.mp4",
"mp4Size":19244116,
"flvUrl":"http://k35rdw4u.vod2.danghongyun.com/target/flv/2017/11/27/193_b01811bcb49a4bef9847f3555752a3c6_10_720x576.flv",
"flvSize":19442983,
"tsUrl":"http://k35rdw4u.vod2.danghongyun.com/target/ts/2017/11/27/193_b01811bcb49a4bef9847f3555752a3c6_10_720x576.ts",
"tsSize":23762824,
"videoWidth":720,
"videoHeight":576,
"videoBitrate":500,
"audioBitrate":64000,
"defaultVideo":1,
"taskId":"113444",
"status":2,
"idx":1,
"type":0,
"hlsEncryptType":0,
"mp4EncryptType":0,
"flvEncryptType":0,
"tsEncryptType":0,
"contentId":null,
"customId":null,
"aesKey":null
}
],
"subPlayrateList":
[
{
"videoId":"577e0bcfc4774cc295668d1638e1752b",
"playrate":"0.8",
"subVideoType":0
},
{
"videoId":"dd9220fc79e34651a8140d77ecbe7e95",
"playrate":"30",
"subVideoType":0
}
],
"playCode":
{
"previewUrl":"http://www.danghongyun.com/video/preview/193/b01811bcb49a4bef9847f3555752a3c6",
"flashUrl":"http://www.danghongyun.com/video/preview/193/b01811bcb49a4bef9847f3555752a3c6.swf",
"htmlEmbedCode":"<div id=\"193_b01811bcb49a4bef9847f3555752a3c6\" style=\"text-align:center;\"></div>\r\n<script type=\"text/javascript\" src=\"http://static.danghongyun.com/libs/embed/H_E_v0.2.js\"></script>\r\n<script type=\"text/javascript\">\r\n HONGSHIYUN.embed(\"193_b01811bcb49a4bef9847f3555752a3c6\",{\r\n width:\"100%\",\r\n height:\"100%\",\r\n autoPlay:false\r\n });\r\n</script>"
},
"type":0,
"uri":null,
"fastEditor":0,
"videoType":0,
"audio":null,
"audioStatus":null,
"audioTaskId":null,
"subtitle":null,
"subVideoType":null,
"shareStatus":0,
"shareToUserId":null,
"shareCategoryId":0,
"logoGroupId":null
},
{
"id":"4b4deb6b24b54ec0b816d607a4317712",
"parentId":null,
"playrate":"1.0",
"fileName":"254b95af058441218eddeae1ff7f10df.mp4",
"thumbnail":"http://k35rdw4u.images.danghongyun.com/thumb/2017/11/27/4b4deb6b24b54ec0b816d607a4317712/193_4b4deb6b24b54ec0b816d607a4317712_0.jpg",
"cover":"http://k35rdw4u.images.danghongyun.com/cover/2017/11/27/4b4deb6b24b54ec0b816d607a4317712/193_4b4deb6b24b54ec0b816d607a4317712_0.jpg",
"title":"7.mp4",
"width":1280,
"height":720,
"bitrate":1312051,
"audioBitrate":0,
"duration":35360,
"playNum":0,
"size":5530,
"userId":193,
"categoryId":0,
"category":null,
"status":2,
"date":"2017/11/27",
"uploadTime":1511778702647,
"tag":null,
"description":null,
"contentId":null,
"customId":null,
"sourceContentId":null,
"sourceCustomId":null,
"transcodedVideoList":
[
{
"name":"high-quality",
"hlsUrl":null,
"hlsSize":0,
"mp4Url":"http://k35rdw4u.vod2.danghongyun.com/target/mp4/2017/11/27/193_4b4deb6b24b54ec0b816d607a4317712_10_1280x360.mp4",
"mp4Size":2318404,
"flvUrl":null,
"flvSize":0,
"tsUrl":null,
"tsSize":0,
"videoWidth":1280,
"videoHeight":360,
"videoBitrate":500,
"audioBitrate":64000,
"defaultVideo":1,
"taskId":"113442",
"status":2,
"idx":1,
"type":0,
"hlsEncryptType":0,
"mp4EncryptType":0,
"flvEncryptType":0,
"tsEncryptType":0,
"contentId":null,
"customId":null,
"aesKey":null
}
],
"subPlayrateList":[],
"playCode":
{
"previewUrl":"http://www.danghongyun.com/video/preview/193/4b4deb6b24b54ec0b816d607a4317712?isVR=true",
"flashUrl":"http://www.danghongyun.com/video/preview/193/4b4deb6b24b54ec0b816d607a4317712.swf?isVR=true",
"htmlEmbedCode":"<div id=\"193_4b4deb6b24b54ec0b816d607a4317712\" style=\"text-align:center;\"></div>\r\n<script type=\"text/javascript\" src=\"http://static.danghongyun.com/libs/embed/H_E_v0.2.js\"></script>\r\n<script type=\"text/javascript\">\r\n HONGSHIYUN.embed(\"193_4b4deb6b24b54ec0b816d607a4317712\",{\r\n width:\"100%\",\r\n height:\"100%\",\r\n autoPlay:false\r\n });\r\n</script>"
},
"type":0,
"uri":null,
"fastEditor":0,
"videoType":1,
"audio":"audio/2017/11/27/193_4b4deb6b24b54ec0b816d607a4317712.mp3",
"audioStatus":3,
"audioTaskId":"113443",
"subtitle":null,
"subVideoType":null,
"shareStatus":0,
"shareToUserId":null,
"shareCategoryId":0,
"logoGroupId":null
}
],
"success":true
}
Response Fields
Video
Field | Description |
---|---|
audio | The audio address of the vr outlet |
audioStatus | The transcoding status of the audio transferred from vr |
audioTaskId | The id of the audio transcoding task that is generated by vr |
audioBitrate | The audio bitrate of the source file |
bitrate | The bitrate of the source file |
category | Category |
categoryId | Category id |
contentId | The content id,it is used for video encryption |
cover | The default cover image |
customId | The custom id, it is used for video decryption |
date | The date the video was uploaded |
description | Description |
duration | Video duration, milliseconds |
fastEditor | Whether or not to edit quickly |
fileName | The video source file name |
height | The height of the source video |
id | The video id |
logoGroupId | The id of the station mark group used for transcoding |
parentId | The parent video id |
playCode | The play code, seePlay Code |
playNum | The times of playback |
playrate | The playback rate, currently in multiples: 0.8,1.2,1.4,1.6; shrink time: 10,30,60180, in seconds |
shareCategoryId | The category of the video shared, this field is invalid |
shareStatus | The status of the share, this field is invalid |
shareToUserId | The id of the user to whom it was shared, this field is invalid |
size | The video source file size, KB |
sourceContentId | One of the keys used when encrypting the video source itself |
sourceCustomId | One of the keys used when encrypting the video source itself |
status | Video transcoding status, 1 transcoding in progress, 2 transcoding completed, 3 transcoding error, 4 upload failed, 5 unknown file type, 6 secondary transcoding in progress, 7 queuing in progress |
subtitle | Subtitle |
subPlayrateList | The list of subvideos, see Sub Video |
subVideoType | If the video is a subvideo it indicates the sub video type, 0 multiples transcoding, 1 time down transcoding |
tag | The video tags |
taskId | The id of the video transcoding task, |
thumbnail | The default thumbnail |
title | The title of video |
transcodedVideoList | The list of transcoded video addresses, see Output stream |
type | Source file type: 0 regular file, 1 hls file, 3 live recording, 4 fast encoding, 5 live recording with secondary transcoding, 6 fast encoding with secondary transcoding, 7 video overlay, 8 video overlay with secondary transcoding |
uploadTime | The upload time |
userId | The user id |
uri | The source file uri |
videoType | The video type, 0: normal, 1: VR |
width | The width of the source video file |
Play Code
Field | Description |
---|---|
flashUrl | Flash playback url |
htmlEmbedCode | The html embedded code |
previewUrl | The preview url |
Sub Video
Field | Description |
---|---|
videoId | The id of the subvideo |
playrate | Sub video playback rate, same meaning |
subVideoType | The type of subvideo, 0 multiples transcoding, 1 time down transcoding |
Output Stream
Field | Description |
---|---|
aesKey | The key used for AES encryption |
audioBitrate | The bitrate of the transcoded audio |
contentId | One of the keys used for danghong encryption |
customId | One of the keys used for danghong encryption |
defaultVideo | Whether it is the default playback, 1 yes, 0 no |
flvEncryptType | The type of flv encryption after transcoding, 0 no encrypted, 7 arcvideo encryption |
flvUrl | The flv address after transcoding |
flvSize | The size of the flv file after transcoding, Byte |
hlsEncryptType | Hls encryption type after transcoding, 0 not encrypted, 6 AES encryption, 7 danghong encryption, currently AES encryption only works for hls |
hlsUrl | The hls address after transcoding |
hlsSize | The size of the hls file after transcoding, Byte |
idx | Different output address indexes for the same file |
mp4EncryptType | The type of mp4 encryption after transcoding, 0 not encrypted, 7 danghong encryption |
mp4Url | The mp4 address after transcoding |
mp4Size | The mp4 file size after transcoding, Byte |
name | The stream name |
status | The transcoding task status |
taskId | The id of the transcoding task |
tsEncryptType | The type of ts encryption after transcoding, 0 not encrypted, 7 danghong encryption |
tsUrl | The ts address after transcoding |
tsSize | The ts file size after transcoding in byte |
type | The type of file after transcoding, 0 noraml, 1 preview the clip |
videoBitrate | The video bitrate |
videoHeight | The height of the video after transcoding |
videoWidth | The width of the transcoded video |
Error Codes
Code | Message |
---|---|
0 | success |
10000 | exception |
10013 | sort_type_is_incorrect |
10018 | search_type_is_incorrect |
10201 | api_not_exists |