Menanyakan file media berdasarkan URL file Object Storage Service (OSS).
Deskripsi operasi
-
Anda dapat melakukan kueri maksimal 10 file media sekaligus.
-
Sebelum memanggil operasi ini, Anda harus memanggil operasi AddMedia untuk menambahkan file media. Setelah itu, Anda dapat memanggil operasi ini untuk melakukan kueri informasi media.
-
Operasi ini hanya dapat melakukan kueri informasi tentang file yang telah diproses oleh alur kerja. Untuk file media yang baru diunggah, informasi yang dikembalikan oleh operasi ini akan lengkap hanya setelah alur kerja dieksekusi. Untuk mengambil informasi tentang video yang belum diproses oleh alur kerja, Anda harus memanggil operasi SubmitMediaInfoJob untuk mengirimkan tugas analisis informasi media.
Batasan QPS
Batas queries per second (QPS) untuk operasi ini adalah 100 per pengguna. Pembatasan (throttling) akan dipicu jika batas terlampaui, yang dapat memengaruhi bisnis Anda. Rencanakan panggilan Anda sesuai dengan itu. Untuk informasi selengkapnya, lihat Batasan QPS.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mts:QueryMediaListByURL |
get |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| FileURLs |
string |
Yes |
URL file media yang ingin Anda kueri. Untuk mendapatkan URL file media, masuk ke konsol MPS, pilih Media Management > Media List, temukan file media, lalu klik Manage di kolom Actions. Pada tab Get Transcoding URL, Anda dapat memperoleh URL file media. Pisahkan beberapa URL dengan koma (,). Anda dapat melakukan kueri maksimal 10 URL sekaligus.
|
http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example.mp4 |
| IncludePlayList |
boolean |
No |
Menentukan apakah informasi pemutaran disertakan dalam respons.
|
true |
| IncludeSnapshotList |
boolean |
No |
Menentukan apakah informasi snapshot disertakan dalam respons.
|
true |
| IncludeMediaInfo |
boolean |
No |
Menentukan apakah informasi media disertakan dalam respons.
|
true |
| IncludeSummaryList |
boolean |
No |
Menentukan apakah daftar sinopsis video disertakan dalam respons.
|
true |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Parameter yang dikembalikan. |
||
| MediaList |
object |
||
| Media |
array<object> |
Daftar file media. |
|
|
array<object> |
Detail file media. |
||
| CreationTime |
string |
The time when the media file was created. |
2021-07-14T13:05:00Z |
| CateId |
integer |
The ID of the category to which the media file belongs. |
123 |
| Height |
string |
The height of the queried media file. |
360 |
| CensorState |
string |
The review status of the media file. Valid values:
|
Initiated |
| Tags |
object |
||
| Tag |
array |
The tags of the media file. |
|
|
string |
tag1,tag2 |
||
| PlayList |
object |
||
| Play |
array<object> |
The playlist. |
|
|
array<object> |
|||
| Encryption |
string |
Indicates whether the media file is encrypted. Valid values:
|
1 |
| Height |
string |
The height of the media file. |
10 |
| Bitrate |
string |
The bitrate of the media file. |
25.067 |
| File |
object |
The playback file. |
|
| State |
string |
The status of the media file. Valid values:
|
Normal |
| URL |
string |
The OSS URL of the playback file. |
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4l-test/in/1.mp4 |
| MediaWorkflowId |
string |
The ID of the workflow that generates 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 workflow activity. |
test name |
| Format |
string |
The encoding format of the media file. Valid values: mov, mp4, m4a, 3gp, 3g2, and mj2. |
mov |
| MediaWorkflowName |
string |
The name of the workflow that generates the playback file. |
example-mediaworkflow-**** |
| Bitrate |
string |
The bitrate. |
593.192 |
| MediaId |
string |
The ID of the media file. |
52d7e98b05e648199612290bb819**** |
| File |
object |
The details of the input file. |
|
| State |
string |
The status of the media file. Valid values:
|
Normal |
| URL |
string |
The OSS URL of the input file. |
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4 |
| SummaryList |
object |
||
| Summary |
array<object> |
The list of video summaries. |
|
|
array<object> |
|||
| Type |
string |
The type of the summary. Valid values:
|
Gif |
| MediaWorkflowId |
string |
The ID of the workflow that generates the summary. |
93ab850b4f6f44eab54b6e91d24d**** |
| ActivityName |
string |
The name of the workflow activity. |
example-activity-**** |
| MediaWorkflowName |
string |
The name of the workflow that generates the summary. |
example-mediaworkflow-**** |
| File |
object |
The information about the input file. |
|
| State |
string |
The status of the media file. Valid values:
|
Normal |
| URL |
string |
The OSS URL of the input file. |
http://example-bucket-****.o |
| PublishState |
string |
The publishing status 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> |
|||
| Sar |
string |
The sample aspect ratio (SAR). |
1:1 |
| Height |
string |
The latter number in the video resolution. The number indicates the video height. |
360 |
| CodecTagString |
string |
The tag string of the encoding format. |
avc1 |
| NetworkCost |
object |
The network bandwidth consumption. |
|
| PreloadTime |
string |
The amount of preload time. |
0.01 |
| AvgBitrate |
string |
The average bitrate of the video stream. |
2659.326 |
| CostBandwidth |
string |
The maximum bandwidth that was consumed. |
100 |
| Width |
string |
The former number in the video resolution. The number indicates the video width and cannot be negative. |
640 |
| Index |
string |
The sequence number of the video stream. The value indicates the position of the video stream in all video streams. |
5 |
| Timebase |
string |
The time base. |
1/15360 |
| AvgFPS |
string |
The average frame rate. |
15.0 |
| PixFmt |
string |
The pixel format of the video stream. |
yuv420p |
| Lang |
string |
The language. For more information, see FFmpeg documentation. |
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 the video stream contains bidirectional frames (B-frames). A value of 1 indicates that the video stream contains B-frames. A value of 2 indicates that the video stream does not contain B-frames. |
2 |
| Profile |
string |
The codec profile. |
High |
| StartTime |
string |
The start time. |
0.046029 |
| Dar |
string |
The display aspect ratio (DAR) of the video stream. |
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 codec level. |
31 |
| AudioStreamList |
object |
||
| AudioStream |
array<object> |
The list of audio streams. |
|
|
object |
|||
| Timebase |
string |
The time base. |
1/44100 |
| Index |
string |
The sequence number of the audio stream. The value indicates the position of the audio stream in all audio streams. |
1 |
| SampleFmt |
string |
The sampling format. |
fltp |
| ChannelLayout |
string |
The output layout of the sound channels. |
stereo |
| Lang |
string |
The language. For more information, see FFmpeg language definition. |
und |
| Samplerate |
string |
The sampling 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 string 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 of the media file. |
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 subtitle streams. |
|
|
object |
|||
| Index |
string |
The sequence number of the subtitle stream. The value indicates the position of the subtitle stream in all subtitle streams. |
1 |
| Lang |
string |
The language. For more information, see FFmpeg language definition. |
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 size of the file. |
5872904 |
| Width |
string |
The width. |
640 |
| CoverURL |
string |
The OSS URL of the thumbnail. |
http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png |
| SnapshotList |
object |
||
| Snapshot |
array<object> |
The list of snapshots. |
|
|
array<object> |
|||
| Type |
string |
The type of the snapshot. Valid values:
|
Single |
| MediaWorkflowId |
string |
The ID of the workflow that generates the snapshot. |
6cc3aa66d1cb4bb2adf14e726c0a**** |
| ActivityName |
string |
The name of the workflow activity that generates the snapshot. |
example-activity1-**** |
| Count |
string |
The number of snapshots. This parameter is valid only when the value of the Type parameter is Sequence. |
3 |
| MediaWorkflowName |
string |
The name of the workflow that generates the snapshot. |
example-workflow-**** |
| File |
object |
The snapshot. |
|
| State |
string |
The status of the file. Valid values:
|
Normal |
| URL |
string |
The OSS URL of the snapshot. |
http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png |
| RunIdList |
object |
||
| RunId |
array |
The IDs of the media workflow execution instances. |
|
|
string |
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 |
Informasi tentang file media yang tidak ada. |
|
|
string |
URL file media yang tidak ada. Parameter ini tidak dikembalikan jika tidak ada data yang tersedia. |
null |
|
| RequestId |
string |
ID permintaan. |
1C8A0AEB-4321-485B-B4CB-DA4E9E6C9B42 |
Contoh
Respons sukses
JSONformat
{
"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"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.