SubmitJobs
Submits a transcoding job. When the transcoding tasks and workflows created in the console cannot meet your business scenarios, you can call the SubmitJobs operation to perform transcoding as needed. Configure the required transcoding parameters based on your business logic.
Operation description
-
A transcoding job is an asynchronous job, and its completion time is not guaranteed. After you submit a transcoding job, the job is added to an ApsaraVideo Media Processing (MPS) queue for scheduling and execution. Therefore, when the operation returns, transcoding may not be complete. After the job completes, call the Query transcoding jobs operation to poll the execution result, or attach a Message Service (MNS) message to the MPS queue to receive the execution result. For more information, see Receive message notifications.
-
The maximum size of a single input file is 100 GB. If the size exceeds 100 GB, the job may fail.
-
To transcode an input file by using a preset intelligent template, you must first call the operation that submits a preset template analysis job (SubmitAnalysisJob). After the analysis job succeeds, you can call the operation that queries template analysis jobs (QueryAnalysisJobList) to obtain the list of available preset templates for the input file. When you submit a transcoding job, the TemplateId parameter Settings must be an available preset template ID. If the template specified in the submitted transcoding job is not in the list of available preset templates, the transcoding job fails.
-
To transcode an input file by using a preset static template, you do not need to submit a template analysis job.
-
If you need to use multiple accounts in MPS, you can create a Resource Access Management (RAM) user for your Alibaba Cloud account and grant permissions to the user. For more information, see Create a RAM user and grant permissions. If you use different Alibaba Cloud accounts to submit and query a transcoding job, the query returns no data.
-
If your account has an overdue payment, the service is paused within 24 hours after the payment becomes overdue. For more information, see Overdue payments.
-
For more frequently asked questions about transcoding, see ApsaraVideo Media Processing FAQ.
QPS limit
The single-user queries per second (QPS) limit for this operation is 100 requests per second. If you exceed this limit, API calls are throttled. This may affect your business. Call this operation as needed. For more information, see QPS limit.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mts:SubmitJobs |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Input |
string |
Yes |
The job input. For more information, see Input details. Note
|
{"Bucket":"exampleBucket","Location":"oss-cn-hangzhou","Object":"example.flv","Referer": "OSS anti-theft chain parameters set by the user in the OSS console"} |
| Outputs |
string |
Yes |
The job output configurations. For more information, see Output details.
|
[{"OutputObject":"exampleOutput.mp4","TemplateId":"6181666213ab41b9bc21da8ff5ff****","WaterMarks":[{"InputFile":{"Bucket":"exampleBucket","Location":"oss-cn-hangzhou","Object":"image_01.png"},"WaterMarkTemplateId":"9b772ce2740d4d55876d8b542d47****"}],"UserData":"testid-001"}] |
| OutputBucket |
string |
Yes |
The OSS bucket where the output file is stored.
|
exampleBucket |
| OutputLocation |
string |
No |
The region (OSS region) of the OSS bucket where the output file is stored.
|
oss-cn-hangzhou |
| PipelineId |
string |
Yes |
The ApsaraVideo Media Processing (MPS) queue ID. For more information, see Terms.
|
dd3dae411e704030b921e52698e5**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| JobResultList |
object |
||
| JobResult |
array<object> |
The list of submitted transcoding job results. |
|
|
array<object> |
The job result. |
||
| Code |
string |
The error code returned when the job fails to be created. This parameter is not returned if the job is created. |
InvalidParameter.NullValue |
| Job |
object |
The job details. If the submission fails, no job ID is generated. |
|
| Code |
string |
The error code returned when transcoding fails. This parameter is not returned if transcoding succeeds. |
InternalError |
| CreationTime |
string |
The time when the job was added. The time is displayed in UTC and follows the ISO 8601 standard in the YYYY-MM-DDTHH:mm:ssZ format. |
2014-01-10T12:00:00Z |
| FinishTime |
string |
The time when the job was completed. The time is displayed in UTC and follows the ISO 8601 standard in the YYYY-MM-DDTHH:mm:ssZ format. |
2014-01-10T12:20:00Z |
| Input |
object |
The job input. |
|
| Bucket |
string |
The OSS bucket of the job input. |
example-bucket-**** |
| Location |
string |
The OSS location of the job input. |
oss-cn-hangzhou |
| Object |
string |
The OSS object of the job input. |
example.flv |
| JobId |
string |
The job ID. |
31fa3c9ca8134f9cec2b4b0b0f78**** |
| MNSMessageResult |
object |
The message result of Message Service (MNS) notifying the user of job completion. |
|
| ErrorCode |
string |
The error code returned when the notification fails. This parameter is not returned if the notification succeeds. |
InvalidParameter.ResourceNotFound |
| ErrorMessage |
string |
The error message returned when the notification fails. This parameter is not returned if the notification succeeds. |
The resource operated "%s" cannot be found. |
| MessageId |
string |
The ID of the error message returned when the job failed due to a fault. This parameter is not returned if the job succeeds. |
123 |
| Message |
string |
The message returned when transcoding fails. This parameter is not returned if transcoding succeeds. |
The operation has failed due to some unknown error, exception or failure. |
| Output |
object |
The job output. |
|
| AmixList |
object |
||
| Amix |
array<object> |
The audio mixing list. |
|
|
object |
The job result. |
||
| AmixURL |
string |
The background audio track media to be mixed. Valid values: an OSS URL or the string |
https://outpu***.oss-cn-shanghai.aliyuncs.com/mp4-to-mp3%5E1571025263578816%40.mp3 |
| Duration |
string |
The duration. The value can be a number or a time format. |
20 |
| Map |
string |
The target audio track selected from AmixURL. The value format is 0:a:{audio_index}, such as 0:a:0. |
0:a:0 |
| MixDurMode |
string |
The media duration mode. Valid values:
|
long |
| Start |
string |
The start time. The value can be a number or a time format, such as "1:25:36.240" or "32000.23". |
0 |
| Audio |
object |
The audio configurations. Note
If audio configurations are specified in the request parameters, they override the corresponding parameters in the specified transcoding template. |
|
| Bitrate |
string |
The audio bitrate of the output file.
|
128 |
| Channels |
string |
The number of sound channels.
|
6 |
| Codec |
string |
The audio codec format.
|
aac |
| Profile |
string |
The audio encoding profile. Note
If Codec is set to aac, valid values are aac_low, aac_he, aac_he_v2, aac_ld, and aac_eld. |
aac_low |
| Qscale |
string |
The audio quality control factor. |
15 |
| Samplerate |
string |
The sampling rate.
Note
If the video container format is flv and the audio codec format is mp3, the sampling rates 32000, 48000, and 96000 are not supported. If the audio codec format is mp3, the sampling rate 96000 is not supported. |
32000 |
| Volume |
object |
The volume control settings. |
|
| Level |
string |
The volume adjustment level.
|
-20 |
| Method |
string |
The volume adjustment method. Valid values:
|
auto |
| AudioStreamMap |
string |
The audio stream index.
|
0:a:0 |
| Clip |
object |
The clip. |
|
| TimeSpan |
object |
The time span of the clip. |
|
| Duration |
string |
The duration.
|
01:00:59.999 |
| Seek |
string |
The start time.
|
01:59:59.999 |
| Container |
object |
The container. |
|
| Format |
string |
The container format.
|
flv |
| DeWatermark |
string |
The blurring settings. The value is a JSON object. For more information, see Blurring details in Parameter details. |
{"0": [{"l": 10,"t": 10,"w": 10,"h": 10},{"l": 100,"t": 0.1,"w": 10,"h": 10}],"128000": [],"250000": [{"l": 0.2,"t": 0.1,"w": 0.01,"h": 0.05}]} |
| DigiWaterMark |
object |
The digital watermarking. |
|
| Alpha |
string |
The transparency of the text or image.
|
1.0 |
| InputFile |
object |
The input file. |
|
| Bucket |
string |
The OSS bucket of the input file. |
example-bucket-**** |
| Location |
string |
The OSS location of the input file. |
oss-cn-hangzhou |
| Object |
string |
The OSS object of the input file. |
example-intput.flv |
| Type |
string |
The watermark type. If the watermark type is set, this value overrides the corresponding parameter in the watermark template. Valid values:
|
Image |
| Encryption |
object |
The data encryption settings. Only m3u8 output format is supported. |
|
| Id |
string |
The encryption ID. |
31fa3c9ca8134f9cec2b4b0b0f78**** |
| Key |
string |
The key used to encrypt the video. |
encryptionkey128 |
| KeyType |
string |
The key cannot be transmitted to ApsaraVideo Media Processing (MPS) in plaintext and must be encrypted by using Base64 or Key Management Service (KMS). For example, if the key is "encryptionkey128", use Base64("encryptionkey128") or KMS(Base64("encryptionkey128")). |
Base64 |
| KeyUri |
string |
The access URL of the key, encoded in Base64. |
https://1161758785*****.cn-shanghai.fc.aliyuncs.com/2016-08-15/proxy/HLS-decyptServer/decyptServer/ |
| SkipCnt |
string |
The number of initial segments that are not encrypted to ensure quick video playback. |
3 |
| Type |
string |
The encryption type. Valid value: hls-aes-128. |
hls-aes-128 |
| M3U8NonStandardSupport |
object |
The non-standard M3U8 support settings. The value is a JSON object. For more information, see Non-standard M3U8 parameter support details in Parameter details. |
|
| TS |
object |
The non-standard TS file support settings. The value is a JSON object. For more information, see TS parameter support details in Parameter details. |
|
| Md5Support |
boolean |
Specifies whether to support outputting the MD5 hash value of the TS file in the M3U8 file. Valid values:
|
true |
| SizeSupport |
boolean |
Specifies whether to support outputting the size of the TS file in the M3U8 file. Valid values:
|
true |
| MergeConfigUrl |
string |
You can specify only one of the MergeList and MergeConfigUrl parameters.
|
`{"MergeList":[{"MergeURL":"http://exampleBucket****.oss-cn-hangzhou.aliyuncs.com/video_01.mp4"}]} |
| MergeList |
object |
||
| Merge |
array<object> |
The video merge configurations. |
|
|
object |
The detailed video merge configurations. |
||
| Duration |
string |
The duration.
|
00000.20 |
| MergeURL |
string |
The URL of the merged segment.
|
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/example-object-****.flv |
| RoleArn |
string |
The RAM role used for authorization. |
acs:ram:: |
| Start |
string |
The start time.
|
00000.50 |
| MuxConfig |
object |
The transcoding muxing configurations. If this parameter is set in the request parameters, it overrides the corresponding parameter in the specified transcoding template. |
|
| Gif |
object |
The muxing configurations for GIF. |
|
| DitherMode |
string |
The palette color dithering method. Valid values: sierra and bayer. |
bayer |
| FinalDelay |
string |
The pause time of the final frame. Unit: centiseconds. |
0 |
| IsCustomPalette |
string |
Specifies whether to use a custom palette. Valid values:
|
false |
| Loop |
string |
The number of loops. |
0 |
| Segment |
object |
The segment configurations. The value is a JSON object. |
|
| Duration |
string |
The segment duration. The value is an integer. Unit: seconds.
|
20 |
| Webp |
object |
The muxing configurations for WebP. |
|
| Loop |
string |
The number of loops. |
0 |
| OpeningList |
object |
||
| Opening |
array<object> |
The opening list. The value is a JSON object. |
|
|
object |
The job result. |
||
| Height |
string |
The height.
|
1080 |
| Start |
string |
The start time relative to the main video. The delay before the opening video is displayed, starting from 0.
|
1 |
| Width |
string |
The width.
|
1920 |
| openUrl |
string |
The OSS URL of the opening video. |
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/opening_01.flv |
| OutSubtitleList |
object |
||
| OutSubtitle |
array<object> |
The list of output captions. |
|
|
array<object> |
The details of the output caption. |
||
| Map |
string |
The video track. Format: |
0:v:0 |
| Message |
string |
The error message returned when the job fails to be created. This parameter is not returned when the job is created successfully. |
The specified parameter “%s” cannot be null. |
| OutSubtitleFile |
object |
The details of the output file. |
|
| Bucket |
string |
The OSS bucket of the input file. |
example-bucket-**** |
| Location |
string |
The OSS location of the output file. |
oss-cn-hangzhou |
| Object |
string |
The OSS object of the output file. |
example-output.flv |
| RoleArn |
string |
The RAM role used for authorization. |
acs:ram:: |
| Success |
boolean |
Indicates whether the job is successful. Valid values:
|
true |
| OutputFile |
object |
The output file. |
|
| Bucket |
string |
The OSS bucket of the input file. |
example-bucket-**** |
| Location |
string |
The OSS location of the output file. |
oss-cn-hangzhou |
| Object |
string |
The OSS object of the output file. |
example-output.flv |
| RoleArn |
string |
The RAM role used for authorization. |
acs:ram:: |
| Priority |
string |
The priority of the job in its corresponding MPS queue.
|
5 |
| Properties |
object |
The media properties. |
|
| Bitrate |
string |
The bitrate. |
1000 |
| Duration |
string |
The duration. |
55 |
| FileFormat |
string |
The file format. |
QuickTime / MOV |
| FileSize |
string |
The file size. |
3509895 |
| Format |
object |
The format information. |
|
| Bitrate |
string |
The total bitrate. |
1000 |
| Duration |
string |
The total duration. |
55 |
| FormatLongName |
string |
The long name of the container or packaging format. |
QuickTime / MOV |
| FormatName |
string |
The short name of the container or packaging format. Valid values: mov, mp4, m4a, 3gp, 3g2, and mj2. |
mov |
| NumPrograms |
string |
The total number of program streams. |
0 |
| NumStreams |
string |
The total number of media streams. |
2 |
| Size |
string |
The file size. |
3509895 |
| StartTime |
string |
The start time. |
0.000000 |
| Fps |
string |
The frame rate, as a number. |
25 |
| Height |
string |
The video height. |
720 |
| Streams |
object |
The stream information. |
|
| AudioStreamList |
object |
||
| AudioStream |
array<object> |
The list of audio streams. |
|
|
object |
The details of the audio stream. |
||
| Bitrate |
string |
The bitrate. |
128.806 |
| ChannelLayout |
string |
The channel output layout. |
stereo |
| Channels |
string |
The number of channels. |
2 |
| CodecLongName |
string |
The long name of the encoding format. |
AAC (Advanced Audio Coding) |
| CodecName |
string |
The short name of the encoding format. |
aac |
| CodecTag |
string |
The encoding format mark. |
0x6134706d |
| CodecTagString |
string |
The encoding format mark text. |
mp4a |
| CodecTimeBase |
string |
The codec time base. |
1/44100 |
| Duration |
string |
The duration. |
17.159546 |
| Index |
string |
The index of the audio stream. This indicates the position of the audio stream in all media streams. |
1 |
| Lang |
string |
The language. For more information, see FFmpeg language definitions and ISO-639. |
eng |
| NumFrames |
string |
The total number of frames. |
25 |
| SampleFmt |
string |
The sample format. |
fltp |
| Samplerate |
string |
The sample rate. |
44100 |
| StartTime |
string |
The start time. |
0.000000 |
| Timebase |
string |
The time base. |
1/44100 |
| SubtitleStreamList |
object |
||
| SubtitleStream |
array<object> |
The list of caption streams. |
|
|
object |
The details of the caption stream. |
||
| Index |
string |
The index of the caption stream. This indicates the position of the caption stream in all media streams. |
1 |
| Lang |
string |
The language. For more information, see FFmpeg language definitions and ISO-639. |
eng |
| VideoStreamList |
object |
||
| VideoStream |
array<object> |
The list of video streams. |
|
|
array<object> |
The details of the video stream. |
||
| AvgFPS |
string |
The average frame rate. |
23.976025 |
| Bitrate |
string |
The bitrate. |
1496.46 |
| CodecLongName |
string |
The long name of the encoding format. |
H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 |
| CodecName |
string |
The short name of the encoding format. |
h264 |
| CodecTag |
string |
The encoding format mark. |
0x31637661 |
| CodecTagString |
string |
The encoding format mark text. |
avc1 |
| CodecTimeBase |
string |
The codec time base. |
1001/48000 |
| Dar |
string |
The display aspect ratio. |
16:9 |
| Duration |
string |
The duration. |
17.225542 |
| Fps |
string |
The frame rate. |
23.976025 |
| HasBFrames |
string |
Indicates whether the video contains B-frames. |
2 |
| Height |
string |
The height of the video resolution. |
720 |
| Index |
string |
The index of the video stream. This indicates the position of the video stream in all media streams. |
0 |
| Lang |
string |
The language. For more information, see FFmpeg language definitions and ISO-639. |
eng |
| Level |
string |
The encoding level. |
51 |
| NetworkCost |
object |
The network bandwidth consumption. |
|
| AvgBitrate |
string |
The average bitrate. |
100 |
| CostBandwidth |
string |
The maximum consumed bandwidth. |
10 |
| PreloadTime |
string |
The preload time. |
8 |
| NumFrames |
string |
The total number of frames. |
25 |
| PixFmt |
string |
The pixel format. |
yuv420p |
| Profile |
string |
The encoding profile. |
high |
| Sar |
string |
The sample aspect ratio. |
1:1 |
| StartTime |
string |
The start time. |
0.000000 |
| Timebase |
string |
The time base. |
1/24000 |
| Width |
string |
The width of the video resolution. The value is a number. |
1280 |
| Width |
string |
The width of the video. |
1280 |
| Rotate |
string |
The clockwise rotation angle of the video. |
180 |
| SubtitleConfig |
object |
The subtitle configuration information. |
|
| ExtSubtitleList |
object |
||
| ExtSubtitle |
array<object> |
The list of external subtitles. The value is a JSON array that contains up to 4 external subtitles. |
|
|
array<object> |
The details of the external subtitle. |
||
| CharEnc |
string |
The character encoding of the external subtitle. Valid values:
Default value: auto. Note
If you set this parameter to auto, misdetection may occur. Specify a specific character encoding. |
UTF-8 |
| FontName |
string |
The font name used when external subtitles are converted to hard subtitles. Default value: SimSun. For more information about fonts, see Font list. |
"WenQuanYi Zen Hei", "Yuanti SC Regular", "SimSun" |
| Input |
object |
The external input subtitle file. The value is a JSON object. Only srt and ass formats are supported. |
|
| Bucket |
string |
The OSS bucket where the input file is stored. |
example-bucket-**** |
| Location |
string |
The OSS region where the input file is stored. |
oss-cn-hangzhou |
| Object |
string |
The OSS object of the input file. |
example-output.flv |
| SubtitleList |
object |
||
| Subtitle |
array<object> |
The list of subtitles. |
|
|
object |
The job result. |
||
| Map |
string |
The audio track. Format: |
0:a:0 |
| SuperReso |
object |
Specifies whether the resolution follows the source. |
|
| IsHalfSample |
string |
Specifies whether to obtain sampling rate-related parameters. Valid values:
|
true |
| TailSlateList |
object |
||
| TailSlate |
array<object> |
The list of tail slates. The value is a JSON object. |
|
|
object |
The job result. |
||
| BgColor |
string |
The background color used to fill the blank space when the width and height of the tail slate video are smaller than those of the main video. Default value: White. For more valid values, see bgcolor. |
White |
| BlendDuration |
string |
The duration of the transition between the main video and the tail slate video. The transition effect is fade-in and fade-out: the last frame of the main video is displayed while the tail slate video is played. The last frame of the main video gradually darkens, and the tail slate video gradually brightens. Unit: seconds. Default value: 0. |
2 |
| Height |
string |
The height. Valid values:
Default value: -1. |
1080 |
| IsMergeAudio |
boolean |
Specifies whether to concatenate the audio content of the tail slate video. Valid values:
|
false |
| Start |
string |
The start time. |
1 |
| TailUrl |
string |
The OSS URL of the tail slate video. |
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/opening_01.flv |
| Width |
string |
The width. Valid values:
Default value: -1. |
1920 |
| TemplateId |
string |
The ID of the transcoding template. |
S00000000-000010 |
| TransConfig |
object |
The general transcoding configurations. Note
If this value is set in the request parameter, it overwrites the corresponding Settings in the specified transcoding template. |
|
| AdjDarMethod |
string |
The method used to rewrite the resolution. Default value: none. Valid values:
|
crop |
| IsCheckAudioBitrate |
string |
Specifies whether to check the audio bitrate. If the output audio bitrate is greater than the source audio bitrate, the output audio bitrate is considered equal to the source audio bitrate, and the specified audio bitrate parameter does not take effect. The priority of this parameter is lower than that of IsCheckAudioBitrateFail. Valid values:
Default values:
|
false |
| IsCheckAudioBitrateFail |
string |
Specifies whether to check the audio bitrate. The priority of this parameter is higher than that of IsCheckAudioBitrate. If the output audio bitrate is greater than the source audio bitrate, the transcoding job fails and no transcoding is performed. Valid values:
|
true |
| IsCheckReso |
string |
Specifies whether to check the resolution. If the output resolution is greater than the input resolution in width or height, the output resolution is considered equal to the input resolution. Valid values:
Default value: false. |
false |
| IsCheckResoFail |
string |
Specifies whether to check the resolution. The priority of this parameter is higher than that of IsCheckReso. If the output resolution is greater than the input resolution in width or height, the transcoding job fails and no transcoding is performed. Valid values:
Default value: false. |
false |
| IsCheckVideoBitrate |
string |
Specifies whether to check the video bitrate. If the output video bitrate is greater than the input video bitrate, the output video bitrate is considered equal to the input video bitrate. Valid values:
Default value: false. |
false |
| IsCheckVideoBitrateFail |
string |
Specifies whether to check the video bitrate. If the output video bitrate is greater than the source video bitrate, the transcoding job fails and no transcoding is performed. The priority of this parameter is higher than that of IsCheckVideoBitrate. Valid values:
Default value: false. |
true |
| TransMode |
string |
The transcoding mode. Valid values:
|
onepass |
| UserData |
string |
The custom user data. |
example data |
| Video |
object |
The video configurations. Note
If you specify this parameter, it overwrites the AliyunVideoCodec settings in the template specified by TemplateId. |
|
| Bitrate |
string |
The bitrate of the video output file. Unit: Kbps. |
10 |
| BitrateBnd |
object |
The range of the average video bitrate. |
|
| Max |
string |
The upper limit of the total bitrate. Unit: Kbps. |
20 |
| Min |
string |
The lower limit of the total bitrate. Unit: Kbps. |
10 |
| Bufsize |
string |
The buffer size.
|
1000 |
| Codec |
string |
The codec format. Valid values:
Default value: H.264. |
H.264 |
| Crf |
string |
The constant rate factor (CRF) for bitrate and quality control.
|
22 |
| Crop |
string |
The video cropping settings. Two methods are supported:
|
1280:800:0:140 |
| Degrain |
string |
The strength of the independent denoising algorithm. |
5 |
| Fps |
string |
The frame rate.
|
60 |
| Gop |
string |
The maximum time interval or maximum number of frames between keyframes. Unit: seconds.
|
1 |
| Height |
string |
The height.
|
1280 |
| MaxFps |
string |
The maximum frame rate. |
15 |
| Maxrate |
string |
The peak video bitrate. Unit: Kbps. |
10 |
| Pad |
string |
The video padding settings for black borders.
|
1280:800:0:140 |
| PixFmt |
string |
The video color format.
|
yuvj420p |
| Preset |
string |
The video algorithm preset. Default value: medium. Valid values:
|
veryfast |
| Profile |
string |
The encoding profile. This parameter is supported only for H.264. Default value: high. Valid values: Note
If you have multiple resolutions, set the lowest resolution to baseline to ensure playback on low-end devices. Set other resolutions to main or high.
|
baseline |
| Qscale |
string |
The video quality control value. |
15 |
| ResoPriority |
string |
The resource priority. |
1 |
| ScanMode |
string |
The scan mode. Valid values:
Best practices: Although interlaced scan saves more data than progressive scan, the image quality is poor. Therefore, progressive scan is widely used in mainstream video production.
|
interlaced |
| Width |
string |
The width.
|
1080 |
| VideoStreamMap |
string |
The index of the video stream.
|
0:a:0 |
| WaterMarkConfigUrl |
string |
The URL of the watermark configuration file. |
http://example.com/configure |
| WaterMarkList |
object |
||
| WaterMark |
array<object> |
The list of watermarks. Note
If the watermark output is truncated or fails, check whether the text watermark you added contains special characters. If so, escape the special characters before passing them, or submit a ticket to contact Alibaba Cloud technical support for compatibility processing. |
|
|
array<object> |
The details of the watermark. |
||
| Dx |
string |
The horizontal offset of the watermark image relative to the output video. If this value is set in the request parameter, it overwrites the corresponding Settings in the watermark template. Default value: 0. The value can be in one of the following formats:
|
1 |
| Dy |
string |
The vertical offset of the watermark image relative to the output video. If this value is set in the request parameter, it overwrites the Settings for the vertical offset of the watermark image relative to the output video in the watermark template. The value can be in one of the following formats:
|
1 |
| Height |
string |
The height of the watermark image. If this value is set in the request parameter, it overwrites the Settings for the height of the watermark image in the watermark template. The value can be in one of the following formats:
|
1280 |
| InputFile |
object |
The input file for the watermark. PNG images and MOV files are supported as input files. |
|
| Bucket |
string |
The OSS bucket of the input file. |
example-bucket |
| Location |
string |
The OSS location of the input file. |
oss-cn-hangzhou |
| Object |
string |
The OSS object of the input file. |
example-logo-****.png |
| ReferPos |
string |
The position of the watermark. If this value is set in the request parameter, it overwrites the corresponding Settings in the watermark template. Valid values:
|
TopRight |
| Type |
string |
The type of the watermark. If this parameter is set in the request parameter, this value overwrites the corresponding Settings in the watermark template. For more information, see Parameter details. Valid values:
|
Image |
| WaterMarkTemplateId |
string |
The ID of the watermark template. |
88c6ca184c0e47098a5b665e2a12**** |
| Width |
string |
The width of the watermark image. If this value is specified in the request parameters, it overwrites the width of the watermark image in the watermark template. The value can be in one of the following formats:
|
1080 |
| Percent |
integer |
The transcoding progress. |
100 |
| PipelineId |
string |
The ID of the MPS queue. |
88c6ca184c0e47098a5b665e2a126797 |
| State |
string |
The status of the job.
|
Submitted |
| Message |
string |
The error message returned when the job fails to be created. This parameter is not returned when the job is created successfully. |
The specified parameter "%s" cannot be null. |
| Success |
boolean |
Indicates whether the job is successful. Valid values:
|
true |
| RequestId |
string |
The ID of the request. |
25818875-5F78-4A45S71F6-D73936451234 |
Examples
Success response
JSON format
{
"JobResultList": {
"JobResult": [
{
"Code": "InvalidParameter.NullValue",
"Job": {
"Code": "InternalError",
"CreationTime": "2014-01-10T12:00:00Z",
"FinishTime": "2014-01-10T12:20:00Z",
"Input": {
"Bucket": "example-bucket-****",
"Location": "oss-cn-hangzhou",
"Object": "example.flv"
},
"JobId": "31fa3c9ca8134f9cec2b4b0b0f78****",
"MNSMessageResult": {
"ErrorCode": "InvalidParameter.ResourceNotFound",
"ErrorMessage": "The resource operated \"%s\" cannot be found.",
"MessageId": "123"
},
"Message": "The operation has failed due to some unknown error, exception or failure.",
"Output": {
"AmixList": {
"Amix": [
{
"AmixURL": "https://outpu***.oss-cn-shanghai.aliyuncs.com/mp4-to-mp3%5E1571025263578816%40.mp3",
"Duration": "20",
"Map": "0:a:0",
"MixDurMode": "long",
"Start": "0"
}
]
},
"Audio": {
"Bitrate": "128",
"Channels": "6",
"Codec": "aac",
"Profile": "aac_low",
"Qscale": "15",
"Samplerate": "32000",
"Volume": {
"Level": "-20",
"Method": "auto"
}
},
"AudioStreamMap": "0:a:0",
"Clip": {
"TimeSpan": {
"Duration": "01:00:59.999",
"Seek": "01:59:59.999"
}
},
"Container": {
"Format": "flv"
},
"DeWatermark": "{\"0\": [{\"l\": 10,\"t\": 10,\"w\": 10,\"h\": 10},{\"l\": 100,\"t\": 0.1,\"w\": 10,\"h\": 10}],\"128000\": [],\"250000\": [{\"l\": 0.2,\"t\": 0.1,\"w\": 0.01,\"h\": 0.05}]}",
"DigiWaterMark": {
"Alpha": "1.0",
"InputFile": {
"Bucket": "example-bucket-****",
"Location": "oss-cn-hangzhou",
"Object": "example-intput.flv"
},
"Type": "Image"
},
"Encryption": {
"Id": "31fa3c9ca8134f9cec2b4b0b0f78****",
"Key": "encryptionkey128",
"KeyType": "Base64",
"KeyUri": "https://1161758785*****.cn-shanghai.fc.aliyuncs.com/2016-08-15/proxy/HLS-decyptServer/decyptServer/",
"SkipCnt": "3",
"Type": "hls-aes-128"
},
"M3U8NonStandardSupport": {
"TS": {
"Md5Support": true,
"SizeSupport": true
}
},
"MergeConfigUrl": "`{\"MergeList\":[{\"MergeURL\":\"http://exampleBucket****.oss-cn-hangzhou.aliyuncs.com/video_01.mp4\"}]}",
"MergeList": {
"Merge": [
{
"Duration": "00000.20",
"MergeURL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/example-object-****.flv",
"RoleArn": "acs:ram:::role/",
"Start": "00000.50"
}
]
},
"MuxConfig": {
"Gif": {
"DitherMode": "bayer",
"FinalDelay": "0",
"IsCustomPalette": "false",
"Loop": "0"
},
"Segment": {
"Duration": "20"
},
"Webp": {
"Loop": "0"
}
},
"OpeningList": {
"Opening": [
{
"Height": "1080",
"Start": "1",
"Width": "1920",
"openUrl": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/opening_01.flv"
}
]
},
"OutSubtitleList": {
"OutSubtitle": [
{
"Map": "0:v:0",
"Message": "The specified parameter “%s” cannot be null.",
"OutSubtitleFile": {
"Bucket": "example-bucket-****",
"Location": "oss-cn-hangzhou",
"Object": "example-output.flv",
"RoleArn": "acs:ram:::role/"
},
"Success": true
}
]
},
"OutputFile": {
"Bucket": "example-bucket-****",
"Location": "oss-cn-hangzhou",
"Object": "example-output.flv",
"RoleArn": "acs:ram:::role/"
},
"Priority": "5",
"Properties": {
"Bitrate": "1000",
"Duration": "55",
"FileFormat": "QuickTime / MOV",
"FileSize": "3509895",
"Format": {
"Bitrate": "1000",
"Duration": "55",
"FormatLongName": "QuickTime / MOV",
"FormatName": "mov",
"NumPrograms": "0",
"NumStreams": "2",
"Size": "3509895",
"StartTime": "0.000000"
},
"Fps": "25",
"Height": "720",
"Streams": {
"AudioStreamList": {
"AudioStream": [
{
"Bitrate": "128.806",
"ChannelLayout": "stereo",
"Channels": "2",
"CodecLongName": "AAC (Advanced Audio Coding)",
"CodecName": "aac",
"CodecTag": "0x6134706d",
"CodecTagString": "mp4a",
"CodecTimeBase": "1/44100",
"Duration": "17.159546",
"Index": "1",
"Lang": "eng",
"NumFrames": "25",
"SampleFmt": "fltp",
"Samplerate": "44100",
"StartTime": "0.000000",
"Timebase": "1/44100"
}
]
},
"SubtitleStreamList": {
"SubtitleStream": [
{
"Index": "1",
"Lang": "eng"
}
]
},
"VideoStreamList": {
"VideoStream": [
{
"AvgFPS": "23.976025",
"Bitrate": "1496.46",
"CodecLongName": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"CodecName": "h264",
"CodecTag": "0x31637661",
"CodecTagString": "avc1",
"CodecTimeBase": "1001/48000",
"Dar": "16:9",
"Duration": "17.225542",
"Fps": "23.976025",
"HasBFrames": "2",
"Height": "720",
"Index": "0",
"Lang": "eng",
"Level": "51",
"NetworkCost": {
"AvgBitrate": "100",
"CostBandwidth": "10",
"PreloadTime": "8"
},
"NumFrames": "25",
"PixFmt": "yuv420p",
"Profile": "high",
"Sar": "1:1",
"StartTime": "0.000000",
"Timebase": "1/24000",
"Width": "1280"
}
]
}
},
"Width": "1280"
},
"Rotate": "180",
"SubtitleConfig": {
"ExtSubtitleList": {
"ExtSubtitle": [
{
"CharEnc": "UTF-8",
"FontName": "\"WenQuanYi Zen Hei\", \"Yuanti SC Regular\", \"SimSun\"",
"Input": {
"Bucket": "example-bucket-****",
"Location": "oss-cn-hangzhou",
"Object": "example-output.flv"
}
}
]
},
"SubtitleList": {
"Subtitle": [
{
"Map": "0:a:0"
}
]
}
},
"SuperReso": {
"IsHalfSample": "true"
},
"TailSlateList": {
"TailSlate": [
{
"BgColor": "White",
"BlendDuration": "2",
"Height": "1080",
"IsMergeAudio": false,
"Start": "1",
"TailUrl": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/opening_01.flv",
"Width": "1920"
}
]
},
"TemplateId": "S00000000-000010",
"TransConfig": {
"AdjDarMethod": "crop",
"IsCheckAudioBitrate": "false",
"IsCheckAudioBitrateFail": "true",
"IsCheckReso": "false",
"IsCheckResoFail": "false",
"IsCheckVideoBitrate": "false",
"IsCheckVideoBitrateFail": "true",
"TransMode": "onepass"
},
"UserData": "example data",
"Video": {
"Bitrate": "10",
"BitrateBnd": {
"Max": "20",
"Min": "10"
},
"Bufsize": "1000",
"Codec": "H.264",
"Crf": "22",
"Crop": "1280:800:0:140",
"Degrain": "5",
"Fps": "60",
"Gop": "1",
"Height": "1280",
"MaxFps": "15",
"Maxrate": "10",
"Pad": "1280:800:0:140",
"PixFmt": "yuvj420p",
"Preset": "veryfast",
"Profile": "baseline",
"Qscale": "15",
"ResoPriority": "1",
"ScanMode": "interlaced",
"Width": "1080"
},
"VideoStreamMap": "0:a:0",
"WaterMarkConfigUrl": "http://example.com/configure",
"WaterMarkList": {
"WaterMark": [
{
"Dx": "1",
"Dy": "1",
"Height": "1280",
"InputFile": {
"Bucket": "example-bucket",
"Location": "oss-cn-hangzhou",
"Object": "example-logo-****.png"
},
"ReferPos": "TopRight",
"Type": "Image",
"WaterMarkTemplateId": "88c6ca184c0e47098a5b665e2a12****",
"Width": "1080"
}
]
}
},
"Percent": 100,
"PipelineId": "88c6ca184c0e47098a5b665e2a126797",
"State": "Submitted"
},
"Message": "The specified parameter \"%s\" cannot be null.",
"Success": true
}
]
},
"RequestId": "25818875-5F78-4A45S71F6-D73936451234"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.