This API submits a snapshot job. Specify a media file by its ID or URL, a time point, and the desired format. The API then generates the snapshot and saves it to the specified location.
Operation description
This is an asynchronous interface. Submitting a task returns a task ID and queues it for asynchronous processing. A callback delivers the final result. Alternatively, you can check the task status by querying screenshot task details.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:SubmitSnapshotJob |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
No |
The name of the snapshot job. |
SampleJob |
| Input |
object |
Yes |
The input for the snapshot job. |
|
| Type |
string |
Yes |
The type of the input. Valid values:
|
Media |
| Media |
string |
Yes |
The input media asset.
The OSS URL must be in one of the following formats:
Note
The OSS bucket specified in the URL must be added to IMS storage management before use. |
oss://bucket/object.mp4 |
| Output |
object |
Yes |
The output destination for the snapshot job. |
|
| Type |
string |
Yes |
The type of the output. Valid values:
|
OSS |
| Media |
string |
Yes |
The output media asset.
The OSS URL must be in one of the following formats:
In these formats,
Note
The OSS bucket specified in the URL must be added to IMS storage management before use. |
oss://test-bucket/output-{Count}.jpg |
| TemplateConfig |
object |
Yes |
The snapshot template configuration. |
|
| TemplateId |
string |
Yes |
The snapshot template ID. |
****96e8864746a0b6f3**** |
| OverwriteParams |
object |
No |
Parameters used to override settings in the specified template. |
|
| Type |
string |
No |
The snapshot type. |
Sprite |
| FrameType |
string |
No |
The frame type. |
intra |
| Count |
integer |
No |
The number of snapshots to capture. |
5 |
| Interval |
integer |
No |
The interval between snapshots. |
10 |
| Time |
integer |
No |
The start time for capturing snapshots. |
1000 |
| Width |
integer |
No |
The output image width. |
720 |
| Height |
integer |
No |
The output image height. |
480 |
| BlackLevel |
integer |
No |
The threshold for detecting and filtering black content in the first frame. This applies only to multi-frame snapshots. |
30 |
| PixelBlackThreshold |
integer |
No |
The threshold for determining whether a pixel is black. |
70 |
| SpriteSnapshotConfig |
object |
No |
The sprite configuration. |
|
| CellWidth |
integer |
No |
The width of each tile. Default: the width of the output snapshot. |
720 |
| CellHeight |
integer |
No |
The height of each tile. Default: the height of the output snapshot. |
480 |
| Padding |
integer |
No |
The padding between tiles, in pixels. Default value: 0. |
20 |
| Margin |
integer |
No |
The margin around the sprite, in pixels. Default value: 0. |
20 |
| Columns |
integer |
No |
The number of columns in the sprite grid. |
20 |
| Lines |
integer |
No |
The number of rows in the sprite grid. |
20 |
| Color |
string |
No |
The background color. |
#000000 |
| IsSptFrag |
boolean |
No |
Specifies whether to stitch snapshots into a single sprite. This applies only to WebVTT snapshots. |
true |
| ScheduleConfig |
object |
No |
The scheduling configuration. |
|
| PipelineId |
string |
No |
The pipeline ID. |
****96e8864746a0b6f3**** |
| UserData |
string |
No |
Custom user data, passed as a JSON-formatted string. |
{"test parameter": "test value"} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| RequestId |
string |
A unique identifier for the request. |
******11-DB8D-4A9A-875B-275798****** |
| JobId |
string |
The ID of the submitted job. |
****20b48fb04483915d4f2cd8ac**** |
Examples
Success response
JSON format
{
"RequestId": "******11-DB8D-4A9A-875B-275798******",
"JobId": "****20b48fb04483915d4f2cd8ac****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.