Consulte les fichiers multimédias par leurs URL de fichiers Object Storage Service (OSS).
Description de l'opération
Vous pouvez interroger un maximum de 10 fichiers multimédias à la fois.
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:QueryMediaListByURL |
get |
*All Resource
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| FileURLs |
string |
Oui |
Les URL des fichiers multimédias que vous souhaitez interroger. Pour obtenir l'URL d'un fichier multimédia, connectez-vous à la console MPS, choisissez Gestion des médias > Liste des médias, recherchez le fichier multimédia, puis cliquez sur Gérer dans la colonne Actions. Dans l'onglet Obtenir l'URL de transcodage, vous pouvez obtenir l'URL du fichier multimédia. Séparez plusieurs URL par des virgules (,). Vous pouvez interroger un maximum de 10 URL à la fois.
|
http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example.mp4 |
| IncludePlayList |
boolean |
Non |
Indique si les informations de lecture doivent être incluses dans la réponse.
|
true |
| IncludeSnapshotList |
boolean |
Non |
Indique si les informations sur les instantanés doivent être incluses dans la réponse.
|
true |
| IncludeMediaInfo |
boolean |
Non |
Indique si les informations sur les médias doivent être incluses dans la réponse.
|
true |
| IncludeSummaryList |
boolean |
Non |
Indique si une liste de synopsis vidéo doit être incluse dans la réponse.
|
true |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
Les paramètres renvoyés. |
||
| MediaList |
object |
||
| Media |
array<object> |
La liste des fichiers multimédias. |
|
|
array<object> |
Les détails d'un fichier multimédia. |
||
| CreationTime |
string |
The time when the media file was created. |
2021-07-14T13:05:00Z |
| CateId |
integer |
The ID of the category. |
123 |
| Height |
string |
The height of the media file. |
360 |
| CensorState |
string |
The content review state of the video. Valid values:
|
Initiated |
| Tags |
object |
||
| Tag |
array |
The tag information. |
|
|
string |
The list of tags. |
tag1,tag2 |
|
| PlayList |
object |
||
| Play |
array<object> |
The playlist. |
|
|
array<object> |
The details of a playback file. |
||
| Encryption |
string |
The encryption method. Valid values:
|
1 |
| Height |
string |
The height. |
10 |
| Bitrate |
string |
The bitrate. |
25.067 |
| File |
object |
The playback file. |
|
| State |
string |
The state of the file. Valid values:
|
Normal |
| URL |
string |
The URL of the playback file in an OSS bucket. |
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4l-test/in/1.mp4 |
| MediaWorkflowId |
string |
The ID of the workflow that generated the playback file. |
6cc3aa66d1cb4bb2adf14e726c0a**** |
| Width |
string |
The width. |
11 |
| Size |
string |
The size. |
100 |
| Fps |
string |
The frame rate. |
25.0 |
| Duration |
string |
The duration. |
7.965000 |
| ActivityName |
string |
The name of the media workflow activity. |
test name |
| Format |
string |
The encoding format. Valid values: mov, mp4, m4a, 3gp, 3g2, and mj2. |
mov |
| MediaWorkflowName |
string |
The name of the workflow that generated the playback file. |
example-mediaworkflow-**** |
| Bitrate |
string |
The bitrate. |
593.192 |
| MediaId |
string |
The media ID. |
52d7e98b05e648199612290bb819**** |
| File |
object |
The details of the input file. |
|
| State |
string |
The state of the file. Valid values:
|
Normal |
| URL |
string |
The URL of the input file in an OSS bucket. |
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4 |
| SummaryList |
object |
||
| Summary |
array<object> |
The list of video synopses. |
|
|
array<object> |
The video synopsis data. |
||
| Type |
string |
The type of the synopsis. Valid values:
|
Gif |
| MediaWorkflowId |
string |
The ID of the workflow that generated the synopsis. |
93ab850b4f6f44eab54b6e91d24d**** |
| ActivityName |
string |
The name of the media workflow activity. |
example-activity-**** |
| MediaWorkflowName |
string |
The name of the workflow that generated the synopsis. |
example-mediaworkflow-**** |
| File |
object |
The source file. |
|
| State |
string |
The state of the file. Valid values:
|
Normal |
| URL |
string |
The URL of the input file in an OSS bucket. |
http://example-bucket-****.o |
| PublishState |
string |
The publishing state of the media file. Valid values:
|
Published |
| MediaInfo |
object |
The media information. |
|
| Streams |
object |
The stream information. |
|
| VideoStreamList |
object |
||
| VideoStream |
array<object> |
The list of video streams. |
|
|
array<object> |
The video stream data. |
||
| Sar |
string |
The sample aspect ratio (SAR). |
1:1 |
| Height |
string |
The height of the video. |
360 |
| CodecTagString |
string |
The tag of the encoding format. |
avc1 |
| NetworkCost |
object |
The network bandwidth consumption. |
|
| PreloadTime |
string |
The preload time. |
0.01 |
| AvgBitrate |
string |
The average bitrate. |
2659.326 |
| CostBandwidth |
string |
The maximum bandwidth consumed. |
100 |
| Width |
string |
The width of the video. The value must be a non-negative number. |
640 |
| Index |
string |
The sequence number of the video stream. This indicates the position of the video stream in the media stream. |
5 |
| Timebase |
string |
The time base. |
1/15360 |
| AvgFPS |
string |
The average frame rate. |
15.0 |
| PixFmt |
string |
The pixel format. |
yuv420p |
| Lang |
string |
The language. For more information, see FFmpeg language definitions. |
und |
| CodecLongName |
string |
The full name of the encoding format. |
H.264/AVC/MPEG-4 AVC/MPEG-4 part 10 |
| NumFrames |
string |
The total number of frames. |
12 |
| Rotate |
string |
The rotation angle of the video. |
90 |
| Bitrate |
string |
The bitrate. |
512.701 |
| HasBFrames |
string |
Indicates whether B-frames exist. 1 means yes, and 2 means no. |
2 |
| Profile |
string |
The codec profile. |
High |
| StartTime |
string |
The start time. |
0.046029 |
| Dar |
string |
The display aspect ratio (DAR). |
16:9 |
| CodecName |
string |
The short name of the encoding format. Valid values: H264, mov, aac, avc, and mpeg. |
H264 |
| Duration |
string |
The duration. |
79.200000 |
| Fps |
string |
The frame rate. |
15.0 |
| CodecTag |
string |
The tag of the encoding format. |
0x31637661 |
| CodecTimeBase |
string |
The codec time base. |
1/30 |
| Level |
string |
The encoding level. |
31 |
| AudioStreamList |
object |
||
| AudioStream |
array<object> |
The list of audio streams. |
|
|
object |
The audio stream data. |
||
| Timebase |
string |
The time base. |
1/44100 |
| Index |
string |
The sequence number of the audio stream. This indicates the position of the audio stream in the media stream. |
1 |
| SampleFmt |
string |
The sampling format. |
fltp |
| ChannelLayout |
string |
The layout of the sound channels. |
stereo |
| Lang |
string |
The language. For more information, see FFmpeg language definitions. |
und |
| Samplerate |
string |
The sample rate. |
44100 |
| CodecLongName |
string |
The full name of the encoding format. |
AAC (Advanced Audio Coding) |
| Channels |
string |
The number of sound channels. |
2 |
| NumFrames |
string |
The total number of frames. |
100 |
| Bitrate |
string |
The bitrate. |
76.356 |
| CodecTagString |
string |
The tag of the encoding format. |
mp4a |
| StartTime |
string |
The start time. |
0.000000 |
| CodecName |
string |
The short name of the encoding format. Valid values: H264, mov, aac, avc, and mpeg. |
aac |
| Duration |
string |
The duration. |
79.203265 |
| CodecTag |
string |
The tag of the encoding format. |
0x6134706d |
| CodecTimeBase |
string |
The codec time base. |
1/44100 |
| SubtitleStreamList |
object |
||
| SubtitleStream |
array<object> |
The list of caption streams. |
|
|
object |
The caption stream data. |
||
| Index |
string |
The sequence number of the caption stream. This indicates the position of the caption stream in the media stream. |
1 |
| Lang |
string |
The language. For more information, see FFmpeg language definitions. |
und |
| Format |
object |
The format information. |
|
| StartTime |
string |
The start time. |
0.000000 |
| NumPrograms |
string |
The total number of program streams. |
0 |
| Size |
string |
The size. |
5872904 |
| NumStreams |
string |
The total number of media streams. |
2 |
| FormatLongName |
string |
The full name of the encoding format. |
QuickTime/MOV |
| Duration |
string |
The duration. |
79.204000 |
| Bitrate |
string |
The bitrate. |
593.192 |
| FormatName |
string |
The short name of the container format. Valid values: mov, mp4, m4a, 3gp, 3g2, and mj2. |
mov |
| Description |
string |
The description. |
This is description **** |
| Size |
string |
The file size. |
5872904 |
| Width |
string |
The width. |
640 |
| CoverURL |
string |
The URL of the thumbnail in an OSS bucket. |
http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png |
| SnapshotList |
object |
||
| Snapshot |
array<object> |
The list of snapshots. |
|
|
array<object> |
The details of a snapshot file. |
||
| Type |
string |
The type of the snapshot. Valid values:
|
Single |
| MediaWorkflowId |
string |
The ID of the workflow that generated the snapshot file. |
6cc3aa66d1cb4bb2adf14e726c0a**** |
| ActivityName |
string |
The name of the workflow activity that generated the snapshot file. |
example-activity1-**** |
| Count |
string |
The number of snapshots. This parameter is valid only when Type is set to Sequence. |
3 |
| MediaWorkflowName |
string |
The name of the workflow that generated the snapshot file. |
example-workflow-**** |
| File |
object |
The snapshot file. |
|
| State |
string |
The state of the file. Valid values:
|
Normal |
| URL |
string |
The URL of the snapshot file in an OSS bucket. |
http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png |
| RunIdList |
object |
||
| RunId |
array |
The list of media workflows. |
|
|
string |
The list of media workflow IDs. |
9343bd0e7bb54ae19228529908e5**** |
|
| Duration |
string |
The duration. |
79.204000 |
| Fps |
string |
The frame rate. |
15.0 |
| Title |
string |
The title. |
kled.mp4 |
| Format |
string |
The encoding format. Valid values: mov, mp4, m4a, 3gp, 3g2, and mj2. |
mov |
| NonExistFileURLs |
object |
||
| FileURL |
array |
Les informations sur les fichiers multimédias qui n'existent pas. |
|
|
string |
Les URL des fichiers multimédias qui n'existent pas. Ce paramètre n'est pas renvoyé si aucune donnée n'est disponible. |
null |
|
| RequestId |
string |
L'identifiant de la requête. |
1C8A0AEB-4321-485B-B4CB-DA4E9E6C9B42 |
Exemples
JSON format
{
"MediaList": {
"Media": [
{
"CreationTime": "2021-07-14T13:05:00Z",
"CateId": 123,
"Height": "360",
"CensorState": "Initiated",
"Tags": {
"Tag": [
"tag1,tag2"
]
},
"PlayList": {
"Play": [
{
"Encryption": "1",
"Height": "10",
"Bitrate": "25.067",
"File": {
"State": "Normal",
"URL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4l-test/in/1.mp4"
},
"MediaWorkflowId": "6cc3aa66d1cb4bb2adf14e726c0a****",
"Width": "11",
"Size": "100",
"Fps": "25.0",
"Duration": "7.965000",
"ActivityName": "test name",
"Format": "mov",
"MediaWorkflowName": "example-mediaworkflow-****"
}
]
},
"Bitrate": "593.192",
"MediaId": "52d7e98b05e648199612290bb819****",
"File": {
"State": "Normal",
"URL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4"
},
"SummaryList": {
"Summary": [
{
"Type": "Gif",
"MediaWorkflowId": "93ab850b4f6f44eab54b6e91d24d****",
"ActivityName": "example-activity-****",
"MediaWorkflowName": "example-mediaworkflow-****",
"File": {
"State": "Normal",
"URL": "http://example-bucket-****.o"
}
}
]
},
"PublishState": "Published",
"MediaInfo": {
"Streams": {
"VideoStreamList": {
"VideoStream": [
{
"Sar": "1:1",
"Height": "360",
"CodecTagString": "avc1",
"NetworkCost": {
"PreloadTime": "0.01",
"AvgBitrate": "2659.326",
"CostBandwidth": "100"
},
"Width": "640",
"Index": "5",
"Timebase": "1/15360",
"AvgFPS": "15.0",
"PixFmt": "yuv420p",
"Lang": "und",
"CodecLongName": "H.264/AVC/MPEG-4 AVC/MPEG-4 part 10",
"NumFrames": "12",
"Rotate": "90",
"Bitrate": "512.701",
"HasBFrames": "2",
"Profile": "High",
"StartTime": "0.046029",
"Dar": "16:9",
"CodecName": "H264",
"Duration": "79.200000",
"Fps": "15.0",
"CodecTag": "0x31637661",
"CodecTimeBase": "1/30",
"Level": "31"
}
]
},
"AudioStreamList": {
"AudioStream": [
{
"Timebase": "1/44100",
"Index": "1",
"SampleFmt": "fltp",
"ChannelLayout": "stereo",
"Lang": "und",
"Samplerate": "44100",
"CodecLongName": "AAC (Advanced Audio Coding)",
"Channels": "2",
"NumFrames": "100",
"Bitrate": "76.356",
"CodecTagString": "mp4a",
"StartTime": "0.000000",
"CodecName": "aac",
"Duration": "79.203265",
"CodecTag": "0x6134706d",
"CodecTimeBase": "1/44100"
}
]
},
"SubtitleStreamList": {
"SubtitleStream": [
{
"Index": "1",
"Lang": "und"
}
]
}
},
"Format": {
"StartTime": "0.000000",
"NumPrograms": "0",
"Size": "5872904",
"NumStreams": "2",
"FormatLongName": "QuickTime/MOV",
"Duration": "79.204000",
"Bitrate": "593.192",
"FormatName": "mov"
}
},
"Description": "This is description ****",
"Size": "5872904",
"Width": "640",
"CoverURL": "http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png",
"SnapshotList": {
"Snapshot": [
{
"Type": "Single",
"MediaWorkflowId": "6cc3aa66d1cb4bb2adf14e726c0a****",
"ActivityName": "example-activity1-****",
"Count": "3",
"MediaWorkflowName": "example-workflow-****",
"File": {
"State": "Normal",
"URL": "http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png"
}
}
]
},
"RunIdList": {
"RunId": [
"9343bd0e7bb54ae19228529908e5****"
]
},
"Duration": "79.204000",
"Fps": "15.0",
"Title": "kled.mp4",
"Format": "mov"
}
]
},
"NonExistFileURLs": {
"FileURL": [
"null"
]
},
"RequestId": "1C8A0AEB-4321-485B-B4CB-DA4E9E6C9B42"
}
Codes d'erreur
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.