VideoConcat

Update time: 2024-07-29 17:12:14

Call videoConcat to splice multiple videos according to the specified sequence to generate a new video file.

  • Single user trigger frequency: 300/5min
  • Applicable Products: Cloud VoD

Request

Body Params

NameDescription
*transNoString
The length of the customer video clipping task must be less than or equal to 32 bits. The customer must ensure that it is globally unique on the customer platform
*videoIdsString
Separate the videos to be spliced using commas (,) in the splicing order
*filenameString
Output video file name
dirIdString
ID of the directory to be stored
notifyUrlString
The completion address used to receive callback information
suffixString
Output format Value range: flv mp4 m3u8 Default flv

Response

Body Params

NameDescription
codeInteger
200 success
messageString
Successful operation
dataString
Return data

Error code

Error code(code)Description(message)HTTP statusSemantic
1500Video name, more than 40 characters200Video name, more than 40 characters
1558Video cannot be spliced200Video cannot be spliced
1575videoIds cannot be empty200videoIds cannot be empty
1576videoIds cannot contain special characters200videoIds cannot contain special characters
1577The videoIds format is incorrect. Multiple videos should be separated by commas (,)200The videoIds format is incorrect. Multiple videos should be separated by commas (,)
1578The number of videos in videoIds cannot exceed 50200The number of videos in videoIds cannot exceed 50
1579videoIds have video input error, please input again200videoIds have video input error, please input again
1580Video in videoIds cannot be repeated. Please retry200Video in videoIds cannot be repeated. Please retry
1581Some videos in videoIds do not exist or have been deleted, or are not under your permissions200Some videos in videoIds do not exist or have been deleted, or are not under your permissions
1602TRANSNO is not legal200TRANSNO is not legal
1628Directory does not exist200Directory does not exist

Example

JSON
JSON
Request example
Copy Copy success
#!/bin/bash
username='example_username'
apiKey='example_apiKey'
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://api.cdnetworks.com/vod/videoManage/videoConcat" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "x-cnc-auth-method: BASIC" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
	"transNo":"XXXXXXXXXXXXXXXXXXX",
	"videoIds":"XXXXXXXXXXXXXXXXXXX,YYYYYYYYYYYYYYYYYYY",
	"filename":"name1",
	"dirId":"123",
	"notifyUrl":"http://xxx.com/notify",
	"suffix":"mp4"
}'
Response example
Copy Copy success
{
  "code": 200,
  "data": "",
  "message": "Operation succeeded"
}
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!