Skip to main content

Get Video URLs

Service Address

http://api-az-cn.danghongyun.com/rest

Request Method

GET

Request Parameters

ParameterDescriptionTypeRequired
accessKeyThe user access keyStringRequired
actionAPI name, this api is "getTranscodedVideos"StringRequired
versionAPI version, currently must be 2.0StringRequired
timestampInvoke time in milliseconds since january 1 1970, eg: 1466488681033StringRequired
signatureSignature generated by signature rule.StringRequired
idsvideo id, multiple IDs separated by ',', eg:"c82c3de31e594ab2ae58db37a92c1395,ff09ba247b9c432f8fe7527d7aaeb5a3"StringRequired

Response Example

{
"code":0,
"message":"success",
"result":
[
{
"id":"b1906df45563431d88d5953f0a39e385",
"videoType":0,
"cdns":
[
{
"desc":"fast web",
"defaultCdn":1,
"hls":
{
"dynamic":null,
"list":
[
{
"url":"http://k35rdw4u.vodf1.danghongyun.com/target/hls/2017/11/27/193_b1906df45563431d88d5953f0a39e385_10_720x576.m3u8",
"desc":"high-definition",
"width":720,
"height":576,
"size":null,
"encryptType":0,
"contentId":null,
"customId":null,
"aesKey":null,
"defaultVideo":1
},
{
"url":"http://k35rdw4u.vodf1.danghongyun.com/target/hls/2017/11/27/193_b1906df45563431d88d5953f0a39e385_20_320x240.m3u8",
"desc":"standard-definition",
"width":320,
"height":240,
"size":null,
"encryptType":0,
"contentId":null,
"customId":null,
"aesKey":null,
"defaultVideo":0
}
]
},
"mp4":{
"dynamic":null,
"list":
[
{
"url":"http://k35rdw4u.vodf1.danghongyun.com/target/mp4/2017/11/27/193_b1906df45563431d88d5953f0a39e385_10_720x576.mp4",
"desc":"high-definition",
"width":720,
"height":576,
"size":null,
"encryptType":0,
"contentId":null,
"customId":null,
"aesKey":null,
"defaultVideo":1
}, {
"url":"http://k35rdw4u.vodf1.danghongyun.com/target/mp4/2017/11/27/193_b1906df45563431d88d5953f0a39e385_20_320x240.mp4",
"desc":"standard-definition",
"width":320,
"height":240,
"size":null,
"encryptType":0,
"contentId":null,
"customId":null,
"aesKey":null,
"defaultVideo":0
}
]
},
"flv":
{
"dynamic":null,
"list":
[
{
"url":"http://k35rdw4u.vodf1.danghongyun.com/target/flv/2017/11/27/193_b1906df45563431d88d5953f0a39e385_10_720x576.flv",
"desc":"high-definition",
"width":720,
"height":576,
"size":null,
"encryptType":0,
"contentId":null,
"customId":null,
"aesKey":null,
"defaultVideo":1
}
]
},
"ts":
{
"dynamic":null,
"list":
[
{
"url":"http://k35rdw4u.vodf1.danghongyun.com/target/ts/2017/11/27/193_b1906df45563431d88d5953f0a39e385_10_720x576.ts",
"desc":"high-definition",
"width":720,
"height":576,
"size":null,
"encryptType":0,
"contentId":null,
"customId":null,
"aesKey":null,
"defaultVideo":1
}
]
},
"audio":null,
"rtmp":null,
"thumbnail":null,
"thumbnailInterval":null
}
],
"comments":null
},
{
"id":"4b4deb6b24b54ec0b816d607a4317712",
"videoType":1,
"cdns":
[
{
"desc":"fast web",
"defaultCdn":1,
"hls":null,
"mp4":
{
"dynamic":null,
"list":
[
{
"url":"http://k35rdw4u.vodf1.danghongyun.com/target/mp4/2017/11/27/193_4b4deb6b24b54ec0b816d607a4317712_10_1280x360.mp4",
"desc":"high-quality",
"width":1280,
"height":360,
"size":null,
"encryptType":0,
"contentId":null,
"customId":null,
"aesKey":null,
"defaultVideo":1
}
]
},
"flv":null,
"ts":null,
"audio":"http://k35rdw4u.vodf1.danghongyun.com/audio/2017/11/27/193_4b4deb6b24b54ec0b816d607a4317712.mp3",
"rtmp":null,
"thumbnail":null,
"thumbnailInterval":null
}
],
"comments":null
}
],
"success":true
}

If there is no information for a video corresponding to a certain ID, then the corresponding return value for that item is null, eg:

{
"id":"ff09ba247b9c432f8fe7527d7aaeb5a3",
"videoType":null,
"cdns":null,
"comments":null
}

Response Fields

Playback urls

FieldDescription
idThe video id
cdnsThe address lists for different CDNs, see CDN Playback Info
videoTypeThe video type, 0: normal, 1: VR
commentsThe video comments, see Comment currently invalid

CDN Playback Info

FieldDescription
descThe cdn name
defaultCdnIs default cdn or not, 0: no, 1: yes
hlsThe hls streams, see Playback streams
mp4The mp4 streams, see Playback streams
flvThe flv streams, see Playback streams
tsThe ts streams, see Playback streams
audioReserved
rtmpReserved
thumbnailReserved
thumbnailIntervalReserved

Playback streams

FieldDescription
dynamicReserved
listThe playback streams, see Playback steram

Playback stream

FieldDescription
urlThe playback url
descThe stream description
widthThe video width
heightThe video height
sizeThe file size in bytes
encryptTypeThe type of encryption, 0: no encryption, 6: AES encryption, 7: arcvideo encryption, currently AES encryption only works for hls
contentIdOne of the keys used for arcvideo encryption
customIdOne of the keys used for arcvideo encryption
aesKeyThe key used for AES encryption
defaultVideoIs default playback stream or not, 0: no, 1: yes

Comment

FieldDescription
idThe comment id
timeThe comment time
commentThe comment content

Error Codes

CodeMessage
0success
10000exception
10030no_cdn
10201api_not_exists