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.

  • Limit of request rate per user: 300/5min
  • Applicable Products: Cloud VoD
For API authentication details, please refer to: API Authentication Overview

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
1500

Video name, more than 40 characters

200Video name, more than 40 characters
1558

Video cannot be spliced

200Video cannot be spliced
1575

videoIds cannot be empty

200videoIds cannot be empty
1576

videoIds cannot contain special characters

200videoIds cannot contain special characters
1577

The videoIds format is incorrect. Multiple videos should be separated by commas (,)

200The videoIds format is incorrect. Multiple videos should be separated by commas (,)
1578

The number of videos in videoIds cannot exceed 50

200The number of videos in videoIds cannot exceed 50
1579

videoIds have video input error, please input again

200videoIds have video input error, please input again
1580

Video in videoIds cannot be repeated. Please retry

200Video in videoIds cannot be repeated. Please retry
1581

Some videos in videoIds do not exist or have been deleted, or are not under your permissions

200Some videos in videoIds do not exist or have been deleted, or are not under your permissions
1602

TRANSNO is not legal

200TRANSNO is not legal
1628

Directory does not exist

200Directory 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!