Submits a video snapshot job to start asynchronous snapshot processing.
Operation description
This is an asynchronous operation. After you submit a task, the task ID is returned (the task is not yet complete and enters a queue for asynchronous execution). The final result is sent through a callback notification. You can also proactively query the task status by calling Get task details.
Only JPG images are supported.
When the snapshot is complete, an event notification of Video snapshot complete with EventType=SnapshotComplete and SubType=SpecifiedTime is sent.
QPS limit
The QPS limit for a single user on this operation is 30 calls per second. If this limit is exceeded, the API call is throttled, which may affect your business. Call this operation appropriately. For more information, see QPS limit.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vod:SubmitSnapshotJob |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| VideoId |
string |
No |
The video ID. You can obtain the video ID by using one of the following methods:
|
d3e680e618708efbf2cae7cc9312**** |
| SpecifiedOffsetTime |
integer |
No |
The start time for the snapshot.
|
0 |
| Width |
string |
No |
The snapshot width. Valid values: |
1280 |
| Height |
string |
No |
The snapshot height. Valid values: |
720 |
| Count |
integer |
No |
The maximum number of snapshots. Default value: 1. |
1 |
| Interval |
integer |
No |
The snapshot interval. The value must be greater than or equal to 0.
|
1 |
| SpriteSnapshotConfig |
string |
No |
The sprite configuration. If this parameter is not empty, a sprite is generated. For more information about the parameter structure, see SpriteSnapshotConfig. |
{'CellWidth': 120, 'CellHeight': 68, 'Columns': 3,'Lines': 10, 'Padding': 20, 'Margin': 50} |
| SnapshotTemplateId |
string |
No |
The snapshot template ID.
|
f5b228fe693bf55bd87b789**** |
| UserData |
string |
No |
The custom settings. Only JSON strings are supported. You can use this parameter to pass through custom data and specify callback URL settings. For more information about the parameter structure, see UserData. Note
To use the message callback in this parameter, configure the HTTP callback URL and select the corresponding callback event types in the console. Otherwise, the callback settings do not take effect. |
{"MessageCallback":{"CallbackURL":"http://.example.aliyundoc.com"},"Extend":{"localId":"xxx","example":"www"}} |
| SpecifiedOffsetTimes |
array |
No |
The points in time at which snapshots are captured. Unit: milliseconds. You can specify up to 30 points in time at a time. |
|
|
integer |
No |
The custom point in time. Unit: milliseconds. |
1000 |
|
| ReferenceId |
string |
No |
The custom ID. Only lowercase letters, uppercase letters, digits, hyphens, and underscores are supported. Length: 6 to 64 characters. The value must be unique at the user level. |
123-123 |
You must specify at least one of Count and Interval. If both are specified, the smaller number of snapshots prevails.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
25818875-5F78-5EB0-4AF6-D7393642**** |
| SnapshotJob |
object |
The snapshot job information. |
|
| JobId |
string |
The snapshot job ID. |
ad90a501b1b94b72374ad0050464**** |
Examples
Success response
JSON format
{
"RequestId": "25818875-5F78-5EB0-4AF6-D7393642****",
"SnapshotJob": {
"JobId": "ad90a501b1b94b72374ad0050464****"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.