Call this operation to submit a snapshot job to asynchronously capture snapshots from a video.
Operation description
This is an asynchronous API. After you submit a job, a job ID is returned. The job is then queued for asynchronous processing. The final result is sent via a callback notification. You can also call the GetTask operation to query the job status.
Currently, only snapshots in JPG format are supported.
When a snapshot job is complete, the system generates a SnapshotComplete event notification with
EventType=SnapshotCompleteandSubType=SpecifiedTime.
QPS limit
This operation has a limit of 30 queries per second (QPS) per user. The system subjects calls that exceed this limit to rate limiting, which may impact your business. Plan your calls accordingly. 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 ID of the video. You can obtain the video ID in one of the following ways:
|
d3e680e618708efbf2cae7cc9312**** |
| SpecifiedOffsetTime |
integer |
No |
The start time for capturing the snapshot.
|
0 |
| Width |
string |
No |
The width of the snapshot, in pixels (px). Valid values: |
1280 |
| Height |
string |
No |
The height of the snapshot, in pixels (px). Valid values: |
720 |
| Count |
integer |
No |
The number of snapshots to capture. Default value: 1. |
1 |
| Interval |
integer |
No |
The interval for capturing snapshots. The value must be greater than or equal to 0.
|
1 |
| SpriteSnapshotConfig |
string |
No |
The configuration for generating a sprite. If you specify this parameter, the system generates a sprite. 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.
|
f5b228fe693bf55bd87b789**** |
| UserData |
string |
No |
Custom settings in JSON format. This parameter allows you to pass custom user data and specify a callback URL. For more information about the parameter structure, see UserData. Note
To use the message callback feature, you must first configure an HTTP callback URL and select the corresponding event types in the console. Otherwise, the callback settings will not take effect. |
{"MessageCallback":{"CallbackURL":"http://.example.aliyundoc.com"},"Extend":{"localId":"xxx","example":"www"}} |
| SpecifiedOffsetTimes |
array |
No |
An array of specific time points in the video to capture snapshots. Unit: milliseconds. You can specify up to 30 time points. |
|
|
integer |
No |
A specific time point, in milliseconds. |
1000 |
|
| ReferenceId |
string |
No |
A custom ID that can contain lowercase letters, uppercase letters, digits, hyphens (-), and underscores (_). The ID must be 6 to 64 characters long and unique per user. |
123-123 |
You must specify at least one of Count or Interval. If you specify both, the system uses the parameter that results in fewer snapshots.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
25818875-5F78-5EB0-4AF6-D7393642**** |
| SnapshotJob |
object |
Information about the snapshot job. |
|
| 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.