Call this operation to submit a video snapshot job for asynchronous processing.
Operation description
Only JPG images are supported.
After the snapshot job is complete, a SnapshotComplete event notification is generated. The event type is EventType=SnapshotComplete and the subtype is SubType=SpecifiedTime.
QPS limits
The queries per second (QPS) limit for a single user on this operation is 30 calls per second. If you exceed this limit, API calls are throttled, which may affect your business. For more information, see QPS limits.
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 ID of the video. You can obtain the video ID in one of the following ways:
|
d3e680e618708efbf2cae7cc9312**** |
| SpecifiedOffsetTime |
integer |
No |
The start time of the snapshot.
|
0 |
| Width |
string |
No |
The width of the snapshot. Valid values: |
1280 |
| Height |
string |
No |
The height of the snapshot. Valid values: |
720 |
| Count |
integer |
No |
The maximum number of snapshots. Default value: 1. |
1 |
| Interval |
integer |
No |
The interval between snapshots. The value must be greater than or equal to 0.
|
1 |
| SpriteSnapshotConfig |
string |
No |
The configurations for generating a sprite. If you specify this parameter, 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 ID of the snapshot template. You can create a snapshot template and specify its ID to configure the snapshot job. For more information about how to create a snapshot template, see AddVodTemplate.
|
f5b228fe693bf55bd87b789**** |
| UserData |
string |
No |
Custom settings. This parameter must be a JSON string. It supports custom data pass-through and webhook address settings. For more information about the parameter structure, see UserData. Note
To use the message callback feature in this parameter, configure an HTTP webhook address and select the corresponding event type 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 when you want to capture snapshots. Unit: milliseconds. You can specify up to 30 points in time. |
|
|
integer |
No |
A custom point in time. Unit: milliseconds. |
1000 |
|
| ReferenceId |
string |
No |
A custom ID. The ID can contain only lowercase letters, uppercase letters, digits, hyphens (-), and underscores (_). The ID must be 6 to 64 characters in length. The ID must be unique for each user. |
123-123 |
Specify at least one of the Count and Interval parameters. If you specify both parameters, the one that results in a smaller number of snapshots takes precedence.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The ID of the request. |
25818875-5F78-5EB0-4AF6-D7393642**** |
| SnapshotJob |
object |
The information about the snapshot job. |
|
| JobId |
string |
The ID of the snapshot job. |
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.