通过转码作业ID,批量查询转码作业。
接口说明
- 本接口一次最多查询 10 个转码作业。
- 如果不传入 JobIds,则会返回
InvalidParameter
(参数无效)错误码。
QPS 限制
本接口的单用户 QPS 限制为 100 次/秒。超过限制,API 调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见 QPS 限制。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
mts:QueryJobList | get | *全部资源 * |
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
JobIds | string | 否 | bb558c1cc25b45309aab5be44d19****,d1ce4d3efcb549419193f50f1fcd**** |
返回参数
回调消息格式定义
当转码任务执行状态改变时,mps 会发送消息到用户指定的 queue 中(如何指定回调 queue 详见 mps 的更新管道接口)。消息体是一个 JSON 字符串,包含字段如下:
{
"Type": "Transcode",
"State": "Success",
"JobId": "39f8e0bc005e4f309379701645f4****",
"UserData": "{\"key\":\"value\"}",
"RequestId": "25818875-5F78-4A13-BEF6-D7393642****"
}
名称 | 类型 | 描述 |
---|---|---|
Type | String | 固定字符串“Transcode”,表示转码任务。 |
JobId | String | 任务唯一 ID。 |
State | String | 任务当前状态,与 QueryJobList 中的 State 一致。 |
UserData | String | 用户在 SubmitJobs 中传入的 UserData。 |
示例
正常返回示例
JSON
格式
{
"NonExistJobIds": {
"String": [
"d1ce4d3efcb549419193f50f1fcd****"
]
},
"RequestId": "197ADF44-104C-514C-9F92-D8924CB34E2A",
"JobList": {
"Job": [
{
"CreationTime": "2014-01-10T12:00:00Z",
"Percent": 100,
"FinishTime": "2014-01-10T12:20:25Z",
"State": "TranscodeSuccess",
"JobId": "31fa3c9ca8134fb4b0b0f7878301****",
"Code": "InvalidParameter.NullValue",
"Message": "The specified parameter \"%s\" cannot be null.",
"Output": {
"Video": {
"Bufsize": "6000",
"Degrain": "5",
"BitrateBnd": {
"Max": "1000",
"Min": "300"
},
"PixFmt": "yuv420p",
"Pad": "1280:800:0:140",
"Codec": "H.264",
"Height": "720",
"Qscale": "15",
"Crop": "1280:800:0:140",
"Bitrate": "500",
"Maxrate": "3000",
"MaxFps": "60",
"Profile": "high",
"Crf": "26",
"Gop": "250",
"Width": "1280",
"Fps": "25",
"Preset": "medium",
"ScanMode": "interlaced",
"ResoPriority": "1"
},
"TransConfig": {
"IsCheckAudioBitrate": "false",
"TransMode": "onepass",
"IsCheckReso": "false",
"IsCheckVideoBitrateFail": "false",
"AdjDarMethod": "none",
"IsCheckVideoBitrate": "false",
"IsCheckResoFail": "false",
"IsCheckAudioBitrateFail": "false"
},
"Encryption": {
"Type": "hls-aes-128",
"Key": "encryptionkey128",
"KeyType": "Base64",
"Id": "31fa3c9ca8134f9cec2b4b0b0f78****",
"KeyUri": "https://1161758785*****.cn-shanghai.fc.aliyuncs.com/2016-08-15/proxy/HLS-decyptServer/decyptServer/",
"SkipCnt": "3"
},
"WaterMarkList": {
"WaterMark": [
{
"Type": "Image",
"ReferPos": "TopRight",
"Dx": "100",
"Width": "50",
"Height": "50",
"InputFile": {
"Object": "example-logo-****.png",
"Location": "oss-cn-hangzhou",
"Bucket": "example-bucket"
},
"WaterMarkTemplateId": "88c6ca184c0e47098a5b665e2a12****",
"Dy": "100"
}
]
},
"WaterMarkConfigUrl": "http://example.com/configure",
"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}]}",
"M3U8NonStandardSupport": {
"TS": {
"SizeSupport": true,
"Md5Support": true
}
},
"Priority": "6",
"Audio": {
"Profile": "aaclow",
"Codec": "aac",
"Samplerate": "44100",
"Qscale": "15",
"Channels": "2",
"Volume": {
"Method": "auto",
"Level": "-20"
},
"Bitrate": "128"
},
"AudioStreamMap": "0:a:0",
"MergeList": {
"Merge": [
{
"Start": "01:59:59.999",
"RoleArn": "acs:ram::<your uid>:role/<your role name>",
"MergeURL": "http://example-bucket.oss-cn-hangzhou.aliyuncs.com/example-object.flv",
"Duration": "01:59:59.999"
}
]
},
"SuperReso": {
"IsHalfSample": "true"
},
"UserData": "testid-001",
"ExtendData": "testid-002",
"OutSubtitleList": {
"OutSubtitle": [
{
"Map": "0:v:0",
"OutSubtitleFile": {
"RoleArn": "acs:ram::<your uid>:role/<your role name>",
"Object": "example.flv",
"Location": "oss-cn-hangzhou",
"Bucket": "exampleBucket"
},
"Success": true,
"Message": "The specified parameter “%s” cannot be null."
}
]
},
"VideoStreamMap": "0",
"OutputFile": {
"RoleArn": "acs:ram::<your uid>:role/<your role name>",
"Object": "example-output.flv",
"Location": "oss-cn-hangzhou",
"Bucket": "example-bucket"
},
"Rotate": "90",
"Container": {
"Format": "mp4"
},
"Clip": {
"TimeSpan": {
"Seek": "01:59:59.999",
"Duration": "01:00:59.999"
}
},
"MergeConfigUrl": "https://ceshi-***.oss-cn-shanghai.aliyuncs.com/ccc/p0903q9wkkb.m3u8",
"OpeningList": {
"Opening": [
{
"openUrl": "http://example.oss-cn-shanghai.aliyuncs.com/t5.mp4",
"Start": "0",
"Width": "-1",
"Height": "-1"
}
]
},
"MuxConfig": {
"Webp": {
"Loop": "0"
},
"Gif": {
"FinalDelay": "0",
"DitherMode": "bayer",
"Loop": "0",
"IsCustomPalette": "false"
},
"Segment": {
"Duration": "20"
}
},
"TailSlateList": {
"TailSlate": [
{
"Start": "00000.00",
"BgColor": "White",
"IsMergeAudio": true,
"Width": "-1",
"Height": "-1",
"BlendDuration": "0",
"TailUrl": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/opening_01.flv"
}
]
},
"TemplateId": "S00000001-200010",
"SubtitleConfig": {
"ExtSubtitleList": {
"ExtSubtitle": [
{
"CharEnc": "auto",
"FontName": "\"WenQuanYi Zen Hei\", \"Yuanti SC Regular\", \"SimSun\"",
"Input": {
"Object": "example-output.flv",
"Location": "oss-cn-hangzhou",
"Bucket": "example-bucket-****"
}
}
]
},
"SubtitleList": {
"Subtitle": [
{
"Map": "0:a:0"
}
]
}
},
"Properties": {
"Width": "720",
"Height": "1280",
"SourceLogos": {
"SourceLogo": [
{
"Source": "example"
}
]
},
"Duration": "17",
"Fps": "30",
"Bitrate": "490",
"FileFormat": "mp4",
"Streams": {
"VideoStreamList": {
"VideoStream": [
{
"Index": "0",
"Timebase": "1/15360",
"AvgFPS": "30.0",
"PixFmt": "yuv420p",
"Sar": "1:1",
"Lang": "eng",
"CodecLongName": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"Height": "1280",
"NumFrames": "30",
"Bitrate": "421.117",
"CodecTagString": "avc1",
"HasBFrames": "2",
"Profile": "high",
"StartTime": "0.000000",
"NetworkCost": {
"PreloadTime": "8",
"AvgBitrate": "300",
"CostBandwidth": "10"
},
"Dar": "9:16",
"CodecName": "h264",
"Width": "720",
"Duration": "17.233333",
"Fps": "30.0",
"CodecTag": "0x31637661",
"CodecTimeBase": "1/60",
"Level": "31",
"colorTransfer": "bt709",
"colorPrimaries": "bt709",
"bitsPerRawSample": "8"
}
]
},
"AudioStreamList": {
"AudioStream": [
{
"Timebase": "1/32000",
"Index": "1",
"SampleFmt": "fltp",
"ChannelLayout": "mono",
"Lang": "und",
"Samplerate": "32000",
"CodecLongName": "AAC (Advanced Audio Coding)",
"Channels": "1",
"NumFrames": "50",
"Bitrate": "64.136",
"CodecTagString": "mp4",
"StartTime": "0.064000",
"CodecName": "aac",
"Duration": "17.223562",
"CodecTag": "0x6134706d",
"CodecTimeBase": "1/32000"
}
]
},
"SubtitleStreamList": {
"SubtitleStream": [
{
"Index": "1",
"Lang": "eng"
}
]
}
},
"Format": {
"StartTime": "-0.064000",
"NumPrograms": "0",
"Size": "1057273",
"NumStreams": "2",
"FormatLongName": "QuickTime / MOV",
"Duration": "17.234000",
"Bitrate": "490.784",
"FormatName": "mov"
},
"FileSize": "1057273"
},
"MultiSpeedInfo": {
"Enable": "true",
"Code": "Boost.NotNeedSpeed",
"Message": "success",
"SettingSpeed": 30,
"DowngradePolicy": "NormalSpeed",
"RealSpeed": 6.576886940181647,
"Duration": 21,
"TimeCost": 3.193
}
},
"PipelineId": "88c6ca184c0e47b665e2a1267971****",
"Input": {
"Object": "video_01.mp4",
"Location": "oss-cn-shanghai",
"Bucket": "exampleBucket"
},
"MNSMessageResult": {
"MessageId": "123",
"ErrorMessage": "The resource operated “%s” cannot be found.",
"ErrorCode": "InvalidParameter.ResourceNotFound"
},
"SubmitTime": "2021-03-04T06:44:43Z"
}
]
}
}
错误码
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|---|---|
2023-09-21 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-08-03 | OpenAPI 描述信息更新、OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-06-13 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-06-13 | OpenAPI 入参发生变更 | 查看变更详情 |