Submits a media transcoding job to start asynchronous transcoding.
Operation description
Usage notes
Before you use this operation, make sure that you fully understand the billing methods and pricing of ApsaraVideo VOD. Transcoding is a paid feature. For more information about billing, see Transcoding billing.
This is an asynchronous operation. After you submit a task, the task ID is returned. The task is not yet complete at this point and enters a queue for asynchronous execution. The final result is sent through a callback notification. You can also call GetTranscodeTask to query the task status.
Only videos in the UploadSucc, Normal, or Checking state can be transcoded.
To obtain transcoding results, configure callback messages: SingleCompleteEvent and AllCompleteEvent.
This operation supports dynamic replacement of subtitle URLs in HLS adaptive bitrate streaming packaging tasks. If the packaging task does not involve subtitle packaging, do not use this operation to initiate the task. Instead, specify the corresponding transcoding template group ID during video upload to automatically trigger the packaging process.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vod:SubmitTranscodeJobs |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| VideoId |
string |
No |
The video ID. You can obtain the video ID by using one of the following methods:
|
142710f878bd42508932f660d7b1**** |
| TemplateGroupId |
string |
Yes |
The ID of the transcoding template group used for video transcoding. To view the template group ID, log on to the ApsaraVideo VOD console and choose Configuration Management > Media Processing > Transcode Template Group. |
0e408c803baf658ee637790c5d9f**** |
| PipelineId |
string |
No |
The pipeline ID. |
d3e680e618708erf45fbf2cae7c**** |
| EncryptConfig |
string |
No |
The encryption configuration. This parameter is a JSON string and is required only when you use HLS encryption. Note
|
{"CipherText":"ZjJmZGViNzUtZWY1Mi00Y2RlLTk3****", "DecryptKeyUri":"http://demo.aliyundoc.com?CipherText=ZjJmZGViNzUtZWY1Mi00Y2RlLTk3****","KeyServiceType":"KMS"} |
| OverrideParams |
string |
No |
The override parameters in JSON format. You can use this parameter to override the image watermark file, text watermark content, subtitle file URL, and subtitle file encoding format associated with the transcoding template. For more information about the parameter structure, see OverrideParams. |
{"Watermarks":[{"WatermarkId":"af2afe4761992c47dae973374****","FileUrl":"http://developer.aliyundoc.com/image/image.png"},{"WatermarkId":"e8e5b8038d7ada85b376c2707****","Content":"watermark test"}]} |
| Priority |
string |
No |
The priority of the current transcoding job among all queued jobs.
Note
The Priority parameter affects only the priority of the current transcoding job among all queued jobs. It does not affect jobs that are already being transcoded. |
6 |
| UserData |
string |
No |
The custom settings in JSON format. This parameter supports configurations such as message callbacks. For more information, see UserData. Note
To use the message callback in this parameter, you must configure an HTTP callback URL and select the corresponding callback event types in the console. Otherwise, the callback settings do not take effect. |
{"Extend":{"localId":"****","test":"***"}} |
| SessionId |
string |
No |
The custom deduplication identifier. If a request with the same identifier was submitted within the past 7 days, the current request returns an error. The value can be up to 50 characters in length and can contain uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_). If this parameter is not specified or is set to an empty string, deduplication is not performed. |
5c62d40299034bbaa4c195da330**** |
| ReferenceId |
string |
No |
The custom ID. The value can contain only lowercase letters, uppercase letters, digits, hyphens (-), and underscores (_), and must be 6 to 64 characters in length. The value must be unique for each user. |
123-123 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| TranscodeTaskId |
string |
The ID of the submitted transcoding task. |
9f4a0df7da2c8a81c8c0408c84**** |
| RequestId |
string |
The request ID. |
E4EBD2BF-5EB0-4476-8829-9D94E1B1**** |
| TranscodeJobs |
object |
||
| TranscodeJob |
array<object> |
The media job information. Note
This parameter is not returned for HLS adaptive bitrate streaming packaging tasks. You must asynchronously receive the callback to obtain the processing result. |
|
|
object |
The media job details. |
||
| JobId |
string |
The job ID. Note
This parameter is not returned for HLS adaptive bitrate streaming packaging jobs. You must receive asynchronous callbacks to handle the results. |
d8921ce8505716cfe86fb112c4**** |
Examples
Success response
JSON format
{
"TranscodeTaskId": "9f4a0df7da2c8a81c8c0408c84****",
"RequestId": "E4EBD2BF-5EB0-4476-8829-9D94E1B1****",
"TranscodeJobs": {
"TranscodeJob": [
{
"JobId": "d8921ce8505716cfe86fb112c4****"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.