Soumet une tâche de capture d'instantané. Le service de traitement des médias (MPS) capture ensuite des instantanés et génère une image sprite à partir du fichier d'entrée.
Description de l'opération
La taille maximale d'un seul fichier d'entrée est de 100 Go. Le dépassement de cette limite peut entraîner l'échec de la tâche.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
mts:SubmitSnapshotJob |
create |
*All Resource
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| Input |
string |
Oui |
L'entrée de la tâche. Pour plus d'informations, consultez Input. |
{"Bucket":"example-bucket","Location":"example-location","Object":"example%2Ftest.flv"} |
| SnapshotConfig |
string |
Oui |
Les configurations d'instantané. Pour plus d'informations, consultez SnapshotConfig. |
{"OutputFile":{"Bucket":"example-001","Location":"example-location","Object":"{Count}.jpg"},"Time":"5","Num":"10","Interval":"20"} |
| UserData |
string |
Non |
Les données personnalisées. La valeur peut contenir des lettres, des chiffres et des traits d'union (-), mais ne peut pas commencer par un caractère spécial. La valeur peut comporter jusqu'à 1 024 octets. |
testid-001 |
| PipelineId |
string |
Non |
L'identifiant de la file d'attente MPS. Pour plus d'informations, consultez Concepts de base. |
dd3dae411e704030b921e52698e5**** |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
Les paramètres de réponse. |
||
| RequestId |
string |
L'identifiant de la requête. |
19B6D8C5-A5DD-467A-B435-29D393C71E2D |
| SnapshotJob |
object |
La tâche d'instantané. |
|
| CreationTime |
string |
L'heure de création de la tâche. |
2021-05-19T03:11:48Z |
| SnapshotConfig |
object |
La configuration de l'instantané. |
|
| Time |
string |
The snapshot start time. Unit: milliseconds. |
5 |
| TileOut |
object |
The tiling configuration. |
|
| Padding |
string |
The padding between images.
|
0 |
| Color |
string |
The background color.
Remarque
Color keywords can be specified in three formats. For example, to specify black, you can use |
black |
| CellSelStep |
string |
The step for selecting individual images to include in the tiled output. |
3 |
| CellHeight |
string |
The height of an individual image in the tiled output. Defaults to the height of the output snapshot. |
100 |
| CellWidth |
string |
The width of an individual image in the tiled output. Defaults to the width of the output snapshot. |
100 |
| Margin |
string |
The width of the outer margin for the tiled image.
|
5 |
| Columns |
string |
The number of columns in the tiled image. Default value: 10. |
10 |
| IsKeepCellPic |
string |
Specifies whether to keep the individual snapshots. Valid values:
|
false |
| Lines |
string |
The number of rows in the tiled image. Default value: 10. |
10 |
| Interval |
string |
The interval for capturing a sequence of snapshots.
|
20 |
| FrameType |
string |
The type of frames to capture. Default value: normal. Valid values:
Remarque
If this parameter is set to |
intra |
| Width |
string |
The width of the output snapshot. |
8 |
| Height |
string |
The height of the output snapshot. |
8 |
| OutputFile |
object |
The OSS configuration for the output snapshot. |
|
| RoleArn |
string |
The ARN of the role. Format: |
acs:ram::1:role/testrole |
| Object |
string |
The name of the output OSS object. |
test.png |
| Location |
string |
The data center of the output OSS bucket. |
example-location |
| Bucket |
string |
The OSS bucket for the output file. |
example |
| Num |
string |
The number of snapshots to capture in a sequence. |
10 |
| TileOutputFile |
object |
The OSS configuration for the output tiled image. |
|
| RoleArn |
string |
The ARN of the role. Format: |
acs:ram::1:role/testrole |
| Object |
string |
The name of the output OSS object. |
example.png |
| Location |
string |
The data center of the output OSS bucket. |
example-location |
| Bucket |
string |
The OSS bucket for the output file. |
example |
| TimeArray |
object |
||
| TimePointList |
array |
An array of time points. |
|
|
integer |
An array of up to 100 time points, in milliseconds, at which to capture snapshots. Values can be floating-point numbers with up to two decimal places. You can submit time points in any order and include duplicates; MPS automatically sorts them. If you specify this parameter, do not use the |
[10050, 50000, 110000, 1000500, 1100500] |
|
| State |
string |
L'état de la tâche d'instantané. Valeurs valides : |
Snapshoting |
| Message |
string |
Le message d'erreur. Ce paramètre n'est renvoyé que si la tâche échoue. |
The resource operated InputFile is bad |
| MNSMessageResult |
object |
Le résultat de la notification MNS envoyée à l'utilisateur à la fin de la tâche. |
|
| MessageId |
string |
The ID of the MNS message. This parameter is returned only on successful notification. |
799454621135656C7F815F198A76**** |
| ErrorMessage |
string |
The error message, returned only if the MNS notification fails. |
The resource operated InputFile is bad |
| ErrorCode |
string |
The error code, returned only if the MNS notification fails. |
InvalidParameter |
| Input |
object |
L'entrée de la tâche. |
|
| RoleArn |
string |
The ARN of the role. Format: |
acs:ram::1:role/testrole |
| Object |
string |
The name of the input OSS object. |
example.flv |
| Location |
string |
The data center of the input OSS bucket. |
example-location' |
| Bucket |
string |
The OSS bucket that contains the input file. |
example |
| Count |
string |
Le nombre total d'instantanés capturés. |
1 |
| TileCount |
string |
Le nombre d'images en mosaïque. |
5 |
| UserData |
string |
Les données définies par l'utilisateur. |
testid-001 |
| Code |
string |
Le code d'erreur. Ce paramètre n'est renvoyé que lorsque l'état de la tâche est Fail. |
ResourceContentBad |
| PipelineId |
string |
L'identifiant du pipeline. |
dd3dae411e704030b921e52698e5**** |
| Id |
string |
L'identifiant de la tâche d'instantané. |
f4e3b9ba9f3840c39d6e288056f0**** |
Exemples
JSON format
{
"RequestId": "19B6D8C5-A5DD-467A-B435-29D393C71E2D",
"SnapshotJob": {
"CreationTime": "2021-05-19T03:11:48Z",
"SnapshotConfig": {
"Time": "5",
"TileOut": {
"Padding": "0",
"Color": "black",
"CellSelStep": "3",
"CellHeight": "100",
"CellWidth": "100",
"Margin": "5",
"Columns": "10",
"IsKeepCellPic": "false",
"Lines": "10"
},
"Interval": "20",
"FrameType": "intra",
"Width": "8",
"Height": "8",
"OutputFile": {
"RoleArn": "acs:ram::1:role/testrole",
"Object": "test.png",
"Location": "example-location",
"Bucket": "example"
},
"Num": "10",
"TileOutputFile": {
"RoleArn": "acs:ram::1:role/testrole",
"Object": "example.png",
"Location": "example-location",
"Bucket": "example"
},
"TimeArray": {
"TimePointList": [
0
]
}
},
"State": "Snapshoting",
"Message": "The resource operated InputFile is bad",
"MNSMessageResult": {
"MessageId": "799454621135656C7F815F198A76****",
"ErrorMessage": "The resource operated InputFile is bad",
"ErrorCode": "InvalidParameter"
},
"Input": {
"RoleArn": "acs:ram::1:role/testrole",
"Object": "example.flv",
"Location": "example-location'",
"Bucket": "example"
},
"Count": "1",
"TileCount": "5",
"UserData": "testid-001",
"Code": "ResourceContentBad",
"PipelineId": "dd3dae411e704030b921e52698e5****",
"Id": "f4e3b9ba9f3840c39d6e288056f0****"
}
}
Codes d'erreur
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.