Call the SubmitTranscodeJob operation to submit a video or audio transcoding job to Intelligent Media Services. In the request, you must specify the source file to transcode, the output format, and related parameters.
Operation description
This operation will be discontinued on December 31, 2025. Use SubmitMediaConvertJob instead.
This is an asynchronous operation. After you submit a job, the system returns a job ID. The job is not completed immediately but is queued for asynchronous execution in the background. You will receive the final result through a callback notification. You can also call QueryTranscodeJob to query the job status.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:SubmitTranscodeJob |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
No |
The job name. |
job-name |
| InputGroup |
array<object> |
Yes |
The input group for the job. A single input creates a transcoding job. Multiple inputs create a media merging job. |
job-name |
|
object |
Yes |
The job input. |
||
| Type |
string |
Yes |
The media object type. Valid values:
|
OSS |
| Media |
string |
Yes |
The media value:
Note
You must add the OSS bucket in the URL to IMS storage management before you use it.
|
oss://bucket/path/to/video.mp4 |
| InputUrl |
string |
No |
The input stream path:
|
oss://bucket/path/to/video.mp4 |
| OutputGroup |
array<object> |
Yes |
The output group for the job. |
user-data |
|
array<object> |
Yes |
The job output. |
||
| Output |
object |
Yes |
The output media configuration. |
|
| Type |
string |
Yes |
The media object type. Valid values:
|
OSS |
| Media |
string |
Yes |
The media value:
Note
You must add the OSS bucket in the URL to IMS storage management before you use it.
|
oss://bucket/path/to/video.mp4 |
| OutputUrl |
string |
No |
The output stream path:
Note
|
oss://bucket/path/to/{MediaId}/{JobId}.mp4 |
| ProcessConfig |
object |
Yes |
The job processing configuration. |
|
| Transcode |
object |
Yes |
The transcoding configuration. |
|
| TemplateId |
string |
Yes |
The template ID. |
9547c6ad97cb4f2aaa29683ebd18d410 |
| OverwriteParams |
object |
No |
Parameters to overwrite. If you specify these, they replace the corresponding parameters in the template. |
|
| Video |
object |
No |
The video settings. |
|
| Codec |
string |
No |
The encoding format. |
H.264 |
| Profile |
string |
No |
The encoding profile. Valid values: baseline, main, and high.
Default value: high. |
Main |
| Bitrate |
string |
No |
The average video bitrate. Valid values: [10, 50000]. Unit: Kbps. |
3000 |
| Crf |
string |
No |
The constant rate factor (CRF), which controls the trade-off between quality and bitrate. Valid values: [0, 51]. Default values: 23 for H.264 and 26 for H.265. Note
If you set Crf, the Bitrate setting is ignored. |
23 |
| Width |
string |
No |
The width. Valid values: [128, 4096]. Unit: px. Default value: The original video width. |
1920 |
| Height |
string |
No |
The height. Valid values: [128, 4096]. Unit: px. Default value: The original video height. |
1080 |
| Fps |
string |
No |
The frame rate. Valid values: (0, 60]. Default value: The frame rate of the input file. Note
If the frame rate of the input file exceeds 60, the system uses 60. |
25 |
| Gop |
string |
No |
The maximum number of frames between keyframes. Valid values: [1, 1080000]. Default value: 250. |
250 |
| Preset |
string |
No |
The video encoder preset. Only H.264 supports this parameter. Valid values: veryfast, fast, medium, slow, and slower. Default value: medium. |
medium |
| ScanMode |
string |
No |
The scan mode. Valid values: interlaced and progressive. |
progressive |
| PixFmt |
string |
No |
The video color format. Valid values include yuv420p and yuvj420p. |
yuv420p |
| Remove |
string |
No |
Specifies whether to remove the video. |
false |
| Crop |
string |
No |
The video cropping method. Two options are available:
|
1280:800:0:140 |
| Pad |
string |
No |
The padding configuration for black bars. Format: width:height:left:top. Example: 1280:800:0:140 |
1280:800:0:140 |
| LongShortMode |
string |
No |
Specifies whether to enable automatic rotation for portrait or landscape videos (also known as long-side/short-side mode). |
false |
| Bufsize |
string |
No |
The buffer size. Valid values: [1000, 128000]. Default value: 6000. Unit: Kb. |
6000 |
| Maxrate |
string |
No |
The peak video bitrate. Valid values: [10, 50000]. Unit: Kbps. |
9000 |
| AbrMax |
string |
No |
The maximum bitrate for adaptive bitrate streaming (ABR). This applies only to narrow-high 1. Valid values: [10, 50000]. Unit: Kbps. |
6000 |
| Audio |
object |
No |
The audio settings. |
|
| Codec |
string |
No |
The audio codec. Valid values: AAC, MP3, VORBIS, and FLAC. Default value: AAC. |
AAC |
| Profile |
string |
No |
The audio encoding profile. When Codec is AAC, valid values are aac_low, aac_he, aac_he_v2, aac_ld, and aac_eld. |
aac_low |
| Samplerate |
string |
No |
The sample rate. Default value: 44100. Valid values: 22050, 32000, 44100, 48000, and 96000. Unit: Hz. |
44100 |
| Bitrate |
string |
No |
The audio bitrate of the output file. Valid values: [8, 1000]. Unit: Kbps. Default value: 128. |
128 |
| Channels |
string |
No |
The number of sound channels. Default value: 2. |
2 |
| Remove |
string |
No |
Specifies whether to delete the audio stream. |
false |
| Volume |
object |
No |
The volume control. |
|
| Method |
string |
No |
The volume adjustment method. |
auto |
| IntegratedLoudnessTarget |
string |
No |
The target loudness level. |
-6 |
| TruePeak |
string |
No |
The true peak volume. |
-1 |
| LoudnessRangeTarget |
string |
No |
The loudness range. |
8 |
| Container |
object |
No |
The container format settings. |
|
| Format |
string |
No |
The container format. |
mp4 |
| MuxConfig |
object |
No |
The multiplexing settings. |
|
| Segment |
object |
No |
The segment settings. |
|
| Duration |
string |
No |
The segment duration. |
10 |
| ForceSegTime |
string |
No |
The forced segment time points. |
2,3 |
| TransConfig |
object |
No |
The conditional transcoding parameters. |
|
| TransMode |
string |
No |
The video transcoding mode. Valid values:
Default value: onepass. |
onepass |
| IsCheckReso |
string |
No |
Specifies whether to check the video resolution. IsCheckReso and IsCheckResoFail are mutually exclusive. IsCheckResoFail has higher priority.
Default value: false. |
true |
| IsCheckResoFail |
string |
No |
Specifies whether to check the video resolution. IsCheckReso and IsCheckResoFail are mutually exclusive. IsCheckResoFail has higher priority.
Default value: false. |
true |
| IsCheckVideoBitrate |
string |
No |
Specifies whether to check the video bitrate. IsCheckVideoBitrate and IsCheckVideoBitrateFail are mutually exclusive. IsCheckVideoBitrateFail has higher priority.
Default value: false. |
true |
| IsCheckVideoBitrateFail |
string |
No |
Specifies whether to check the video bitrate. IsCheckVideoBitrate and IsCheckVideoBitrateFail are mutually exclusive. IsCheckVideoBitrateFail has higher priority.
Default value: false. |
true |
| IsCheckAudioBitrate |
string |
No |
Specifies whether to check the audio bitrate. IsCheckAudioBitrate and IsCheckAudioBitrateFail are mutually exclusive. IsCheckAudioBitrateFail has higher priority.
Default value:
|
true |
| IsCheckAudioBitrateFail |
string |
No |
Specifies whether to check the audio bitrate. IsCheckAudioBitrate and IsCheckAudioBitrateFail are mutually exclusive. IsCheckAudioBitrateFail has higher priority.
Default value: false. |
true |
| AdjDarMethod |
string |
No |
The method used to adjust the display aspect ratio. This parameter takes effect only when both Width and Height are specified. You can use it with LongShortMode. Valid values: rescale, crop, pad, and none. Default value: none. |
none |
| ImageWatermarks |
array<object> |
No |
The image watermark configuration. |
|
|
array<object> |
No |
The image watermark configuration. |
||
| TemplateId |
string |
Yes |
The template ID. |
9547c6ad97cb4f2aaa29683ebd18d410 |
| OverwriteParams |
object |
No |
Parameters to overwrite. If you specify these, they replace the corresponding parameters in the template. |
|
| Width |
string |
No |
The width of the image watermark on the output video. Values can be one of the following:
|
32 |
| Height |
string |
No |
The height of the image watermark on the output video. Values can be one of the following:
|
32 |
| Dx |
string |
No |
The horizontal offset of the image watermark relative to the output video. Default value: 0. Values can be one of the following:
|
10 |
| Dy |
string |
No |
The vertical offset of the image watermark relative to the output video. Default value: 0. Values can be one of the following:
|
10 |
| ReferPos |
string |
No |
The position of the watermark.
|
TopLeft |
| Timeline |
object |
No |
The display time settings for a dynamic watermark. |
|
| Start |
string |
No |
The start time of the watermark.
|
00:00:05 |
| Duration |
string |
No |
The duration of the watermark.
|
ToEND |
| File |
object |
No |
The watermark image file. |
|
| Type |
string |
No |
The media object type. Valid values:
|
OSS |
| Media |
string |
No |
The media value:
|
oss://bucket/path/to/video.mp4 |
| TextWatermarks |
array<object> |
No |
The text watermark configuration. |
|
|
array<object> |
No |
The text watermark configuration. |
||
| TemplateId |
string |
Yes |
The template ID. |
9547c6ad97cb4f2aaa29683ebd18d410 |
| OverwriteParams |
object |
No |
Parameters to overwrite. If you specify these, they replace the corresponding parameters in the template. |
|
| Content |
string |
No |
The watermark text. It does not need to be Base64 encoded. The string must be UTF-8 encoded. |
测试水印 |
| FontName |
string |
No |
The font. Default: SimSun. |
SimSun |
| FontColor |
string |
No |
The color. |
#006400 |
| FontAlpha |
string |
No |
The font transparency.
|
1.0 |
| Top |
string |
No |
The top margin of the text.
|
10 |
| Left |
string |
No |
The left margin of the text.
|
10 |
| FontSize |
integer |
No |
The font size.
|
16 |
| BorderWidth |
integer |
No |
The outline width.
|
0 |
| BorderColor |
string |
No |
The outline color. Default: Black. For more values, see BorderColor. |
#006400 |
| Adaptive |
string |
No |
Adjusts the font size based on the output video size. Valid values: true or false. Default: false. |
false |
| Subtitles |
array<object> |
No |
The subtitle burn-in configuration. |
|
|
array<object> |
No |
The subtitle burn-in configuration. |
||
| TemplateId |
string |
Yes |
The template ID. |
9547c6ad97cb4f2aaa29683ebd18d410 |
| OverwriteParams |
object |
No |
Parameters to overwrite. If you specify these, they replace the corresponding parameters in the template. |
|
| Format |
string |
No |
The subtitle file format. |
vtt |
| CharEnc |
string |
No |
The file encoding format. |
UTF-8 |
| File |
object |
No |
The subtitle file. |
|
| Type |
string |
No |
The media object type. Valid values:
|
OSS |
| Media |
string |
No |
The media value:
|
oss://bucket/path/to/video.mp4 |
| Encryption |
object |
No |
The encryption configuration. |
|
| EncryptType |
string |
No |
The encryption type. Valid values:
|
PrivateEncryption |
| CipherText |
string |
No |
The ciphertext of the key for standard encryption. |
MTYi00NDU0LTg5O**** |
| DecryptKeyUri |
string |
No |
The decryption service endpoint for standard encryption. |
https://sample.com/path?CipherText=MTYi00NDU0LTg5O**** |
| KeyServiceType |
string |
No |
The key service type for standard encryption. Valid values:
|
KMS |
| CombineConfigs |
array<object> |
No |
The configuration for merging multiple inputs. |
|
|
object |
No |
The merging configuration. |
||
| AudioIndex |
string |
Yes |
The audio stream index. |
0 或 exclude |
| VideoIndex |
string |
Yes |
The video stream index. |
0 或 exclude |
| Start |
number |
No |
The start time of the input stream. Default: 0. |
0.0 |
| Duration |
number |
No |
The duration of the input stream. Default: The video duration. |
20.0 |
| UserData |
string |
No |
Custom settings in JSON format. The length is limited to 512 bytes. Supports custom webhook address configuration. |
user-data |
| ScheduleConfig |
object |
No |
The job scheduling information. |
job-name |
| PipelineId |
string |
No |
The MPS queue ID. |
e37ebee5d98b4781897f6086e89f9c56 |
| Priority |
integer |
No |
The job priority. A larger number indicates a higher priority. Valid values: 1 to 10. |
5 |
| ClientToken |
string |
No |
The idempotence key. Ensures request idempotence. |
****12e8864746a0a398**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
31E30781-9495-5E2D-A84D-759B0A01E262 |
| TranscodeParentJob |
object |
TranscodeParentJobWithSubJobDTO |
|
| TranscodeJobList |
array<object> |
The list of sub-jobs. |
|
|
array<object> |
The sub-job details. |
||
| CreateTime |
string |
The time the job was created. |
2022-01-12T08:49:41Z |
| Name |
string |
The job name. |
transcode-job |
| ParentJobId |
string |
The parent job ID. |
8b2198504dd340b7b3c9842a74fc9baa |
| JobId |
string |
The sub-job ID. |
7d6a7e0d4db2457a8d45ff5d43e1bf0a |
| JobIndex |
integer |
The index of the sub-job within the entire job. |
0 |
| InputGroup |
array<object> |
The input group for the job. A single input creates a transcoding job. Multiple inputs create a media merging job. |
|
|
object |
The job input. |
||
| Type |
string |
The media object type. Valid values:
|
OSS |
| Media |
string |
The media value:
|
oss://bucket/path/to/video.mp4 |
| InputUrl |
string |
The input stream path:
|
oss://bucket/path/to/video.mp4 |
| ProcessConfig |
object |
The transcoding processing configuration. |
|
| Transcode |
object |
The transcoding configuration. |
|
| TemplateId |
string |
The template ID. |
9547c6ad97cb4f2aaa29683ebd18d410 |
| OverwriteParams |
object |
Parameters to overwrite. If you specify these, they replace the corresponding parameters in the template. |
|
| Video |
object |
The video settings. |
|
| Codec |
string |
The encoding format. |
H.264 |
| Profile |
string |
The encoding profile. Valid values: baseline, main, and high.
Default value: high. |
Main |
| Bitrate |
string |
The average video bitrate.
|
3000 |
| Crf |
string |
The constant rate factor (CRF), which controls the trade-off between quality and bitrate.
If you set Crf, the Bitrate setting is ignored. |
23 |
| Width |
string |
The width.
|
1920 |
| Height |
string |
The height.
|
1080 |
| Fps |
string |
The frame rate.
|
25 |
| Gop |
string |
The maximum number of frames between keyframes.
|
250 |
| Preset |
string |
The video encoder preset. Only H.264 supports this parameter. Valid values: veryfast, fast, medium, slow, and slower. Default value: medium. |
medium |
| ScanMode |
string |
The scan mode. Valid values: interlaced and progressive. |
progressive |
| PixFmt |
string |
The video color format. Valid values include yuv420p and yuvj420p. |
yuv420p |
| Remove |
string |
Specifies whether to remove the video. |
false |
| Crop |
string |
The video cropping method. Two options are available.
|
1280:800:0:140 |
| Pad |
string |
The padding configuration for black bars.
|
1280:800:0:140 |
| LongShortMode |
string |
Specifies whether to enable automatic rotation for portrait or landscape videos (also known as long-side/short-side mode). |
false |
| Bufsize |
string |
The buffer size.
|
6000 |
| Maxrate |
string |
The peak video bitrate. Valid values: [10, 50000]. Unit: Kbps. |
9000 |
| AbrMax |
string |
The maximum bitrate for adaptive bitrate streaming (ABR). This applies only to narrow-high 1. Valid values: [10, 50000]. Unit: Kbps. |
6000 |
| Audio |
object |
The audio settings. |
|
| Codec |
string |
The audio codec. Valid values: AAC, MP3, VORBIS, and FLAC. Default value: AAC. |
AAC |
| Profile |
string |
The audio encoding profile. When Codec is AAC, valid values are aac_low, aac_he, aac_he_v2, aac_ld, and aac_eld. |
aac_low |
| Samplerate |
string |
The sample rate.
|
44100 |
| Bitrate |
string |
The audio bitrate of the output file.
|
128 |
| Channels |
string |
The number of sound channels. Default value: 2. |
2 |
| Remove |
string |
Specifies whether to delete the audio stream. |
false |
| Volume |
object |
The volume control. |
|
| Method |
string |
The volume adjustment method. |
auto |
| IntegratedLoudnessTarget |
string |
The target loudness level. |
-6 |
| TruePeak |
string |
The true peak level. |
-1 |
| LoudnessRangeTarget |
string |
The loudness range. |
8 |
| Container |
object |
The container format settings. |
|
| Format |
string |
The container format. |
mp4 |
| MuxConfig |
object |
The multiplexing settings. |
|
| Segment |
object |
The segment settings. |
|
| Duration |
string |
The segment duration. |
10 |
| ForceSegTime |
string |
The forced segment time points. |
2,3 |
| TransConfig |
object |
The conditional transcoding parameters. |
|
| TransMode |
string |
The video transcoding mode. Valid values:
|
onepass |
| IsCheckReso |
string |
Specifies whether to check the video resolution. IsCheckReso and IsCheckResoFail are mutually exclusive. IsCheckResoFail has higher priority.
|
true |
| IsCheckResoFail |
string |
Specifies whether to check the video resolution. IsCheckReso and IsCheckResoFail are mutually exclusive. This parameter has higher priority.
|
true |
| IsCheckVideoBitrate |
string |
Specifies whether to check the video bitrate. IsCheckVideoBitrate and IsCheckVideoBitrateFail are mutually exclusive. IsCheckVideoBitrateFail has higher priority.
|
true |
| IsCheckVideoBitrateFail |
string |
Specifies whether to check the video bitrate. IsCheckVideoBitrate and IsCheckVideoBitrateFail are mutually exclusive. This parameter has higher priority.
|
true |
| IsCheckAudioBitrate |
string |
Specifies whether to check the audio bitrate. IsCheckAudioBitrate and IsCheckAudioBitrateFail are mutually exclusive. IsCheckAudioBitrateFail has higher priority.
Default value rules:
|
true |
| IsCheckAudioBitrateFail |
string |
Specifies whether to check the audio bitrate. IsCheckAudioBitrate and IsCheckAudioBitrateFail are mutually exclusive. This parameter has higher priority.
|
true |
| AdjDarMethod |
string |
The method used to adjust the display aspect ratio. This parameter takes effect only when both Width and Height are specified. You can use it with LongShortMode. Valid values: rescale, crop, pad, and none. Default value: none. |
none |
| ImageWatermarks |
array<object> |
The image watermark configuration. |
|
|
array<object> |
The image watermark configuration. |
||
| TemplateId |
string |
The template ID. |
9547c6ad97cb4f2aaa29683ebd18d410 |
| OverwriteParams |
object |
Parameters to overwrite. If you specify these, they replace the corresponding parameters in the template. |
|
| Width |
string |
The width of the image watermark on the output video. Values can be one of the following:
|
32 |
| Height |
string |
The height of the image watermark on the output video. Values can be one of the following:
|
32 |
| Dx |
string |
The horizontal offset of the image watermark relative to the output video. Default value: 0. Values can be one of the following:
|
10 |
| Dy |
string |
The vertical offset of the image watermark relative to the output video. Default value: 0. Values can be one of the following:
|
10 |
| ReferPos |
string |
The position of the watermark.
|
TopLeft |
| Timeline |
object |
The display time settings for a dynamic watermark. |
|
| Start |
string |
The start time of the watermark.
|
00:00:05 |
| Duration |
string |
The duration of the watermark.
|
ToEND |
| File |
object |
The watermark image file. |
|
| Type |
string |
The media object type. Valid values:
|
OSS |
| Media |
string |
The media value:
|
oss://bucket/path/to/video.mp4 |
| TextWatermarks |
array<object> |
The text watermark configuration. |
|
|
array<object> |
The text watermark configuration. |
||
| TemplateId |
string |
The template ID. |
9547c6ad97cb4f2aaa29683ebd18d410 |
| OverwriteParams |
object |
Parameters to overwrite. If you specify these, they replace the corresponding parameters in the template. |
|
| Content |
string |
The watermark text. It does not need to be Base64 encoded. The string must be UTF-8 encoded. |
测试水印 |
| FontName |
string |
The font. Default: SimSun. |
SimSun |
| FontColor |
string |
The color. |
#006400 |
| FontAlpha |
string |
The font transparency.
|
1.0 |
| Top |
string |
The top margin of the text.
|
10 |
| Left |
string |
The left margin of the text.
|
10 |
| FontSize |
integer |
The font size.
|
16 |
| BorderWidth |
integer |
The outline width.
|
0 |
| BorderColor |
string |
The outline color. Default: Black. For more values, see BorderColor. |
#006400 |
| Adaptive |
string |
Adjusts the font size based on the output video size. The default is false. |
false |
| Subtitles |
array<object> |
The configuration for burning in captions. |
|
|
array<object> |
The configuration for burning in subtitles. |
||
| TemplateId |
string |
The template ID. |
9547c6ad97cb4f2aaa29683ebd18d410 |
| OverwriteParams |
object |
Parameters to overwrite. If you specify these, they replace the corresponding parameters in the template. |
|
| Format |
string |
The file format of the caption. |
vtt |
| CharEnc |
string |
The encoding format of the file. |
UTF-8 |
| File |
object |
The subtitle file. |
|
| Type |
string |
The type of the media object. Valid values:
|
OSS |
| Media |
string |
The value of Media:
|
oss://bucket/path/to/video.mp4 |
| Encryption |
object |
The encryption configuration. |
|
| EncryptType |
string |
The encryption type. |
PrivateEncryption |
| CipherText |
string |
The ciphertext of the key for standard encryption. |
MTYi00NDU0LTg5O**** |
| DecryptKeyUri |
string |
The decryption service endpoint for standard encryption. |
https://sample.com/path?CipherText=MTYi00NDU0LTg5O**** |
| KeyServiceType |
string |
The type of the key service. Only KMS and Base64 are supported. |
KMS |
| CombineConfigs |
array<object> |
The configuration for mixing multiple input streams. |
|
|
object |
The stream combination configuration. |
||
| AudioIndex |
string |
The index of the audio stream. |
0 或 exclude |
| VideoIndex |
string |
The index of the video stream. |
0 或 exclude |
| Start |
number |
The start time of the input stream. The default value is 0. |
0.0 |
| Duration |
number |
The duration of the input stream. The default value is the duration of the video. |
20.0 |
| Output |
object |
The output media configuration. |
|
| Type |
string |
The media object type. Valid values:
|
OSS |
| Media |
string |
The value of the media asset:
|
oss://bucket/path/to/video.mp4 |
| OutputUrl |
string |
The path of the output stream.
|
oss://bucket/path/to/{MediaId}/{JobId}.mp4 |
| UserData |
string |
User data. |
user-data |
| ScheduleConfig |
object |
The scheduling information for the job. |
|
| PipelineId |
string |
The ID of the pipeline. |
e37ebee5d98b4781897f6086e89f9c56 |
| Priority |
integer |
The priority of the task. A larger value indicates a higher priority. The value can be an integer from 1 to 10. |
5 |
| Status |
string |
The status of the transcoding job.
|
Init |
| OutFileMeta |
object |
The media information of the video generated by the job. |
|
| FileBasicInfo |
object |
Basic file information. |
|
| MediaId |
string |
The media asset ID. |
73e07de0f77171eca3fc7035d0b26402 |
| FileName |
string |
The name of the file. |
file.m3u8 |
| FileStatus |
string |
The status of the file. |
Normal |
| FileType |
string |
The file type. Valid values: source_file and transcode_file. |
source_file |
| FileSize |
string |
The size of the file in bytes. |
31737 |
| FileUrl |
string |
The URL of the file. |
http://bucket.oss-cn-shanghai.aliyuncs.com/path/to/file.m3u8 |
| Region |
string |
The region where the file is located. |
cn-shanghai |
| FormatName |
string |
The name of the video format. |
hls,applehttp |
| Duration |
string |
The duration of the video in seconds. |
403.039999 |
| Bitrate |
string |
The video bitrate. |
888.563 |
| Width |
string |
The width of the output file. |
848 |
| Height |
string |
The height. |
478 |
| AudioStreamInfoList |
array<object> |
The audio stream information. |
|
|
object |
The audio stream information. |
||
| Index |
string |
The index of the stream. |
1 |
| CodecName |
string |
The encoding format. |
aac |
| CodecLongName |
string |
The name of the encoding format. |
AAC (Advanced Audio Coding) |
| CodecTimeBase |
string |
The time base of the encoder. |
1/44100 |
| CodecTagString |
string |
The encoder tag name. |
[15][0][0][0] |
| CodecTag |
string |
The encoder tag. |
0x000f |
| SampleFmt |
string |
The sampling format. |
fltp |
| SampleRate |
string |
The sample rate in Hz. |
44100 |
| Channels |
string |
The number of sound channels. |
2 |
| ChannelLayout |
string |
The channel layout. |
stereo |
| Timebase |
string |
The time base. |
1/90000 |
| StartTime |
string |
The start time. |
1.473556 |
| Duration |
string |
The duration in seconds. |
403.039989 |
| Bitrate |
string |
The bitrate. |
0.f |
| Lang |
string |
The language. |
cn |
| VideoStreamInfoList |
array<object> |
The video stream information. |
|
|
object |
The video stream information. |
||
| Index |
string |
The index of the stream. |
0 |
| Codec_name |
string |
The encoding format. |
h264 |
| Codec_long_name |
string |
The name of the encoding format. |
H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 |
| Profile |
string |
The encoder preset. |
High |
| Codec_time_base |
string |
The codec time base. |
1/50 |
| Codec_tag_string |
string |
The text of the encoding format tag. |
[27][0][0][0] |
| Codec_tag |
string |
The encoding format tag. |
0x001b |
| Width |
string |
The video width. |
848 |
| Height |
string |
The height of the output video stream. |
478 |
| Has_b_frames |
string |
Indicates whether B-frames exist. Valid values:
|
2 |
| Sar |
string |
The sample aspect ratio. |
478:477 |
| Dar |
string |
The display aspect ratio. |
16:9 |
| PixFmt |
string |
The color storage format. |
yuv420p |
| Level |
string |
The encoding level. |
31 |
| Fps |
string |
The frame rate. |
25.0 |
| Avg_fps |
string |
The average frame rate. |
25.0 |
| Time_base |
string |
The time base. |
1/90000 |
| Start_time |
string |
The start time. |
1.473556 |
| Duration |
string |
The duration in seconds. |
403.039989 |
| Bit_rate |
string |
The bitrate. |
888.563 |
| NumFrames |
string |
The total number of frames. |
10040 |
| Lang |
string |
The language. |
cn |
| Rotate |
string |
The rotation angle of the video. Valid values: 0, 90, 180, and 270. The default value is 0. |
0 |
| SubmitResultJson |
object |
The result of the job submission. |
{} |
| SubmitTime |
string |
The time when the job was submitted. |
2022-01-12T08:49:41Z |
| FinishTime |
string |
The time when the job finished. |
2022-01-12T08:49:41Z |
| RequestId |
string |
The ID of the request to submit the job. |
31E30781-9495-5E2D-A84D-759B0A01E262 |
| CreateTime |
string |
The time when the job was created. The format is yyyy-MM-ddTHH:mm:ssZ. |
2022-01-12T08:49:41Z |
| Name |
string |
The name of the job. |
transcode-job |
| RequestId |
string |
The ID of the request. |
31E30781-9495-5E2D-A84D-759B0A01E262 |
| ParentJobId |
string |
The ID of the parent job. |
8b2198504dd340b7b3c9842a74fc9baa |
| JobCount |
integer |
The number of sub-jobs. |
1 |
| Status |
string |
The status of the job. Success: At least one sub-job succeeded after all sub-jobs are complete. Fail: All sub-jobs failed. |
Success |
| TriggerSource |
string |
The source of the job. Valid values: `API`, `WorkFlow`, and `Console`. |
API |
| Percent |
integer |
The completion percentage of the job. |
0 |
| SubmitTime |
string |
The time when the job was submitted. The format is yyyy-MM-ddTHH:mm:ssZ. |
2022-01-12T08:49:41Z |
| FinishTime |
string |
The time when the job finished. The format is yyyy-MM-ddTHH:mm:ssZ. |
2022-01-12T08:49:41Z |
| InputGroup |
array<object> |
The input group for the job. A single input creates a transcoding job. Multiple inputs create a job to merge audio and video streams. |
|
|
object |
The job input. |
||
| Type |
string |
The type of the media object. Valid values:
|
OSS |
| Media |
string |
The value of the media asset:
|
oss://bucket/path/to/video.mp4 |
| OutputGroup |
array<object> |
The output group of the job. |
|
|
array<object> |
The job output. |
||
| Output |
object |
The output media configuration. |
|
| Type |
string |
The media object type. Valid values:
|
OSS |
| Media |
string |
The value of the media asset:
|
oss://bucket/path/to/video.mp4 |
| ProcessConfig |
object |
The job processing configuration. |
|
| Transcode |
object |
The transcoding configuration. |
|
| TemplateId |
string |
The template ID. |
9547c6ad97cb4f2aaa29683ebd18d410 |
| OverwriteParams |
object |
The overwrite parameters. If specified, these parameters overwrite the corresponding parameters in the template. |
|
| Video |
object |
Video settings |
|
| Codec |
string |
The encoding format. |
H.264 |
| Profile |
string |
The encoding profile. Supported values are baseline, main, and high.
Default value: high. |
Main |
| Bitrate |
string |
The average video bitrate.
|
3000 |
| Crf |
string |
The Constant Rate Factor (CRF).
If Crf is set, the Bitrate setting is ignored. |
23 |
| Width |
string |
The width of the output video.
|
1920 |
| Height |
string |
The height of the video.
|
1080 |
| Fps |
string |
The frame rate.
|
25 |
| Gop |
string |
The maximum number of frames between two keyframes.
|
250 |
| Preset |
string |
The video algorithm preset. This parameter is supported only for H.264. Supported values are veryfast, fast, medium, slow, and slower. The default value is medium. |
medium |
| ScanMode |
string |
The scan mode. Valid values are interlaced and progressive. |
progressive |
| PixFmt |
string |
The pixel format of the video. Valid values include standard formats such as yuv420p and yuvj420p. |
yuv420p |
| Remove |
string |
Specifies whether to remove the video. |
false |
| Crop |
string |
Crops the video frame. Two methods are available.
|
1280:800:0:140 |
| Pad |
string |
Adds black bars to the video.
|
1280:800:0:140 |
| LongShortMode |
string |
Specifies whether to enable automatic rotation for landscape and portrait orientations (long and short edge pattern). |
false |
| Bufsize |
string |
The buffer size.
|
6000 |
| Maxrate |
string |
The peak video bitrate.
|
9000 |
| AbrMax |
string |
The maximum bitrate for adaptive bitrate (ABR) streaming. This parameter is valid only for Narrowband HD 1.0.
|
6000 |
| Audio |
object |
Audio settings. |
|
| Codec |
string |
The audio codec format. Valid values are AAC, MP3, VORBIS, and FLAC. Default value: AAC |
AAC |
| Profile |
string |
The audio encoding preset. When Codec is set to AAC, valid values are aac_low, aac_he, aac_he_v2, aac_ld, and aac_eld. |
aac_low |
| Samplerate |
string |
The sample rate.
|
44100 |
| Bitrate |
string |
The audio bitrate of the output file.
|
128 |
| Channels |
string |
The number of sound channels. Default value: 2. |
2 |
| Remove |
string |
Specifies whether to remove the audio stream. |
false |
| Volume |
object |
The volume control settings. |
|
| Method |
string |
The volume adjustment method. |
auto |
| IntegratedLoudnessTarget |
string |
The target volume. |
-6 |
| TruePeak |
string |
The true peak. |
-1 |
| LoudnessRangeTarget |
string |
The loudness range. |
8 |
| Container |
object |
The container format settings. |
|
| Format |
string |
The container format. |
mp4 |
| MuxConfig |
object |
The encapsulation settings. |
|
| Segment |
object |
Segment settings. |
|
| Duration |
string |
The segment length. |
10 |
| ForceSegTime |
string |
The time points for forced segmentation. |
2,3 |
| TransConfig |
object |
The conditional transcoding parameters. |
|
| TransMode |
string |
The video transcoding mode. Valid values:
Default value: onepass. |
onepass |
| IsCheckReso |
string |
Specifies whether to check the video resolution. The IsCheckReso and IsCheckResoFail parameters are mutually exclusive. IsCheckResoFail takes precedence.
Default value: false. |
true |
| IsCheckResoFail |
string |
Specifies whether to check the video resolution. You can use either IsCheckReso or IsCheckResoFail, but not both. This parameter has a higher priority.
Default value: false. |
true |
| IsCheckVideoBitrate |
string |
Specifies whether to check the video bitrate. You can set either IsCheckVideoBitrate or IsCheckVideoBitrateFail. IsCheckVideoBitrateFail has a higher priority.
Default value: false. |
true |
| IsCheckVideoBitrateFail |
string |
Specifies whether to check the video bitrate. This parameter and IsCheckVideoBitrate are mutually exclusive. IsCheckVideoBitrateFail has a higher priority.
Default value: false. |
true |
| IsCheckAudioBitrate |
string |
Specifies whether to check the audio bitrate. You can set either this parameter or IsCheckAudioBitrateFail. IsCheckAudioBitrateFail takes precedence.
Default value:
|
true |
| IsCheckAudioBitrateFail |
string |
Specifies whether to check the audio bitrate. You can set either IsCheckAudioBitrate or IsCheckAudioBitrateFail. This parameter has a higher priority.
Default value: false. |
true |
| AdjDarMethod |
string |
The method to adjust the resolution. This setting takes effect only when both Width and Height are specified. It can be used with LongShortMode. Valid values: rescale, crop, pad, and none. Default value: none. |
none |
| ImageWatermarks |
array<object> |
The image watermark settings. |
|
|
array<object> |
The image watermark configuration. |
||
| TemplateId |
string |
The template ID. |
9547c6ad97cb4f2aaa29683ebd18d410 |
| OverwriteParams |
object |
The parameters that, when specified, overwrite the corresponding parameters in the template. |
|
| Width |
string |
The width of the watermark image on the output video. The value can be specified in two formats:
|
32 |
| Height |
string |
The height of the image watermark on the output video. The value can be specified in two ways:
|
32 |
| Dx |
string |
The horizontal offset of the watermark image relative to the output video. Default: 0 The value can be specified in two formats:
|
10 |
| Dy |
string |
The vertical offset of the watermark image relative to the output video. Default value: 0. The value can be in one of the following two formats:
|
10 |
| ReferPos |
string |
The position of the watermark.
|
TopLeft |
| Timeline |
object |
The display time settings for the dynamic watermark. |
|
| Start |
string |
The time when the watermark appears.
|
00:00:05 |
| Duration |
string |
The duration of the watermark.
|
ToEND |
| File |
object |
The image file for the watermark. |
|
| Type |
string |
The object type of the media asset. Valid values:
|
OSS |
| Media |
string |
The value of the media asset:
|
oss://bucket/path/to/video.mp4 |
| TextWatermarks |
array<object> |
The text watermark configurations. |
|
|
array<object> |
The text watermark configuration. |
||
| TemplateId |
string |
The template ID. |
9547c6ad97cb4f2aaa29683ebd18d410 |
| OverwriteParams |
object |
The overwrite parameters. If specified, these parameters overwrite the corresponding parameters in the template. |
|
| Content |
string |
The watermark text. The string must be UTF-8 encoded. Base64 encoding is not required. |
测试水印 |
| FontName |
string |
The font. Default: SimSun. |
SimSun |
| FontColor |
string |
The font color. |
#006400 |
| FontAlpha |
string |
The transparency of the font.
|
1.0 |
| Top |
string |
The top margin of the text.
|
10 |
| Left |
string |
The left margin of the text.
|
10 |
| FontSize |
integer |
The font size.
|
16 |
| BorderWidth |
integer |
The width of the border.
|
0 |
| BorderColor |
string |
The outline color. Default: Black For more values, see BorderColor. |
#006400 |
| Adaptive |
string |
Adjusts the font size based on the size of the output video.
|
false |
| Subtitles |
array<object> |
The caption burn-in configuration. |
|
|
array<object> |
The caption burn-in configuration. |
||
| TemplateId |
string |
The template ID. |
9547c6ad97cb4f2aaa29683ebd18d410 |
| OverwriteParams |
object |
The overwrite parameters. If specified, these parameters overwrite the corresponding parameters in the template. |
|
| Format |
string |
The caption file format. |
vtt |
| CharEnc |
string |
The file encoding format. |
UTF-8 |
| File |
object |
The subtitle file. |
|
| Type |
string |
The type of the media object. Valid values:
|
OSS |
| Media |
string |
The value of the media asset. If the type is OSS, the value is a URL that supports the OSS and HTTP protocols. If the type is Media, the value is the media asset ID. |
oss://bucket/path/to/video.mp4 |
| Encryption |
object |
The encryption configuration. |
|
| EncryptType |
string |
The encryption type. |
PrivateEncryption |
| CipherText |
string |
The ciphertext of the key for standard encryption. |
MTYi00NDU0LTg5O**** |
| DecryptKeyUri |
string |
The decryption endpoint for standard encryption. |
https://sample.com/path?CipherText=MTYi00NDU0LTg5O**** |
| KeyServiceType |
string |
The type of the key service. Only KMS and Base64 are supported. |
KMS |
| CombineConfigs |
array<object> |
The settings for combining multiple input streams. |
|
|
object |
The configuration for combining multiple input streams. |
||
| AudioIndex |
string |
The index of the audio stream. |
0 或 exclude |
| VideoIndex |
string |
The index of the video stream. |
0 或 exclude |
| Start |
number |
The start time of the input stream. The default value is 0. |
0.0 |
| Duration |
number |
The duration of the input stream. By default, this is the duration of the video. |
20.0 |
| UserData |
string |
The user data. |
user-data |
| ScheduleConfig |
object |
The job scheduling configuration. |
|
| PipelineId |
string |
The pipeline ID. |
e37ebee5d98b4781897f6086e89f9c56 |
| Priority |
integer |
The priority of the job. A larger value indicates a higher priority. The value can be an integer from 1 to 10. |
5 |
Examples
Success response
JSON format
{
"RequestId": "31E30781-9495-5E2D-A84D-759B0A01E262",
"TranscodeParentJob": {
"TranscodeJobList": [
{
"CreateTime": "2022-01-12T08:49:41Z",
"Name": "transcode-job",
"ParentJobId": "8b2198504dd340b7b3c9842a74fc9baa",
"JobId": "7d6a7e0d4db2457a8d45ff5d43e1bf0a",
"JobIndex": 0,
"InputGroup": [
{
"Type": "OSS",
"Media": "oss://bucket/path/to/video.mp4",
"InputUrl": "oss://bucket/path/to/video.mp4\n"
}
],
"ProcessConfig": {
"Transcode": {
"TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
"OverwriteParams": {
"Video": {
"Codec": "H.264",
"Profile": "Main",
"Bitrate": "3000",
"Crf": "23",
"Width": "1920",
"Height": "1080",
"Fps": "25",
"Gop": "250",
"Preset": "medium",
"ScanMode": "progressive",
"PixFmt": "yuv420p",
"Remove": "false",
"Crop": "1280:800:0:140",
"Pad": "1280:800:0:140",
"LongShortMode": "false",
"Bufsize": "6000",
"Maxrate": "9000",
"AbrMax": "6000"
},
"Audio": {
"Codec": "AAC",
"Profile": "aac_low",
"Samplerate": "44100",
"Bitrate": "128",
"Channels": "2",
"Remove": "false",
"Volume": {
"Method": "auto",
"IntegratedLoudnessTarget": "-6",
"TruePeak": "-1",
"LoudnessRangeTarget": "8"
}
},
"Container": {
"Format": "mp4"
},
"MuxConfig": {
"Segment": {
"Duration": "10",
"ForceSegTime": "2,3"
}
},
"TransConfig": {
"TransMode": "onepass",
"IsCheckReso": "true",
"IsCheckResoFail": "true",
"IsCheckVideoBitrate": "true",
"IsCheckVideoBitrateFail": "true",
"IsCheckAudioBitrate": "true",
"IsCheckAudioBitrateFail": "true",
"AdjDarMethod": "none"
}
}
},
"ImageWatermarks": [
{
"TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
"OverwriteParams": {
"Width": "32",
"Height": "32",
"Dx": "10",
"Dy": "10",
"ReferPos": "TopLeft",
"Timeline": {
"Start": "00:00:05",
"Duration": "ToEND"
},
"File": {
"Type": "OSS",
"Media": "oss://bucket/path/to/video.mp4"
}
}
}
],
"TextWatermarks": [
{
"TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
"OverwriteParams": {
"Content": "测试水印",
"FontName": "SimSun",
"FontColor": "#006400",
"FontAlpha": "1.0",
"Top": "10",
"Left": "10",
"FontSize": 16,
"BorderWidth": 0,
"BorderColor": "#006400",
"Adaptive": "false"
}
}
],
"Subtitles": [
{
"TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
"OverwriteParams": {
"Format": "vtt",
"CharEnc": "UTF-8",
"File": {
"Type": "OSS",
"Media": "oss://bucket/path/to/video.mp4"
}
}
}
],
"Encryption": {
"EncryptType": "PrivateEncryption",
"CipherText": "MTYi00NDU0LTg5O****",
"DecryptKeyUri": "https://sample.com/path?CipherText=MTYi00NDU0LTg5O****",
"KeyServiceType": "KMS"
},
"CombineConfigs": [
{
"AudioIndex": "0 或 exclude",
"VideoIndex": "0 或 exclude",
"Start": 0,
"Duration": 20
}
]
},
"Output": {
"Type": "OSS",
"Media": "oss://bucket/path/to/video.mp4",
"OutputUrl": "oss://bucket/path/to/{MediaId}/{JobId}.mp4\n"
},
"UserData": "user-data",
"ScheduleConfig": {
"PipelineId": "e37ebee5d98b4781897f6086e89f9c56",
"Priority": 5
},
"Status": "Init",
"OutFileMeta": {
"FileBasicInfo": {
"MediaId": "73e07de0f77171eca3fc7035d0b26402",
"FileName": "file.m3u8",
"FileStatus": "Normal",
"FileType": "source_file",
"FileSize": "31737",
"FileUrl": "http://bucket.oss-cn-shanghai.aliyuncs.com/path/to/file.m3u8",
"Region": "cn-shanghai",
"FormatName": "hls,applehttp",
"Duration": "403.039999",
"Bitrate": "888.563",
"Width": "848",
"Height": "478"
},
"AudioStreamInfoList": [
{
"Index": "1",
"CodecName": "aac",
"CodecLongName": "AAC (Advanced Audio Coding)",
"CodecTimeBase": "1/44100",
"CodecTagString": "[15][0][0][0]",
"CodecTag": "0x000f",
"SampleFmt": "fltp",
"SampleRate": "44100",
"Channels": "2",
"ChannelLayout": "stereo",
"Timebase": "1/90000",
"StartTime": "1.473556",
"Duration": "403.039989",
"Bitrate": "0.f",
"Lang": "cn"
}
],
"VideoStreamInfoList": [
{
"Index": "0",
"Codec_name": "h264",
"Codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"Profile": "High",
"Codec_time_base": "1/50",
"Codec_tag_string": "[27][0][0][0]",
"Codec_tag": "0x001b",
"Width": "848",
"Height": "478",
"Has_b_frames": "2",
"Sar": "478:477",
"Dar": "16:9",
"PixFmt": "yuv420p",
"Level": "31",
"Fps": "25.0",
"Avg_fps": "25.0",
"Time_base": "1/90000",
"Start_time": "1.473556",
"Duration": "403.039989",
"Bit_rate": "888.563",
"NumFrames": "10040",
"Lang": "cn",
"Rotate": "0"
}
]
},
"SubmitResultJson": {},
"SubmitTime": "2022-01-12T08:49:41Z",
"FinishTime": "2022-01-12T08:49:41Z",
"RequestId": "31E30781-9495-5E2D-A84D-759B0A01E262"
}
],
"CreateTime": "2022-01-12T08:49:41Z",
"Name": "transcode-job",
"RequestId": "31E30781-9495-5E2D-A84D-759B0A01E262",
"ParentJobId": "8b2198504dd340b7b3c9842a74fc9baa",
"JobCount": 1,
"Status": "Success",
"TriggerSource": "API",
"Percent": 0,
"SubmitTime": "2022-01-12T08:49:41Z",
"FinishTime": "2022-01-12T08:49:41Z",
"InputGroup": [
{
"Type": "OSS",
"Media": "oss://bucket/path/to/video.mp4"
}
],
"OutputGroup": [
{
"Output": {
"Type": "OSS",
"Media": "oss://bucket/path/to/video.mp4"
},
"ProcessConfig": {
"Transcode": {
"TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
"OverwriteParams": {
"Video": {
"Codec": "H.264",
"Profile": "Main",
"Bitrate": "3000",
"Crf": "23",
"Width": "1920",
"Height": "1080",
"Fps": "25",
"Gop": "250",
"Preset": "medium",
"ScanMode": "progressive",
"PixFmt": "yuv420p",
"Remove": "false",
"Crop": "1280:800:0:140",
"Pad": "1280:800:0:140",
"LongShortMode": "false",
"Bufsize": "6000",
"Maxrate": "9000",
"AbrMax": "6000"
},
"Audio": {
"Codec": "AAC",
"Profile": "aac_low",
"Samplerate": "44100",
"Bitrate": "128",
"Channels": "2",
"Remove": "false",
"Volume": {
"Method": "auto",
"IntegratedLoudnessTarget": "-6",
"TruePeak": "-1",
"LoudnessRangeTarget": "8"
}
},
"Container": {
"Format": "mp4"
},
"MuxConfig": {
"Segment": {
"Duration": "10",
"ForceSegTime": "2,3"
}
},
"TransConfig": {
"TransMode": "onepass",
"IsCheckReso": "true",
"IsCheckResoFail": "true",
"IsCheckVideoBitrate": "true",
"IsCheckVideoBitrateFail": "true",
"IsCheckAudioBitrate": "true",
"IsCheckAudioBitrateFail": "true",
"AdjDarMethod": "none"
}
}
},
"ImageWatermarks": [
{
"TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
"OverwriteParams": {
"Width": "32",
"Height": "32",
"Dx": "10",
"Dy": "10",
"ReferPos": "TopLeft",
"Timeline": {
"Start": "00:00:05",
"Duration": "ToEND"
},
"File": {
"Type": "OSS",
"Media": "oss://bucket/path/to/video.mp4"
}
}
}
],
"TextWatermarks": [
{
"TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
"OverwriteParams": {
"Content": "测试水印",
"FontName": "SimSun",
"FontColor": "#006400",
"FontAlpha": "1.0",
"Top": "10",
"Left": "10",
"FontSize": 16,
"BorderWidth": 0,
"BorderColor": "#006400",
"Adaptive": "false"
}
}
],
"Subtitles": [
{
"TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
"OverwriteParams": {
"Format": "vtt",
"CharEnc": "UTF-8",
"File": {
"Type": "OSS",
"Media": "oss://bucket/path/to/video.mp4"
}
}
}
],
"Encryption": {
"EncryptType": "PrivateEncryption",
"CipherText": "MTYi00NDU0LTg5O****",
"DecryptKeyUri": "https://sample.com/path?CipherText=MTYi00NDU0LTg5O****",
"KeyServiceType": "KMS"
},
"CombineConfigs": [
{
"AudioIndex": "0 或 exclude",
"VideoIndex": "0 或 exclude",
"Start": 0,
"Duration": 20
}
]
}
}
],
"UserData": "user-data",
"ScheduleConfig": {
"PipelineId": "e37ebee5d98b4781897f6086e89f9c56",
"Priority": 5
}
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.