Submits a snapshot job.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ice:SubmitSnapshotJob | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Name | string | No | The name of the job. | SampleJob |
Input | object | Yes | The snapshot input. | |
Type | string | Yes | The type of the input file. Valid values:
| Media |
Media | string | Yes | The input file. If Type is set to OSS, the URL of an OSS object is returned. If Type is set to Media, the ID of a media asset is returned. The URL of an OSS object can be in one of the following formats:
Note
Before you use the OSS bucket in the URL, you must add the bucket on the Storage Management page of the Intelligent Media Services (IMS) console.
| oss://bucket/object.mp4 |
Output | object | Yes | The snapshot output. | |
Type | string | Yes | The type of the output file. Valid values:
| OSS |
Media | string | Yes | The output file. If Type is set to OSS, the URL of an OSS object is returned. If Type is set to Media, the ID of a media asset is returned. The URL of an OSS object can be in one of the following formats:
In the URL, bucket specifies an OSS bucket that resides in the same region as the job, and object specifies the object URL in OSS. If multiple static snapshots were captured, the object must contain the "{Count}" placeholder. In the case of a sprite, the object must contain the "{TileCount}" placeholder. The suffix of the WebVTT snapshot objects must be ".vtt". Note
Before you use the OSS bucket in the URL, you must add the bucket on the Storage Management page of the IMS console.
| oss://test-bucket/output-{Count}.jpg |
TemplateConfig | object | Yes | The snapshot template configuration. | |
TemplateId | string | Yes | The template ID. | ****96e8864746a0b6f3**** |
OverwriteParams | object | No | The parameters that are used to overwrite the corresponding parameters. | |
Type | string | No | The snapshot type. Valid values: | Sprite |
FrameType | string | No | The type of the frame. | intra |
Count | long | No | The number of snapshots. | 5 |
Interval | long | No | The interval at which snapshots are captured. | 10 |
Time | long | No | The point in time at which the system starts to capture snapshots in the input video. | 1000 |
Width | integer | No | The width of a captured snapshot. | 720 |
Height | integer | No | The height of a captured snapshot. | 480 |
BlackLevel | integer | No | The threshold that is used to filter out black frames for the first snapshot to be captured. This feature is available if you request the system to capture multiple snapshots. | 30 |
PixelBlackThreshold | integer | No | The color value threshold that determines whether a pixel is black. | 70 |
SpriteSnapshotConfig | object | No | The configuration of the sprite snapshot. | |
CellWidth | integer | No | The width of a single snapshot before tiling. The default value is the width of the output snapshot. | 720 |
CellHeight | integer | No | The height of a single snapshot before tiling. The default value is the height of the output snapshot. | 480 |
Padding | integer | No | The spacing between two adjacent snapshots. Default value: 0. Unit: pixels. | 20 |
Margin | integer | No | The width of the frame. Default value: 0. Unit: pixels. | 20 |
Columns | integer | No | The number of columns that the image sprite contains. | 20 |
Lines | integer | No | The number of rows that the image sprite contains. | 20 |
Color | string | No | The background color. | #000000 |
IsSptFrag | boolean | No | The WebVTT snapshot configuration that specifies whether to merge the output snapshots. | true |
ScheduleConfig | object | No | The scheduling settings. | |
PipelineId | string | No | The ID of the ApsaraVideo Media Processing (MPS) queue that is used to run the job. | ****96e8864746a0b6f3**** |
UserData | string | No | The user-defined data. | {"test parameter": "test value"} |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "******11-DB8D-4A9A-875B-275798******",
"JobId": "****20b48fb04483915d4f2cd8ac****"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2022-08-10 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2022-07-11 | Add Operation | View Change Details |