Soumet une tâche d'analyse de modèle prédéfini.
Description de l'opération
Après avoir appelé l'opération SubmitAnalysisJob pour soumettre une tâche d'analyse de modèle prédéfini, ApsaraVideo Media Processing (MPS) analyse intelligemment le fichier d'entrée de la tâche et recommande un modèle prédéfini approprié. Vous pouvez appeler l'opération QueryAnalysisJobList pour interroger le résultat de l'analyse ou activer les notifications asynchrones pour recevoir le résultat de l'analyse.
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:SubmitAnalysisJob |
create |
*All Resource
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| Input |
string |
Oui |
Les informations d'entrée concernant la tâche d'analyse de modèle prédéfini à soumettre. La valeur doit être un objet JSON. Vous devez vous connecter à la console Object Storage Service (OSS) pour accorder à MPS les autorisations de lecture sur le bucket OSS spécifié. Pour plus d'informations, consultez la section « Input » de la rubrique Détails des paramètres. Remarque
Le bucket OSS doit se trouver dans la même région que votre service MPS. |
{"Bucket":"example-bucket","Location":"oss-cn-hangzhou","Object":"example.flv"} |
| AnalysisConfig |
string |
Non |
Les configurations de la tâche. Définissez ce paramètre selon les besoins. Pour plus d'informations, consultez la section « AnalysisConfig » de la rubrique Détails des paramètres. |
{"QualityControl":{"RateQuality":25,"MethodStreaming":"network"}} |
| UserData |
string |
Non |
Les données personnalisées. Les données personnalisées peuvent contenir des lettres, des chiffres et des traits d'union (-), et leur longueur peut atteindre 1 024 octets. Les données personnalisées ne peuvent pas commencer par un caractère spécial. |
testid-001 |
| PipelineId |
string |
Oui |
L'identifiant de la file d'attente MPS à laquelle la tâche est soumise. Pour afficher l'identifiant de la file d'attente MPS, connectez-vous à la console MPS et choisissez Paramètres globaux > Pipelines dans le volet de navigation de gauche. Si vous souhaitez activer les notifications asynchrones, assurez-vous que la file d'attente MPS est associée à un sujet Message Service (MNS). |
bb558c1cc25b45309aab5be44d19**** |
| Priority |
string |
Non |
La priorité de la tâche dans la file d'attente MPS à laquelle la tâche est soumise.
|
10 |
É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. |
B52658D4-07AB-43CD-82B0-210958A65E23 |
| AnalysisJob |
object |
Les informations relatives à la tâche d'analyse de modèle prédéfini soumise. |
|
| CreationTime |
string |
L'heure de création de la tâche. |
2014-01-10T12:00:00Z |
| Percent |
integer |
La progression du transcodage. |
100 |
| State |
string |
L'état de la tâche. Valeurs valides :
|
Success |
| AnalysisConfig |
object |
Les configurations de la tâche. |
|
| QualityControl |
object |
The quality control on the job output. |
|
| MethodStreaming |
string |
The playback mode. Valid values:
|
network |
| RateQuality |
string |
The quality level of the output file. |
50 |
| PropertiesControl |
object |
The control on the attributes of the job output. |
|
| Deinterlace |
string |
Indicates whether deinterlacing was forced to run. Valid values:
|
Force |
| Crop |
object |
The cropping configurations of video images. |
|
| Top |
string |
The top margin that was cropped out. Remarque
This parameter is invalid if the Mode parameter is set to Auto or None. |
8 |
| Width |
string |
The width of the video after the margins were cropped out. Remarque
This parameter is invalid if the Mode parameter is set to Auto or None. |
8 |
| Height |
string |
The height of the video after the margins were cropped out. Remarque
This parameter is invalid if the Mode parameter is set to Auto or None. |
8 |
| Left |
string |
The left margin that was cropped out. Remarque
This parameter is invalid if the Mode parameter is set to Auto or None. |
8 |
| Mode |
string |
The cropping mode. Valid values:
|
Auto |
| Message |
string |
Le message d'erreur renvoyé en cas d'échec de la tâche. |
La ressource sur laquelle porte l'opération \"PipelineId\" est introuvable |
| Priority |
string |
La priorité de la tâche dans la file d'attente MPS à laquelle la tâche a été soumise.
|
10 |
| MNSMessageResult |
object |
Le message envoyé par MNS pour informer les utilisateurs du résultat de la tâche. |
|
| MessageId |
string |
The ID of the message returned if the job was successful. This parameter is not returned if the job failed. |
3ca84a39a9024f19853b21be9cf9**** |
| ErrorMessage |
string |
The error message returned if the job failed. This parameter is not returned if the job was successful. |
The resource operated \"PipelineId\" cannot be found |
| ErrorCode |
string |
The error code returned if the job failed. This parameter is not returned if the job was successful. |
InvalidParameter.ResourceNotFound |
| TemplateList |
object |
||
| Template |
array<object> |
The matched preset templates. |
|
|
array<object> |
The information about the preset template. |
||
| Video |
object |
The video codec configurations. |
|
| Bufsize |
string |
The size of the buffer.
|
5000 |
| Degrain |
string |
The strength of the independent noise reduction algorithm. |
5 |
| BitrateBnd |
object |
The average bitrate range of the video. |
|
| Max |
string |
The upper limit of the total bitrate. Unit: Kbit/s. |
20 |
| Min |
string |
The lower limit of the total bitrate. Unit: Kbit/s. |
10 |
| PixFmt |
string |
The pixel format for video color encoding. Valid values: standard pixel formats such as yuv420p and yuvj420p. |
yuvj420p |
| Codec |
string |
The video codec. Default value: H.264. |
H.264 |
| Height |
string |
The height of the video.
|
1880 |
| Qscale |
string |
The level of quality control on the video. |
15 |
| Bitrate |
string |
The average bitrate of the video. Unit: Kbit/s. |
10 |
| Maxrate |
string |
The maximum bitrate of the video. Unit: Kbit/s. |
10 |
| Profile |
string |
The codec profile. Valid values:
|
baseline |
| Crf |
string |
The constant rate factor.
|
27 |
| Gop |
string |
The maximum number of frames between two keyframes. Default value: 250. |
1 |
| Width |
string |
The width of the video.
|
1990 |
| Fps |
string |
The frame rate.
|
60 |
| Preset |
string |
The preset video algorithm. Valid values: veryfast, fast, medium, slow, and slower. Default value: medium. |
medium |
| ScanMode |
string |
The scan mode. Valid values:
|
progressive |
| TransConfig |
object |
The general transcoding configurations. |
|
| TransMode |
string |
The transcoding mode. Valid values: onepass, twopass, and CBR. Default value: onepass. |
onepass |
| State |
string |
The status of the template.
|
Normal |
| MuxConfig |
object |
The transmuxing configurations. |
|
| Gif |
object |
The transmuxing configurations for the GIF format. |
|
| FinalDelay |
string |
The interval between two consecutive loops for the GIF format. Unit: 0.01s. For example, a value of 500 indicates 5 seconds. |
0 |
| Loop |
string |
The number of loops for the GIF or WebP format. Default value: 0. |
0 |
| Segment |
object |
The segment configurations. |
|
| Duration |
string |
The length of the segment. Unit: seconds. |
60 |
| Name |
string |
The name of the template. |
FLV-UD |
| Audio |
object |
The audio codec configurations. |
|
| Profile |
string |
The codec profile of the audio. Valid values if the Codec parameter is set to aac: aac_low, aac_he, aac_he_v2, aac_ld, and aac_eld. |
aac_low |
| Codec |
string |
The audio codec format. Default value: acc. |
mp3 |
| Samplerate |
string |
The sampling rate.
|
32000 |
| Qscale |
string |
The level of quality control on the audio. |
10 |
| Channels |
string |
The number of sound channels. Default value: 2. |
1 |
| Bitrate |
string |
The audio bitrate of the output file.
|
8 |
| Id |
string |
The ID of the transcoding template. |
S00000000-00**** |
| Container |
object |
The container format configurations. |
|
| Format |
string |
The container format. |
flv |
| UserData |
string |
Les données personnalisées. |
testid-001 |
| Code |
string |
Le code d'erreur renvoyé en cas d'échec de la tâche. Ce paramètre n'est pas renvoyé en cas de réussite de la tâche. |
InvalidParameter.ResourceNotFound |
| InputFile |
object |
Les informations relatives à l'entrée de la tâche. |
|
| Object |
string |
The name of the OSS object that is used as the input file. |
example.flv |
| Location |
string |
The ID of the OSS region. |
oss-cn-hangzhou |
| Bucket |
string |
The name of the OSS bucket. |
example-bucket |
| PipelineId |
string |
L'identifiant de la file d'attente MPS à laquelle la tâche d'analyse a été soumise. |
bb558c1cc25b45309aab5be44d19**** |
| Id |
string |
L'identifiant de la tâche d'analyse de modèle. |
57f6aa3f84824309bcba67231b40**** |
Exemples
JSON format
{
"RequestId": "B52658D4-07AB-43CD-82B0-210958A65E23",
"AnalysisJob": {
"CreationTime": "2014-01-10T12:00:00Z",
"Percent": 100,
"State": "Success",
"AnalysisConfig": {
"QualityControl": {
"MethodStreaming": "network",
"RateQuality": "50"
},
"PropertiesControl": {
"Deinterlace": "Force",
"Crop": {
"Top": "8",
"Width": "8",
"Height": "8",
"Left": "8",
"Mode": "Auto"
}
}
},
"Message": "The resource operated \\\"PipelineId\\\" cannot be found",
"Priority": "10",
"MNSMessageResult": {
"MessageId": "3ca84a39a9024f19853b21be9cf9****",
"ErrorMessage": "The resource operated \\\"PipelineId\\\" cannot be found",
"ErrorCode": "InvalidParameter.ResourceNotFound"
},
"TemplateList": {
"Template": [
{
"Video": {
"Bufsize": "5000",
"Degrain": "5",
"BitrateBnd": {
"Max": "20",
"Min": "10"
},
"PixFmt": "yuvj420p",
"Codec": "H.264",
"Height": "1880",
"Qscale": "15",
"Bitrate": "10",
"Maxrate": "10",
"Profile": "baseline",
"Crf": "27",
"Gop": "1",
"Width": "1990",
"Fps": "60",
"Preset": "medium",
"ScanMode": "progressive"
},
"TransConfig": {
"TransMode": "onepass"
},
"State": "Normal",
"MuxConfig": {
"Gif": {
"FinalDelay": "0",
"Loop": "0"
},
"Segment": {
"Duration": "60"
}
},
"Name": "FLV-UD",
"Audio": {
"Profile": "aac_low",
"Codec": "mp3",
"Samplerate": "32000",
"Qscale": "10",
"Channels": "1",
"Bitrate": "8"
},
"Id": "S00000000-00****",
"Container": {
"Format": "flv"
}
}
]
},
"UserData": "testid-001",
"Code": "InvalidParameter.ResourceNotFound",
"InputFile": {
"Object": "example.flv",
"Location": "oss-cn-hangzhou",
"Bucket": "example-bucket"
},
"PipelineId": "bb558c1cc25b45309aab5be44d19****",
"Id": "57f6aa3f84824309bcba67231b40****"
}
}
Codes d'erreur
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.