All Products
Search
Document Center

Intelligent Media Services:SubmitSnapshotJob

Last Updated:Dec 16, 2024

Submits a snapshot job.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
ice:SubmitSnapshotJob
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
NamestringNo

The name of the job.

SampleJob
InputobjectYes

The snapshot input.

TypestringYes

The type of the input file. Valid values:

  1. OSS: an Object Storage Service (OSS) object.
  2. Media: a media asset.
Media
MediastringYes

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:

  1. oss://bucket/object
  2. http(s)://bucket.oss-[RegionId].aliyuncs.com/object 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.
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
OutputobjectYes

The snapshot output.

TypestringYes

The type of the output file. Valid values:

  1. OSS: an OSS object.
  2. Media: a media asset.
OSS
MediastringYes

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:

  1. oss://bucket/object
  2. http(s)://bucket.oss-[RegionId].aliyuncs.com/object

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
TemplateConfigobjectYes

The snapshot template configuration.

TemplateIdstringYes

The template ID.

****96e8864746a0b6f3****
OverwriteParamsobjectNo

The parameters that are used to overwrite the corresponding parameters.

TypestringNo

The snapshot type. Valid values:

Sprite
FrameTypestringNo

The type of the frame.

intra
CountlongNo

The number of snapshots.

5
IntervallongNo

The interval at which snapshots are captured.

10
TimelongNo

The point in time at which the system starts to capture snapshots in the input video.

1000
WidthintegerNo

The width of a captured snapshot.

720
HeightintegerNo

The height of a captured snapshot.

480
BlackLevelintegerNo

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
PixelBlackThresholdintegerNo

The color value threshold that determines whether a pixel is black.

70
SpriteSnapshotConfigobjectNo

The configuration of the sprite snapshot.

CellWidthintegerNo

The width of a single snapshot before tiling. The default value is the width of the output snapshot.

720
CellHeightintegerNo

The height of a single snapshot before tiling. The default value is the height of the output snapshot.

480
PaddingintegerNo

The spacing between two adjacent snapshots. Default value: 0. Unit: pixels.

20
MarginintegerNo

The width of the frame. Default value: 0. Unit: pixels.

20
ColumnsintegerNo

The number of columns that the image sprite contains.

20
LinesintegerNo

The number of rows that the image sprite contains.

20
ColorstringNo

The background color.

#000000
IsSptFragbooleanNo

The WebVTT snapshot configuration that specifies whether to merge the output snapshots.

true
ScheduleConfigobjectNo

The scheduling settings.

PipelineIdstringNo

The ID of the ApsaraVideo Media Processing (MPS) queue that is used to run the job.

****96e8864746a0b6f3****
UserDatastringNo

The user-defined data.

{"test parameter": "test value"}

Response parameters

ParameterTypeDescriptionExample
object

PlainResponse

RequestIdstring

The request ID.

******11-DB8D-4A9A-875B-275798******
JobIdstring

The job ID.

****20b48fb04483915d4f2cd8ac****

Examples

Sample success responses

JSONformat

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "JobId": "****20b48fb04483915d4f2cd8ac****"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-08-10The internal configuration of the API is changed, but the call is not affectedView Change Details
2022-07-11Add OperationView Change Details