All Products
Search
Document Center

SubmitTranscodeJobs

Last Updated: Mar 04, 2019

Description

You can call this operation to submit a media transcoding job and start asynchronous transcoding.

Notes:

  • You can only transcode videos in the UploadSucc, Normal, or Checking status.
  • To obtain the transcoding result, you can specify the callback configuration to receive StreamTranscodeComplete and TranscodeComplete event notifications.

Request parameters

NameTypeRequiredDescription
ActionStringYesThe operation that you want to perform. Set the value to SubmitTranscodeJobs.
VideoIdStringYesThe video ID.
TemplateGroupIdStringYesThe transcoding template group ID. To view the template group ID, log on to the ApsaraVideo for VOD console and choose Global Settings > Transcode in the left-side navigation pane.
EncryptConfigEncryptConfigNoThe encryption configuration. The value is a JSON-formatted string. This parameter is required only when standard HLS encryption is used.
OverrideParamsOverrideParamsNoThe parameter used to replace the watermark data associated with a transcoding template. The value is a JSON-formatted string. This parameter is required for watermark replacement. Currently, you can replace only the file URL of an image watermark or the content of a text watermark.

Parameter description:

  • You must set the CipherText parameter in the EncryptConfig structure to an AES-128 ciphertext key (a 128-bit symmetric key) generated through the GenerateDataKey operation. Otherwise, the transcoding job based on standard encryption failed. For more information about how to use standard encryption, see Standard encryption.
  • No matter whether standard encryption or private encryption is required, you must enable HLS encryption for the template data specified by the TemplateGroupId parameter. Otherwise, HLS encryption cannot be used.

Response parameters

NameTypeDescription
RequestIdStringThe GUID generated by Alibaba Cloud for the request.
TranscodeJobsTranscodeJob[]The media job information.

Examples

Sample requests

  1. https://vod.cn-shanghai.aliyuncs.com?Action=SubmitTranscodeJobs&VideoId=d3e680e618708fef7cefbf2cae7cc931&TemplateGroupId=56e680e618708fef7cefbf2cae7cc9yu&EncryptConfig=%7bDecryptKeyUri%3a%22http%3a%2f%2fdecrypt.demo.com%2fdecrypt%3fCipherText%3ddddddddddddd%22%2cCiphertext%3a%22ddddddddd%22%2cKeyServiceType%3a%22KMS%22%7d

Note: For more information about common request parameters, see Common parameters.

Sample responses

JSON format

  1. {
  2. "RequestId": "25818875-5F78-4A13-BEF6-D7393642CA58",
  3. "TranscodeJobs": [{
  4. "JobId": "ad90a501b1b94ba6afb72374ad005046"
  5. }
  6. ...
  7. ]
  8. }

Error codes

Error codeError messageHTTP status codeDescription
InvalidVideo.NotFoundThe video does not exist.404The error message returned when the specified video does not exist.
NoSuchResourceThe specified resource %s does not exist.404The error message returned when the user-related resource data does not exist, where %s indicates the specific resource information.
Forbidden.IllegalStatusStatus of the video is illegal.400The error message returned when the video status is invalid. You can only transcode videos in the UploadSucc, Normal, or Checking status.