Video Transcoding

Last update:2023-02-28 11:58:45

Description

This interface allows you to perform transcoding for one or more videos on Cloud VoD.

  1. The response of this API only indicates whether the request was successful or not. The actual transcoding result needs to be obtained through API “Video Transcoding Callback”.
  2. No support for transcoding the videos that are being transcoded.
  3. If the source video file is set to be deleted after transcoding is completed, you will not be able to transcode the video again.
  4. When you transcode a video that has already been transcoded, the transcoded videos will be replaced with the newly transcoded videos.
  5. If a video is stuck in the transcoding state, please contact the technical staff of the cloud video for processing.

Request Description

Request method POST/GET
API URL https://api.cloudv.haplat.net/vod/videoManage/transCode
Require Aunthentication Yes

Request Parameters

Parameter Type Required Description
videoIds string Yes Video ID, multiple IDs are separated by “,”.
waterMarkTemplateName string no Watermark template name, no watermark is added by default, you can choose the template in the Cloud VoD platform to add watermark to the video.
transCodeTemplateName string no Transcoding template name, the default transcoding template is used if not specified.
watermarkTemplateId string no Watermark Template ID, by default no watermark is added, you can select the template to add watermark to the video.
transCodeTemplateId string no Transcoding combination template ID, the default transcoding template is used if not specified.

Return parameter

For common responses, visit the Common Responses.

Example

Input example

curl -X POST 
  http://api.cloudv.haplat.net/vod/videoManage/transCode 
  -H 'content-type: application/x-www-form-urlencoded; charset=utf-8' 
  -H "Authorization: your token" 
  -H "X-WS-Timestamp: current timestamp" 
  -H "X-WS-AccessKey: your AccessKey ID"
  -d 'videoIds=9bac2161015d10003fdae81b00000000%2C9ba11ae7015d1000503692a400000000&waterMarkTemplateName=%E5%85%83%E6%97%A6%E6%B0%B4%E5%8D%B0&transCodeTemplateName=%E6%B5%8B%E8%AF%95%E8%BD%AC%E7%A0%810&subtitleId=2e5359cf016a10001e638de000000000'

Error code

The following error codes are specific to Video Transcoding request. For common errors, see Common Responses.

Error code Description
1540 videoIds cannot be empty
1541 videoIds contains special characters
1542 videoIds cannot only contain “,”
1543 The watermark template name is too long
1544 Transcoding template name is too long
1545 VideoIds do not exist! Or you don’t have permission to access to the videos!
1546 Watermark template does not exist
1547 Transcoding template does not exist
1549 VideoIds contain inactive video IDs
1551 No default transcoding template
1636 Some of videoIds’ soure video file is missing
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!