提交媒体处理任务。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用前面加 * 表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
ice:SubmitMediaConvertJob | none | *全部资源 * |
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
ClientToken | string | 否 | 幂等性校验 Key。保证请求幂等性。 | 86f8e525-9d73-4dac-88aa-7aa4e950c00a |
Config | string | 是 | 转码任务配置。 | { "Inputs": [{ "InputFile": { "Type": "OSS", "Url": "http://**.oss-cn-shanghai.aliyuncs.com/input/**/60min.mp4" } }], "Outputs": [{ "OutputFile": { "Type": "OSS", "Url": "http://**.oss-cn-shanghai.aliyuncs.com/output/**/360p.mp4" }, "TemplateId": "S00000001-200000" }, { "OutputFile": { "Type": "OSS", "Url": "http://**.oss-cn-shanghai.aliyuncs.com/output/**/720p.mp4" }, "TemplateId": "S00000001-200000" }] } |
UserData | string | 否 | 用户数据。 | {"videoId":"abcd"} |
PipelineId | string | 否 | 管道 ID 。 | e197ecfb103e4849922b054d3032f954 |
返回参数
示例
正常返回示例
JSON
格式
{
"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",
"Url": ""
}
}
],
"Outputs": [
{
"OutputFile": {
"Type": "OSS",
"Media": "http://bucket.loction.aliyuncs.com/path/to/video.mp4",
"Url": ""
},
"Priority": 6,
"OverrideParams": {},
"Features": {},
"TemplateId": "****96e8864746a0b6f3****",
"Name": "output-video"
}
],
"OutputGroups": [
{
"GroupConfig": {
"OutputFileBase": {
"Type": "OSS",
"Media": "http://bucket.loction.aliyuncs.com/path/to/video.mp4",
"Url": ""
},
"ManifestName": "manifest",
"Type": "Hls"
},
"Outputs": [
{
"Priority": 6,
"OverrideParams": {},
"Features": {},
"OutputFileName": "720p.mp4",
"TemplateId": "****96e8864746a0b6f3****\n",
"Name": "group-output"
}
],
"Name": "hls-group"
}
],
"JobName": "Name"
},
"PipelineId": "***48a4edf410b908aecd91fc3b***",
"UserData": {
"videoId": "abcd"
},
"Code": "InvalidParameter.ResourceContentBad",
"Message": "The resource operated InputFile is bad",
"State": "Success",
"OutputDetails": [
{
"Status": "Success",
"TaskId": "******4215e042b3966ca5441e******",
"Message": "The resource operated InputFile is bad\n",
"FinishTime": "2024-12-07T13:01:07Z",
"CreateTime": "2024-12-07T06:06:58Z",
"Code": "InvalidParameter.ResourceContentBad\n",
"Name": "720P-mp4",
"Result": {
"OutputFile": {
"Type": "OSS",
"Media": "oss://bucket/path/to/video.mp4\n",
"Url": "oss://bucket/path/to/video.mp4"
},
"OutFileMeta": {
"VideoStreamInfoList": [
{
"Rotate": 0,
"Codec_tag": "0x001b",
"Sar": "478:477",
"Start_time": 1.473556,
"Fps": 25,
"Index": 0,
"Duration": 403.039989,
"Lang": "cn",
"Codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"PixFmt": "yuv420p",
"Bit_rate": 888.563,
"Profile": "High",
"Has_b_frames": 2,
"Codec_time_base": "1/50",
"Dar": "16:9",
"Avg_fps": 25,
"Codec_tag_string": "[27][0][0][0]",
"Codec_name": "h264",
"Height": 478,
"Level": 31,
"Time_base": "1/90000",
"Width": 848,
"NumFrames": 10040
}
],
"AudioStreamInfoList": [
{
"CodecTag": "0x000f",
"CodecTimeBase": "1/44100",
"ChannelLayout": "stereo",
"StartTime": 1.473556,
"Index": 1,
"Duration": 403.039989,
"Lang": "cn",
"SampleFmt": "fltp",
"CodecName": "aac",
"Bitrate": "0.f",
"Channels": 2,
"Timebase": "1/90000",
"CodecTagString": "[15][0][0][0]",
"SampleRate": 44100,
"CodecLongName": "AAC (Advanced Audio Coding)"
}
],
"FileBasicInfo": {
"FileUrl": "http://bucket.oss-cn-shanghai.aliyuncs.com/path/to/file.m3u8",
"FileStatus": "Normal",
"MediaId": "9066406c306771f0bfa35107e0c90102",
"FileType": "source_file",
"FileName": "file.m3u8",
"Region": "cn-shanghai",
"FormatName": "hls,applehttp",
"Duration": 403.039999,
"Height": 478,
"Bitrate": 888.563,
"Width": 848,
"FileSize": 31737
}
}
}
}
],
"OutputGroupDetails": [
{
"Status": "Success",
"TaskId": "******22dad741d086a50325f9******",
"Message": "The resource operated \"InputFile\" is bad",
"FinishTime": "2025-03-21T01:48:41Z\n",
"CreateTime": "2025-03-21T01:48:41Z",
"Outputs": [
{
"Status": "Success",
"TaskId": "******4215e042b3966ca5441e******",
"Message": "The resource operated InputFile is bad\n",
"FinishTime": "2024-12-07T13:01:07Z",
"CreateTime": "2024-12-07T06:06:58Z",
"Code": "InvalidParameter.ResourceContentBad\n",
"Name": "720P-mp4",
"Result": {
"OutputFile": {
"Type": "OSS",
"Media": "oss://bucket/path/to/video.mp4\n",
"Url": "oss://bucket/path/to/video.mp4"
},
"OutFileMeta": {
"VideoStreamInfoList": [
{
"Rotate": 0,
"Codec_tag": "0x001b",
"Sar": "478:477",
"Start_time": 1.473556,
"Fps": 25,
"Index": 0,
"Duration": 403.039989,
"Lang": "cn",
"Codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"PixFmt": "yuv420p",
"Bit_rate": 888.563,
"Profile": "High",
"Has_b_frames": 2,
"Codec_time_base": "1/50",
"Dar": "16:9",
"Avg_fps": 25,
"Codec_tag_string": "[27][0][0][0]",
"Codec_name": "h264",
"Height": 478,
"Level": 31,
"Time_base": "1/90000",
"Width": 848,
"NumFrames": 10040
}
],
"AudioStreamInfoList": [
{
"CodecTag": "0x000f",
"CodecTimeBase": "1/44100",
"ChannelLayout": "stereo",
"StartTime": 1.473556,
"Index": 1,
"Duration": 403.039989,
"Lang": "cn",
"SampleFmt": "fltp",
"CodecName": "aac",
"Bitrate": "0.f",
"Channels": 2,
"Timebase": "1/90000",
"CodecTagString": "[15][0][0][0]",
"SampleRate": 44100,
"CodecLongName": "AAC (Advanced Audio Coding)"
}
],
"FileBasicInfo": {
"FileUrl": "http://bucket.oss-cn-shanghai.aliyuncs.com/path/to/file.m3u8",
"FileStatus": "Normal",
"MediaId": "9066406c306771f0bfa35107e0c90102",
"FileType": "source_file",
"FileName": "file.m3u8",
"Region": "cn-shanghai",
"FormatName": "hls,applehttp",
"Duration": 403.039999,
"Height": 478,
"Bitrate": 888.563,
"Width": 848,
"FileSize": 31737
}
}
}
}
],
"Code": "InvalidParameter.ResourceContentBad",
"Name": "hls-group"
}
]
}
}
错误码
访问错误中心查看更多错误码。