Audio/Video Stitching

Last update:2020-07-06 14:00:19

Description

This interface provides the capability of stitching audio and video on the cloud storage platform.

This interface has the following limitations:

  • Audio with different encoding schemes, such as libmp3lame and libfaac, cannot be stitched;
  • Video with the same encoding scheme, different resolutions, the same bit rate, and the same frame rate can be stitched successfully, but the stitched video will not be supported by the player;
  • For video with the same encoding scheme, the same resolution, different bit rates and the same frame rate, the average bit rate will be used upon successful stitching;
  • Video with the same encoding scheme, the same resolution, the same bit rate, and different frame rates, can be stitched successfully, but will not be supported by the player;
  • For video with different encoding schemes, different resolutions, the same bit rate, and the same frame rate, an error message “Could not concat between 1280x720and and 1920x1080” will be given upon stitching;
  • For video with different encoding schemes, the same resolution, different bit rates, and the same frame rate, the lowest bit rate will apply upon successful stitching;

Request Description

POST /fops
Host: < MgrDomain>
Authorization: < AccessToken>

Header Description

Parameter Required Description
Host Yes [Management Domain Name] (#/help/details/31/3006#goto_Domain Name Descriptions), which can be obtained from the User Management Interface.
Authorization Yes [Management Credential] (#/help/details/31/3103)

Parameter Description

Request parameters are organized in the following format and submitted as request content:

bucket=<Urlsafe_Base64_Encoded_Bucket>&key=<Urlsafe_Base64_Encoded_Key>&fops=<Urlsafe_Base64_Encoded_Fops>&notifyURL=<Urlsafe_Base64_Encoded_PersistentNotifyUrl>&force=< Force>&separate=< Separate>

Parameter Required Description
bucket Yes Bucket name.
key Yes File name, which specifies the master file for stitching.
fops Yes List of processing parameters. For the meanings of the parameters, see the [Audio/Video Stitching Ops Parameter Format] (#/help/details/31/3703#goto_Audio/Video Stitching);
processing multiple requests simultaneously is supported. Parameter lists are separated with the semicolon, ;.
notifyURL No URL for receiving notifications on processing results. See the [Notification Data Content Description] (#/help/details/31/3701#goto_Notification Data Description).
force No Whether or not to force execution of data processing. Setting the following values is supported:
0: If the specified data processing result exists, then the return file already exists and no processing is performed. This can avoid a waste of resources due to repeated processing.
1: Forces the execution of data processing and overwrites the existing file.
0 by default.
separate No Whether or not to provide separate processing notifications. Setting the following values is supported:
0: Indicates that notifyURL is notified in one go upon the completion of the execution of all transcoding instructions.
1: Indicates that notifyURL is notified upon the completion of the execution of each transcoding instruction.
0 by default.

Response Description

If a request is successful, a JSON string of the following content will be returned:

{ “persistentId”: }

Field name Required Description
persistentId Yes Uploads preprocessing or process ID that triggers persistent processing.

If a request fails, a JSON character string of the following content will be returned:

{
“code”: “< code string>”,
“message”: “< ErrMsg string>”
}

Field name Required Description
code Yes HTTP request response code. Refer to the [HTTP Response Status Codes] (#/help/details/31/3705)
message Yes Prompt message when audio/video processing fails.

Example

curl -v -X POST -d “bucket=aW1hZ2Vz&key=bGVodS5tcDQ=&fops=YXZjb25jYXQvZmx2L21vZGUvMS9iR1ZvZFMweExtMXdOQT09fHNhdmVhcy9hVzFoWjJWek9uQnBibWRxYVdVdVpteDI=&force=1&separate=0” -H “Authorization:86622e227a50d49d858c2494a935bc2e4ac543a7:NmNlYmI5YzczMjlkN2MxYTYxNWYyMjE4MDMxZTVjMWQ3ZjlkZTVmOA==” --url “http://mgrDomain/fops”

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!