Soumet une tâche d'analyse des informations multimédias. Après avoir appelé cette opération, ApsaraVideo Media Processing (MPS) analyse les informations multimédias du fichier d'entrée et renvoie les résultats.
Description de l'opération
Assurez-vous que le fichier est chargé dans OSS avant de soumettre une tâche d'analyse des informations multimédias. Dans le cas contraire, la tâche échoue. Vous pouvez utiliser les messages de rappel OSS pour confirmer l'état du chargement.
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:SubmitMediaInfoJob |
create |
*All Resource
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| Input |
string |
Oui |
Entrée de la tâche. Pour plus d'informations, consultez Détails de l'entrée. Remarque
|
{"Bucket":"example-bucket","Location":"example-location","Object":"example%2Fexample.flv"} |
| UserData |
string |
Non |
Données définies par l'utilisateur. Vous pouvez utiliser des lettres, des chiffres et des traits d'union (-). Elles ne peuvent pas commencer par un caractère spécial. Longueur maximale : 1024 octets. |
testid-001 |
| PipelineId |
string |
Non |
Identifiant du pipeline. Pour plus d'informations, consultez Termes.
|
88c6ca184c0e432bbf5b665e2a15**** |
| Async |
boolean |
Non |
Indique si le travail doit être exécuté de manière asynchrone. Valeurs valides :
|
true |
| Config |
string |
Non |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
Paramètres de réponse. |
||
| MediaInfoJob |
object |
Informations détaillées sur la tâche d'analyse des informations multimédias. |
|
| CreationTime |
string |
Heure à laquelle la tâche a été soumise. |
2014-01-10T12:00:00Z |
| State |
string |
État de la tâche.
|
Analyzing |
| JobId |
string |
Identifiant de la tâche d'analyse des informations multimédias. |
23ca1d184c0e4341e5b665e2a12**** |
| UserData |
string |
Données définies par l'utilisateur. |
testid-001 |
| Code |
string |
Code d'erreur en cas d'échec de la tâche. |
InvalidParameter.JsonObjectFormatInvalid |
| Message |
string |
Message d'erreur en cas d'échec de la tâche. |
Le paramètre « * » n'est pas conforme à la spécification JSON Object |
| PipelineId |
string |
Identifiant du pipeline. |
88c6ca184c0e432bbf5b665e2a15**** |
| Async |
boolean |
Indique si la tâche s'exécute de manière asynchrone. |
true |
| Input |
object |
Informations d'entrée de la tâche. |
|
| Object |
string |
OSS object of the input file. |
example.flv |
| Location |
string |
Region of the OSS bucket. |
example-location |
| Bucket |
string |
OSS bucket of the input file. |
example-bucket |
| MNSMessageResult |
object |
Résultat de la notification MNS pour l'achèvement de la tâche. |
|
| MessageId |
string |
Message ID if the job succeeds. This parameter is not returned if the job fails. |
16f01ad6175e4230ac42bb5182cd**** |
| ErrorMessage |
string |
Error message if the job fails. This parameter is not returned if the job succeeds. |
InvalidParameter.JsonObjectFormatInvalid |
| ErrorCode |
string |
Error code if the job fails. This parameter is not returned if the job succeeds. |
The parameter \"Input\" does not conform to the JSON Object specification |
| Properties |
object |
Propriétés du fichier multimédia. |
|
| Width |
string |
Video width, in pixels (px). |
1920 |
| Height |
string |
Video height, in pixels (px). |
1080 |
| Duration |
string |
Total duration, in seconds (s). |
17.226000 |
| Fps |
string |
Frame rate. |
25 |
| Bitrate |
string |
Bitrate, in Kbps. |
1630.045 |
| FileFormat |
string |
File format. |
QuickTime/MOV |
| Streams |
object |
Stream information. |
|
| VideoStreamList |
object |
||
| VideoStream |
array<object> |
Video stream list. Maximum: 4 items. |
|
|
array<object> |
Response parameters. |
||
| Sar |
string |
Sample aspect ratio. |
1:1 |
| Height |
string |
Video height, in pixels (px). |
1080 |
| CodecTagString |
string |
Codec tag string. |
avc1 |
| NetworkCost |
object |
Network bandwidth consumption. |
|
| PreloadTime |
string |
Preload time. |
8 |
| AvgBitrate |
string |
Average bitrate, in Kbps. |
300.34 |
| CostBandwidth |
string |
Maximum bandwidth consumption. |
10 |
| Width |
string |
Video width, in pixels (px). |
1920 |
| Index |
string |
Video stream index. Identifies the position of the video stream in the media file. Some players let you specify which video stream to start playback from. Others start from index 1 by default. |
1 |
| Timebase |
string |
Time base. |
1/24000 |
| AvgFPS |
string |
Average frame rate. |
23.976025 |
| PixFmt |
string |
Pixel format. |
yuv420p |
| Lang |
string |
Language. |
eng |
| CodecLongName |
string |
Codec long name. |
H.264/AVC/MPEG-4 AVC/MPEG-4 part 10 |
| NumFrames |
string |
Total number of frames. |
100 |
| Rotate |
string |
Video rotation angle, in degrees. |
90 |
| Bitrate |
string |
Bitrate, in Kbps. |
1496.46 |
| HasBFrames |
string |
Whether B-frames exist. 0 means no. 1 means yes. |
0 |
| Profile |
string |
Codec profile. |
High |
| StartTime |
string |
Start time. |
0.042000 |
| Dar |
string |
Display aspect ratio. Dar = video width / video height. Use this value to determine whether the video is landscape or portrait. |
16:9 |
| CodecName |
string |
Codec short name. Valid values:
|
h264 |
| Duration |
string |
Duration, in seconds (s). |
17.225542 |
| Fps |
string |
Frame rate. |
25 |
| CodecTag |
string |
Codec tag. |
0x31637661 |
| CodecTimeBase |
string |
Codec time base. |
1001/48000 |
| Level |
string |
Codec level. |
41 |
| ColorRange |
string |
Color range. |
700 |
| ColorTransfer |
string |
Color transfer. |
R255 G83 B170 |
| ColorPrimaries |
string |
Color primaries. |
700 |
| DurationInaccurate |
string |
||
| DolbyVision |
object |
||
| Profile |
string |
||
| Level |
string |
||
| AudioStreamList |
object |
||
| AudioStream |
array<object> |
Audio stream list. Maximum: 4 items. |
|
|
object |
Response parameters. |
||
| Timebase |
string |
Time base. |
1/44100 |
| Index |
string |
Audio stream index. Identifies the position of the audio stream in the media file. |
1 |
| SampleFmt |
string |
Sample format. |
fltp |
| ChannelLayout |
string |
Channel layout. |
stereo |
| Lang |
string |
Language. |
eng |
| Samplerate |
string |
Sample rate, in Hz. |
44100 |
| CodecLongName |
string |
Codec long name. |
AAC (Advanced Audio Coding) |
| Channels |
string |
Number of sound channels. |
2 |
| NumFrames |
string |
Total number of frames. |
123 |
| Bitrate |
string |
Bitrate, in Kbps. |
128.806 |
| CodecTagString |
string |
Codec tag string. |
mp4a |
| StartTime |
string |
Start time. |
0.000000 |
| CodecName |
string |
Codec short name. Default value: aac. Valid values:
|
aac |
| Duration |
string |
Duration, in seconds (s). |
17.159546 |
| CodecTag |
string |
Codec tag. |
0x6134706d |
| CodecTimeBase |
string |
Codec time base. |
1/44100 |
| DurationInaccurate |
string |
||
| SubtitleStreamList |
object |
||
| SubtitleStream |
array<object> |
Subtitle stream list. Maximum: 4 items. |
|
|
object |
Response parameters. |
||
| Timebase |
string |
Time base. |
1/1000 |
| Index |
string |
Subtitle stream index. Identifies the position of the subtitle stream in the media file. |
3 |
| StartTime |
string |
Start time. |
0.000000 |
| CodecName |
string |
Codec short name. Valid values:
|
ass |
| Lang |
string |
Language. |
eng |
| CodecLongName |
string |
Codec long name. |
ASS (Advanced SSA) subtitle |
| Duration |
string |
Duration, in seconds (s). |
1370.116000 |
| CodecTag |
string |
Codec tag. |
0x0000 |
| CodecTimeBase |
string |
Codec time base. |
0/1 |
| CodecTagString |
string |
Codec tag string. |
[0][0][0][0] |
| Format |
object |
Format information. |
|
| StartTime |
string |
Start time. |
0.000000 |
| NumPrograms |
string |
Total number of program streams. |
0 |
| Size |
string |
File size, in bytes. |
3509895 |
| NumStreams |
string |
Total number of media streams. |
2 |
| FormatLongName |
string |
Container or wrapper format long name. |
QuickTime/MOV |
| Duration |
string |
Total duration, in seconds (s). |
17.226000 |
| Bitrate |
string |
Total bitrate, in Kbps. |
1630.045 |
| FormatName |
string |
Container or wrapper format short name. For more information, see Parameter details. |
mov |
| Tags |
object |
||
| FileSize |
string |
File size, in bytes. |
3509895 |
| MD5 |
string |
||
| RequestId |
string |
Identifiant de la requête. |
62D9BE16-B7D5-550C-A482-7A0F60E09877 |
Exemples
JSON format
{
"MediaInfoJob": {
"CreationTime": "2014-01-10T12:00:00Z",
"State": "Analyzing",
"JobId": "23ca1d184c0e4341e5b665e2a12****",
"UserData": "testid-001",
"Code": "InvalidParameter.JsonObjectFormatInvalid",
"Message": "The parameter ”*” does not conform to the JSON Object specification",
"PipelineId": "88c6ca184c0e432bbf5b665e2a15****",
"Async": true,
"Input": {
"Object": "example.flv",
"Location": "example-location",
"Bucket": "example-bucket"
},
"MNSMessageResult": {
"MessageId": "16f01ad6175e4230ac42bb5182cd****",
"ErrorMessage": "InvalidParameter.JsonObjectFormatInvalid",
"ErrorCode": "The parameter \\\"Input\\\" does not conform to the JSON Object specification"
},
"Properties": {
"Width": "1920",
"Height": "1080",
"Duration": "17.226000",
"Fps": "25",
"Bitrate": "1630.045",
"FileFormat": "QuickTime/MOV",
"Streams": {
"VideoStreamList": {
"VideoStream": [
{
"Sar": "1:1",
"Height": "1080",
"CodecTagString": "avc1",
"NetworkCost": {
"PreloadTime": "8",
"AvgBitrate": "300.34",
"CostBandwidth": "10"
},
"Width": "1920",
"Index": "1",
"Timebase": "1/24000",
"AvgFPS": "23.976025",
"PixFmt": "yuv420p",
"Lang": "eng",
"CodecLongName": "H.264/AVC/MPEG-4 AVC/MPEG-4 part 10",
"NumFrames": "100",
"Rotate": "90",
"Bitrate": "1496.46",
"HasBFrames": "0",
"Profile": "High",
"StartTime": "0.042000",
"Dar": "16:9",
"CodecName": "h264",
"Duration": "17.225542",
"Fps": "25",
"CodecTag": "0x31637661",
"CodecTimeBase": "1001/48000",
"Level": "41",
"ColorRange": "700",
"ColorTransfer": "R255 G83 B170",
"ColorPrimaries": "700",
"DurationInaccurate": "",
"DolbyVision": {
"Profile": "",
"Level": ""
}
}
]
},
"AudioStreamList": {
"AudioStream": [
{
"Timebase": "1/44100",
"Index": "1",
"SampleFmt": "fltp",
"ChannelLayout": "stereo",
"Lang": "eng",
"Samplerate": "44100",
"CodecLongName": "AAC (Advanced Audio Coding)",
"Channels": "2",
"NumFrames": "123",
"Bitrate": "128.806",
"CodecTagString": "mp4a",
"StartTime": "0.000000",
"CodecName": "aac",
"Duration": "17.159546",
"CodecTag": "0x6134706d",
"CodecTimeBase": "1/44100",
"DurationInaccurate": ""
}
]
},
"SubtitleStreamList": {
"SubtitleStream": [
{
"Timebase": "1/1000",
"Index": "3",
"StartTime": "0.000000",
"CodecName": "ass",
"Lang": "eng",
"CodecLongName": "ASS (Advanced SSA) subtitle",
"Duration": "1370.116000",
"CodecTag": "0x0000",
"CodecTimeBase": "0/1",
"CodecTagString": "[0][0][0][0]"
}
]
}
},
"Format": {
"StartTime": "0.000000",
"NumPrograms": "0",
"Size": "3509895",
"NumStreams": "2",
"FormatLongName": "QuickTime/MOV",
"Duration": "17.226000",
"Bitrate": "1630.045",
"FormatName": "mov",
"Tags": {
"test": "test",
"test2": 1
}
},
"FileSize": "3509895",
"MD5": ""
}
},
"RequestId": "62D9BE16-B7D5-550C-A482-7A0F60E09877"
}
Codes d'erreur
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.