提交截图作业。调用本接口之后媒体处理MPS会对输入文件进行截图和拼图。
接口说明
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
mts:SubmitSnapshotJob |
create |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Input |
string |
是 |
作业输入。详细说明请参见 Input 详情。 说明
|
{"Bucket":"example-bucket","Location":"example-location","Object":"example%2Ftest.flv"} |
| SnapshotConfig |
string |
是 |
截图配置。详细说明,请参见 SnapshotConfig 参数详情。 |
{"OutputFile":{"Bucket":"example-001","Location":"example-location","Object":"{Count}.jpg"},"Time":"5","Num":"10","Interval":"20"} |
| UserData |
string |
否 |
用户自定义数据。支持中英文、数字、短划线(-),不能以特殊字符开头,最大长度 1024 个字节。 |
testid-001 |
| PipelineId |
string |
否 |
管道 ID,详细说明,请参见基本概念。 |
dd3dae411e704030b921e52698e5**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回参数。 |
||
| RequestId |
string |
请求 ID。 |
19B6D8C5-A5DD-467A-B435-29D393C71E2D |
| SnapshotJob |
object |
截图作业。 |
|
| CreationTime |
string |
任务创建时间。 |
2021-05-19T03:11:48Z |
| SnapshotConfig |
object |
截图配置。 |
|
| Time |
string |
截图开始时间。单位:毫秒。 |
5 |
| TileOut |
object |
拼图配置。 |
|
| Padding |
string |
图片间距。
|
0 |
| Color |
string |
背景颜色。
说明
其中颜色关键字支持三种格式,比如黑色,支持 Black,black,#000000。 |
black |
| CellSelStep |
string |
选取单图片步长。 |
3 |
| CellHeight |
string |
单图片高度。默认截图输出分辨率高度。 |
100 |
| CellWidth |
string |
单图片宽度。默认截图输出分辨率宽度。 |
100 |
| Margin |
string |
外框宽度。
|
5 |
| Columns |
string |
图片拼合列数。默认:10。 |
10 |
| IsKeepCellPic |
string |
是否保留单图片。可取值:
|
false |
| Lines |
string |
图片拼合行数。默认:10。 |
10 |
| Interval |
string |
截图间隔时间。
|
20 |
| FrameType |
string |
截图类型。默认值:normal。可取值:
说明
如果请求参数中将 FrameType 参数设置为 I 帧(关键帧),将只截取关键帧。如果指定的时间节点为非关键帧,则就近选取关键帧。在同等截图规则下,关键帧截图比普通帧截图速度快。 |
intra |
| Width |
string |
截图输出图片宽度。 |
8 |
| Height |
string |
截图输出图片高度。 |
8 |
| OutputFile |
object |
截图输出 OSS 配置。 |
|
| RoleArn |
string |
指定角色的 ARN。格式:acs:ram::$accountID:role/$roleName。 |
acs:ram::1:role/testrole |
| Object |
string |
截图输出文件(OSS Object)。 |
test.png |
| Location |
string |
截图输出 OSS Bucket 所在数据中心(OSS Location)。 |
example-location |
| Bucket |
string |
截图输出文件所在 OSS Bucket。 |
example |
| Num |
string |
截图数量。若指定则表示序列截图。 |
10 |
| TileOutputFile |
object |
拼图任务大图的输出 OSS 配置。 |
|
| RoleArn |
string |
指定角色的 ARN。格式:acs:ram::$accountID:role/$roleName。 |
acs:ram::1:role/testrole |
| Object |
string |
输出文件 (OSS Object)。 |
example.png |
| Location |
string |
输出 OSS Bucket 所在数据中心(OSS Location)。 |
example-location |
| Bucket |
string |
输出文件所在 OSS Bucket。 |
example |
| TimeArray |
object |
||
| TimePointList |
array |
指定时间点数组。 |
|
|
integer |
指定时间点数组。单位毫秒,浮点数,保留 2 位小数,可重复,可无序提交,由 MPS 排序。最多 100 个时间点。指定该参数时,Num、Time、Interval 均不指定。如指定则提示参数指定错误 InvalidParameter.Ambiguity。 |
[10050, 50000, 110000, 1000500, 1100500] |
|
| State |
string |
截图状态。取值:
|
Snapshoting |
| Message |
string |
分析失败时错误信息。若成功则不返回此参数。 |
The resource operated InputFile is bad |
| MNSMessageResult |
object |
MNS 通知用户作业完成的结果。 |
|
| MessageId |
string |
成功时消息 ID。若失败则不返回此参数。 |
799454621135656C7F815F198A76**** |
| ErrorMessage |
string |
失败时错误信息。若成功则不返回此参数。 |
The resource operated InputFile is bad |
| ErrorCode |
string |
失败时错误码。若成功则不返回此参数。 |
InvalidParameter |
| Input |
object |
作业输入。 |
|
| RoleArn |
string |
指定角色的 ARN。格式:acs:ram::$accountID:role/$roleName。 |
acs:ram::1:role/testrole |
| Object |
string |
输入文件(OSS Object)。 |
example.flv |
| Location |
string |
输入 OSS Bucket 所在数据中心(OSS Location)。 |
example-location' |
| Bucket |
string |
输入文件所在 OSS Bucket。 |
example |
| Count |
string |
截取图片的数量。 |
1 |
| TileCount |
string |
拼图图片数量。 |
5 |
| UserData |
string |
用户自定义数据。 |
testid-001 |
| Code |
string |
分析失败时错误码。若成功则不返回此参数。 |
ResourceContentBad |
| PipelineId |
string |
管道 ID。 |
dd3dae411e704030b921e52698e5**** |
| Id |
string |
截图作业 ID。 |
f4e3b9ba9f3840c39d6e288056f0**** |
示例
正常返回示例
JSON格式
{
"RequestId": "19B6D8C5-A5DD-467A-B435-29D393C71E2D",
"SnapshotJob": {
"CreationTime": "2021-05-19T03:11:48Z",
"SnapshotConfig": {
"Time": "5",
"TileOut": {
"Padding": "0",
"Color": "black",
"CellSelStep": "3",
"CellHeight": "100",
"CellWidth": "100",
"Margin": "5",
"Columns": "10",
"IsKeepCellPic": "false",
"Lines": "10"
},
"Interval": "20",
"FrameType": "intra",
"Width": "8",
"Height": "8",
"OutputFile": {
"RoleArn": "acs:ram::1:role/testrole",
"Object": "test.png",
"Location": "example-location",
"Bucket": "example"
},
"Num": "10",
"TileOutputFile": {
"RoleArn": "acs:ram::1:role/testrole",
"Object": "example.png",
"Location": "example-location",
"Bucket": "example"
},
"TimeArray": {
"TimePointList": [
0
]
}
},
"State": "Snapshoting",
"Message": "The resource operated InputFile is bad",
"MNSMessageResult": {
"MessageId": "799454621135656C7F815F198A76****",
"ErrorMessage": "The resource operated InputFile is bad",
"ErrorCode": "InvalidParameter"
},
"Input": {
"RoleArn": "acs:ram::1:role/testrole",
"Object": "example.flv",
"Location": "example-location'",
"Bucket": "example"
},
"Count": "1",
"TileCount": "5",
"UserData": "testid-001",
"Code": "ResourceContentBad",
"PipelineId": "dd3dae411e704030b921e52698e5****",
"Id": "f4e3b9ba9f3840c39d6e288056f0****"
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。