Bir medya işleme görevi gönderir.
Operation description
Bu bir eşzamansız işlemdir. Bir görev gönderdikten sonra bir görev kimliği döndürülür. Görev bu noktada henüz tamamlanmamıştır ve arka planda eşzamansız yürütme için bir kuyruğa girer. Nihai sonuç bir geri çağırma bildirimi aracılığıyla iletilir. Ayrıca Medya kod dönüştürme görevini sorgula işlevini çağırarak görev durumunu doğrudan sorgulayabilirsiniz.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:SubmitMediaConvertJob |
none |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClientToken |
string |
No |
İdempotans anahtarı. İsteğin idempotansını sağlar. |
86f8e525-9d73-4dac-88aa-7aa4e950c00a |
| Config |
string |
Yes |
Kod dönüştürme görevi yapılandırması. Daha fazla bilgi için MediaConvertJobConfig belgesine bakın. |
{ "Inputs": [ { "InputFile": { "Type": "OSS", "Media": "http://**.oss-cn-shanghai.aliyuncs.com/input/**/60min.mp4" } } ], "OutputGroups": [ { "GroupConfig": { "Type": "File", "OutputFileBase": { "Type": "OSS", "Media": "http://**.oss-cn-shanghai.aliyuncs.com/output/**/" } }, "Outputs": [ { "OutputFile": "hd.mp4", "TemplateId": "S00000001-200030" }, { "OutputFile": "sd.mp4", "TemplateId": "S00000001-200020" } ] } ] } |
| UserData |
string |
No |
Kullanıcı verileri. |
{"videoId":"abcd"} |
| PipelineId |
string |
No |
İşlem hattı kimliği. |
e197ecfb103e4849922b054d3032f954 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Medya kod dönüştürme görevi gönderme işleminin sonucu. |
||
| RequestId |
string |
İstek kimliği. |
******11-DB8D-4A9A-875B-275798****** |
| Job |
object |
Medya kod dönüştürme görevi. |
|
| RequestId |
string |
İstek kimliği. |
A2129C9F-CE95-58B5-B8C1-07758FF6C86F |
| ClientToken |
string |
Medya kod dönüştürme görevi oluşturma isteği için idempotans parametresi. |
FB7F25E9-AD9B-1603-8AF6-F1E42DF2E706 |
| JobId |
string |
Medya kod dönüştürme görevi kimliği. |
****20b48fb04483915d4f2cd8ac**** |
| Config |
object |
Medya kod dönüştürme görevi yapılandırması. |
|
| Inputs |
array |
Medya kod dönüştürme görevi giriş listesi. |
|
| MediaConvertInput |
Medya kod dönüştürme görevi girişi. |
[{\"Src\":{\"Type\":\"MAP_SERVICE\",\"DataId\":\"479f6c63f66dcc1a9a09420fee32cbdf\",\"ZoomLevel\":18},\"Idx\":1}] |
|
| Outputs |
array |
Medya kod dönüştürme çıkış yapılandırması listesi. |
|
| MediaConvertOutput |
Medya kod dönüştürme görevi çıkış yapılandırması. |
[] |
|
| OutputGroups |
array |
Medya kod dönüştürme görevi çıkış grubu yapılandırması listesi. |
|
| MediaConvertOutputGroup |
Medya kod dönüştürme görevi çıkış grubu yapılandırması. |
||
| JobName |
string |
Görev adı. |
Name |
| PipelineId |
string |
İşlem hattı kimliği. |
***48a4edf410b908aecd91fc3b*** |
| UserData |
string |
Kullanıcı verileri. |
{"videoId":"abcd"} |
| Code |
string |
Medya kod dönüştürme görevi başarısız olduğunda döndürülen hata kodu. |
InvalidParameter.ResourceContentBad |
| Message |
string |
Medya kod dönüştürme görevi başarısız olduğunda döndürülen ayrıntılı hata mesajı. |
The resource operated InputFile is bad |
| State |
string |
Medya kod dönüştürme görevi durumu. Geçerli değerler:
|
Success |
| OutputDetails |
array |
Medya kod dönüştürme çıkış sonucu listesi. |
|
| MediaConvertOutputDetail |
Medya kod dönüştürme çıkış sonucu. |
||
| OutputGroupDetails |
array |
Medya kod dönüştürme çıkış grubu sonucu listesi. |
|
| MediaConvertOutputGroupDetail |
Medya kod dönüştürme çıkış grubu sonucu. |
Examples
Success response
JSON format
{
"RequestId": "******11-DB8D-4A9A-875B-275798******",
"Job": {
"RequestId": "A2129C9F-CE95-58B5-B8C1-07758FF6C86F",
"ClientToken": "FB7F25E9-AD9B-1603-8AF6-F1E42DF2E706",
"JobId": "****20b48fb04483915d4f2cd8ac****",
"Config": {
"Inputs": [
{
"Name": "InputVideo",
"InputFile": {
"Type": "OSS",
"Media": "http://bucket.loction.aliyuncs.com/path/to/video.mp4"
}
}
],
"Outputs": [
{
"Name": "output-video",
"OutputFile": {
"Type": "OSS",
"Media": "http://bucket.loction.aliyuncs.com/path/to/video.mp4"
},
"TemplateId": "****96e8864746a0b6f3****",
"Priority": 6,
"Features": "{}",
"OverrideParams": "{}"
}
],
"OutputGroups": [
{
"Name": "hls-group",
"GroupConfig": {
"ManifestName": "manifest",
"Type": "Hls",
"OutputFileBase": {
"Type": "OSS",
"Media": "http://bucket.loction.aliyuncs.com/path/to/video.mp4"
}
},
"Outputs": [
{
"Name": "group-output",
"OutputFileName": "720p.mp4",
"TemplateId": "****96e8864746a0b6f3****\n",
"Priority": 6,
"Features": "{}",
"OverrideParams": "{}"
}
]
}
],
"JobName": "Name"
},
"PipelineId": "***48a4edf410b908aecd91fc3b***",
"UserData": "{\"videoId\":\"abcd\"}",
"Code": "InvalidParameter.ResourceContentBad",
"Message": "The resource operated InputFile is bad",
"State": "Success",
"OutputDetails": [
{
"Name": "720P-mp4",
"TaskId": "******4215e042b3966ca5441e******",
"Status": "Success",
"Code": "InvalidParameter.ResourceContentBad\n",
"Message": "The resource operated InputFile is bad\n",
"Result": {
"OutputFile": {
"Type": "OSS",
"Media": "oss://bucket/path/to/video.mp4\n",
"Url": "oss://bucket/path/to/video.mp4"
},
"OutFileMeta": {
"FileBasicInfo": {
"MediaId": "9066406c306771f0bfa35107e0c90102",
"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"
}
]
}
},
"CreateTime": "2024-12-07T06:06:58Z",
"FinishTime": "2024-12-07T13:01:07Z"
}
],
"OutputGroupDetails": [
{
"Name": "hls-group",
"TaskId": "******22dad741d086a50325f9******",
"Code": "InvalidParameter.ResourceContentBad",
"Message": "The resource operated \"InputFile\" is bad",
"Status": "Success",
"Outputs": [
{
"Name": "720P-mp4",
"TaskId": "******4215e042b3966ca5441e******",
"Status": "Success",
"Code": "InvalidParameter.ResourceContentBad\n",
"Message": "The resource operated InputFile is bad\n",
"Result": {
"OutputFile": {
"Type": "OSS",
"Media": "oss://bucket/path/to/video.mp4\n",
"Url": "oss://bucket/path/to/video.mp4"
},
"OutFileMeta": {
"FileBasicInfo": {
"MediaId": "9066406c306771f0bfa35107e0c90102",
"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"
}
]
}
},
"CreateTime": "2024-12-07T06:06:58Z",
"FinishTime": "2024-12-07T13:01:07Z"
}
],
"CreateTime": "2025-03-21T01:48:41Z",
"FinishTime": "2025-03-21T01:48:41Z\n"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.