Call videoConcat to splice multiple videos according to the specified sequence to generate a new video file.
Name | Description |
---|---|
*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 |
Name | Description |
---|---|
codeInteger | 200 success |
messageString | Successful operation |
dataString | Return data |
Error code(code) | Description(message) | HTTP status | Semantic |
---|---|---|---|
1500 | Video name, more than 40 characters | 200 | Video name, more than 40 characters |
1558 | Video cannot be spliced | 200 | Video cannot be spliced |
1575 | videoIds cannot be empty | 200 | videoIds cannot be empty |
1576 | videoIds cannot contain special characters | 200 | videoIds cannot contain special characters |
1577 | The videoIds format is incorrect. Multiple videos should be separated by commas (,) | 200 | The videoIds format is incorrect. Multiple videos should be separated by commas (,) |
1578 | The number of videos in videoIds cannot exceed 50 | 200 | The number of videos in videoIds cannot exceed 50 |
1579 | videoIds have video input error, please input again | 200 | videoIds have video input error, please input again |
1580 | Video in videoIds cannot be repeated. Please retry | 200 | Video 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 | 200 | Some videos in videoIds do not exist or have been deleted, or are not under your permissions |
1602 | TRANSNO is not legal | 200 | TRANSNO is not legal |
1628 | Directory does not exist | 200 | Directory does not exist |
#!/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" }'
{ "code": 200, "data": "", "message": "Operation succeeded" }