Menanyakan file media berdasarkan URL Object Storage Service (OSS)-nya.
Catatan penggunaan
- Anda dapat memanggil operasi ini untuk menanyakan hingga 10 file media sekaligus.
- Sebelum memanggil operasi ini, Anda harus terlebih dahulu menambahkan file media dengan memanggil operasi AddMedia.
- Operasi ini hanya dapat digunakan untuk menanyakan file media yang telah diproses dalam alur kerja. Untuk mendapatkan informasi lengkap tentang file media yang baru diunggah ke OSS, Anda dapat memanggil operasi ini setelah alur kerja terkait selesai. Jika file media tidak diproses dalam alur kerja, Anda harus mengirim pekerjaan analisis informasi media dengan memanggil operasi SubmitMediaInfoJob. Setelah pekerjaan tersebut selesai, informasi file media tersebut dapat ditanyakan.
Batas QPS
Anda dapat memanggil operasi API ini hingga 100 kali per detik per akun. Jika jumlah panggilan per detik melebihi batas, Pembatasan kecepatan akan dipicu, yang berpotensi mengganggu bisnis Anda. Oleh karena itu, pastikan Anda memperhatikan batas ini saat memanggil operasi ini. Untuk informasi selengkapnya, lihat Batas QPS.
Debugging
Parameter permintaan
| Parameter | Type | Wajib | Contoh | Deskripsi |
| Action | String | Ya | QueryMediaListByURL | Operasi yang ingin Anda lakukan. Tetapkan nilainya ke QueryMediaListByURL. |
| FileURLs | String | Ya | http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example.mp4 | URL OSS dari file media. Untuk mendapatkan URL OSS file media, Anda dapat melakukan langkah-langkah berikut di Konsol ApsaraVideo Media Processing (MPS): Di panel navigasi sebelah kiri, pilih Media Management > Media List. Temukan file media yang ingin Anda lihat URL OSS-nya, lalu klik Manage pada kolom Actions. URL OSS file media akan ditampilkan di tab Obtain Encoding URL. Pisahkan beberapa URL dengan koma (,). Anda dapat menanyakan hingga 10 file media sekaligus.
|
| IncludePlayList | Boolean | Tidak. | true | Menentukan apakah informasi pemutaran disertakan dalam hasil yang dikembalikan.
|
| IncludeSnapshotList | Boolean | Tidak. | true | Menentukan apakah informasi snapshot disertakan dalam hasil yang dikembalikan.
|
| IncludeMediaInfo | Boolean | Tidak. | true | Menentukan apakah informasi media disertakan dalam hasil yang dikembalikan.
|
| IncludeSummaryList | Boolean | Tidak. | true | Menentukan apakah ringkasan disertakan dalam hasil yang dikembalikan.
|
Parameter respons
| Parameter | Type | Contoh | Deskripsi |
| MediaList | Array of Media | Daftar file media. |
|
| Media | |||
| CreationTime | String | 2021-07-14T13:05:00Z | Waktu pembuatan file media. |
| CateId | Long | 123 | ID kategori tempat file media tersebut berada. |
| Height | String | 360 | Tinggi file media yang ditanyakan. |
| CensorState | String | Initiated | Status tinjauan file media. Nilai yang valid:
|
| Tags | Array of String | tag1,tag2 | Tag file media. |
| PlayList | Array of Play | Playlist. |
|
| Play | |||
| Encryption | String | 1 | Menunjukkan apakah file media dienkripsi. Nilai yang valid:
|
| Height | String | 10 | Tinggi file media. |
| Bitrate | String | 25.067 | Bitrate file media. |
| File | Object | File pemutaran. |
|
| State | String | Normal | Status file media. Nilai yang valid:
|
| URL | String | http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4l-test/in/1.mp4 | URL OSS file pemutaran. |
| MediaWorkflowId | String | 6cc3aa66d1cb4bb2adf14e726c0a**** | ID alur kerja yang menghasilkan file pemutaran. |
| Width | String | 11 | Lebar. |
| Size | String | 100 | Ukuran. |
| Fps | String | 25.0 | Laju frame. |
| Duration | String | 7.965000 | Durasi. |
| ActivityName | String | test name | Nama aktivitas alur kerja. |
| Format | String | mov | Format encoding file media. Nilai yang valid: mov, mp4, m4a, 3gp, 3g2, dan mj2. |
| MediaWorkflowName | String | example-mediaworkflow-**** | Nama alur kerja yang menghasilkan file pemutaran. |
| Bitrate | String | 593.192 | Bitrate. |
| MediaId | String | 52d7e98b05e648199612290bb819**** | ID file media. |
| File | Object | Detail file input. |
|
| State | String | Normal | Status file media. Nilai yang valid:
|
| URL | String | http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4 | URL OSS file input. |
| SummaryList | Array of Summary | Daftar ringkasan video. |
|
| Summary | |||
| Type | String | Gif | Jenis ringkasan. Nilai yang valid:
|
| MediaWorkflowId | String | 93ab850b4f6f44eab54b6e91d24d**** | ID alur kerja yang menghasilkan ringkasan. |
| ActivityName | String | example-activity-**** | Nama aktivitas alur kerja. |
| MediaWorkflowName | String | example-mediaworkflow-**** | Nama alur kerja yang menghasilkan ringkasan. |
| File | Object | Informasi tentang file input. |
|
| State | String | Normal | Status file media. Nilai yang valid:
|
| URL | String | http://example-bucket-****.o | URL OSS file input. |
| PublishState | String | Published | Status publikasi file media. Nilai yang valid:
|
| MediaInfo | Object | Informasi media. |
|
| Streams | Object | Informasi aliran. |
|
| VideoStreamList | Array of VideoStream | Daftar aliran video. |
|
| VideoStream | |||
| Sar | String | 1:1 | Rasio aspek sampel (SAR). |
| Height | String | 360 | Angka kedua dalam resolusi video. Angka ini menunjukkan tinggi video. |
| CodecTagString | String | avc1 | String tag format encoding. |
| NetworkCost | Object | Konsumsi lebar pita jaringan. |
|
| PreloadTime | String | 0.01 | Jumlah waktu preload. |
| AvgBitrate | String | 2659.326 | Bitrate rata-rata aliran video. |
| CostBandwidth | String | 100 | Lebar pita maksimum yang dikonsumsi. |
| Width | String | 640 | Angka pertama dalam resolusi video. Angka ini menunjukkan lebar video dan tidak boleh negatif. |
| Index | String | 5 | Nomor urut aliran video. Nilai ini menunjukkan posisi aliran video di antara semua aliran video. |
| Timebase | String | 1/15360 | Dasar waktu. |
| AvgFPS | String | 15.0 | Laju frame rata-rata. |
| PixFmt | String | yuv420p | Format piksel aliran video. |
| Lang | String | und | Bahasa. Untuk informasi selengkapnya, lihat Dokumentasi FFmpeg. |
| CodecLongName | String | H.264/AVC/MPEG-4 AVC/MPEG-4 part 10 | Nama lengkap format encoding. |
| NumFrames | String | 12 | Jumlah total frame. |
| Rotate | String | 90 | Sudut rotasi video. |
| Bitrate | String | 512.701 | Bitrate. |
| HasBFrames | String | 2 | Menunjukkan apakah aliran video berisi frame dua arah (B-frame). Nilai 1 berarti aliran video berisi B-frame. Nilai 2 berarti aliran video tidak berisi B-frame. |
| Profile | String | High | Profil kodek. |
| StartTime | String | 0.046029 | Waktu mulai. |
| Dar | String | 16:9 | Rasio aspek tampilan (DAR) aliran video. |
| CodecName | String | H264 | Nama singkat format encoding. Nilai yang valid: H264, mov, aac, avc, dan mpeg. |
| Duration | String | 79.200000 | Durasi. |
| Fps | String | 15.0 | Laju frame. |
| CodecTag | String | 0x31637661 | Tag format encoding. |
| CodecTimeBase | String | 1/30 | Dasar waktu codec. |
| Level | String | 31 | Tingkat kodek. |
| AudioStreamList | Array of AudioStream | Daftar aliran audio. |
|
| AudioStream | |||
| Timebase | String | 1/44100 | Dasar waktu. |
| Index | String | 1 | Nomor urut aliran audio. Nilai ini menunjukkan posisi aliran audio di antara semua aliran audio. |
| SampleFmt | String | fltp | Format pengambilan sampel. |
| ChannelLayout | String | stereo | Tata letak output saluran suara. |
| Lang | String | und | Bahasa. Untuk informasi selengkapnya, lihat Definisi bahasa FFmpeg. |
| Samplerate | String | 44100 | Laju pengambilan sampel. |
| CodecLongName | String | AAC (Advanced Audio Coding) | Nama lengkap format encoding. |
| Channels | String | 2 | Jumlah saluran suara. |
| NumFrames | String | 100 | Jumlah total frame. |
| Bitrate | String | 76.356 | Bitrate. |
| CodecTagString | String | mp4a | String tag dalam format encoding. |
| StartTime | String | 0.000000 | Waktu mulai. |
| CodecName | String | aac | Nama singkat format encoding. Nilai yang valid: H264, mov, aac, avc, dan mpeg. |
| Duration | String | 79.203265 | Durasi file media. |
| CodecTag | String | 0x6134706d | Tag format encoding. |
| CodecTimeBase | String | 1/44100 | Dasar waktu codec. |
| SubtitleStreamList | Array of SubtitleStream | Daftar aliran subtitle. |
|
| SubtitleStream | |||
| Index | String | 1 | Nomor urut aliran subtitle. Nilai ini menunjukkan posisi aliran subtitle di antara semua aliran subtitle. |
| Lang | String | und | Bahasa. Untuk informasi selengkapnya, lihat Definisi bahasa FFmpeg. |
| Format | Object | Informasi format. |
|
| StartTime | String | 0.000000 | Waktu mulai. |
| NumPrograms | String | 0 | Jumlah total aliran program. |
| Size | String | 5872904 | Ukuran. |
| NumStreams | String | 2 | Jumlah total aliran media. |
| FormatLongName | String | QuickTime/MOV | Nama lengkap format encoding. |
| Duration | String | 79.204000 | Durasi. |
| Bitrate | String | 593.192 | Bitrate. |
| FormatName | String | mov | Nama singkat format kontainer. Nilai yang valid: mov, mp4, m4a, 3gp, 3g2, dan mj2. |
| Description | String | This is description **** | Deskripsi. |
| Size | String | 5872904 | Ukuran file. |
| Width | String | 640 | Lebar. |
| CoverURL | String | http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png | URL OSS Gambar mini. |
| SnapshotList | Array of Snapshot | Daftar snapshot. |
|
| Snapshot | |||
| Type | String | Single | Jenis snapshot. Nilai yang valid:
|
| MediaWorkflowId | String | 6cc3aa66d1cb4bb2adf14e726c0a**** | ID alur kerja yang menghasilkan snapshot. |
| ActivityName | String | example-activity1-**** | Nama aktivitas alur kerja yang menghasilkan snapshot. |
| Count | String | 3 | Jumlah snapshot. Parameter ini hanya berlaku jika nilai parameter Type adalah Sequence. |
| MediaWorkflowName | String | example-workflow-**** | Nama alur kerja yang menghasilkan snapshot. |
| File | Object | Snapshot. |
|
| State | String | Normal | Status file. Nilai yang valid:
|
| URL | String | http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png | URL OSS snapshot. |
| RunIdList | Array of String | 9343bd0e7bb54ae19228529908e5**** | ID instans eksekusi alur kerja media. |
| Duration | String | 79.204000 | Durasi. |
| Fps | String | 15.0 | Laju frame. |
| Title | String | kled.mp4 | Judul. |
| Format | String | mov | Format encoding. Nilai yang valid: mov, mp4, m4a, 3gp, 3g2, dan mj2. |
| NonExistFileURLs | Array of String | null | ID file media yang tidak ada. Parameter ini tidak dikembalikan jika semua file media yang ditentukan tersedia. |
| RequestId | String | 1C8A0AEB-4321-485B-B4CB-DA4E9E6C9B42 | ID permintaan. |
Contoh
Contoh permintaan
http(s)://mts.cn-hangzhou.aliyuncs.com/?Action=QueryMediaListByURL
&FileURLs=http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example.mp4
&IncludePlayList=true
&IncludeSnapshotList=true
&IncludeMediaInfo=true
&IncludeSummaryList=true
&<Common request parameters>
Contoh respons sukses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<QueryMediaListByURLResponse>
<MediaList>
<CreationTime>2021-07-14T13:05:00Z</CreationTime>
<CateId>123</CateId>
<Height>360</Height>
<CensorState>Initiated</CensorState>
<Tags>tag1,tag2</Tags>
<PlayList>
<Encryption>1</Encryption>
<Height>10</Height>
<Bitrate>25.067</Bitrate>
<File>
<State>Normal</State>
<URL>http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4l-test/in/1.mp4</URL>
</File>
<MediaWorkflowId>6cc3aa66d1cb4bb2adf14e726c0a****</MediaWorkflowId>
<Width>11</Width>
<Size>100</Size>
<Fps>25.0</Fps>
<Duration>7.965000</Duration>
<ActivityName>test name</ActivityName>
<Format>mov</Format>
<MediaWorkflowName>example-mediaworkflow-****</MediaWorkflowName>
</PlayList>
<Bitrate>593.192</Bitrate>
<MediaId>52d7e98b05e648199612290bb819****</MediaId>
<File>
<State>Normal</State>
<URL>http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4</URL>
</File>
<SummaryList>
<Type>Gif</Type>
<MediaWorkflowId>93ab850b4f6f44eab54b6e91d24d****</MediaWorkflowId>
<ActivityName>example-activity-****</ActivityName>
<MediaWorkflowName>example-mediaworkflow-****</MediaWorkflowName>
<File>
<State>Normal</State>
<URL>http://example-bucket-****.o</URL>
</File>
</SummaryList>
<PublishState>Published</PublishState>
<MediaInfo>
<Streams>
<VideoStreamList>
<Sar>1:1</Sar>
<Height>360</Height>
<CodecTagString>avc1</CodecTagString>
<NetworkCost>
<PreloadTime>0.01</PreloadTime>
<AvgBitrate>2659.326</AvgBitrate>
<CostBandwidth>100</CostBandwidth>
</NetworkCost>
<Width>640</Width>
<Index>5</Index>
<Timebase>1/15360</Timebase>
<AvgFPS>15.0</AvgFPS>
<PixFmt>yuv420p</PixFmt>
<Lang>und</Lang>
<CodecLongName>H.264/AVC/MPEG-4 AVC/MPEG-4 part 10</CodecLongName>
<NumFrames>12</NumFrames>
<Rotate>90</Rotate>
<Bitrate>512.701</Bitrate>
<HasBFrames>2</HasBFrames>
<Profile>High</Profile>
<StartTime>0.046029</StartTime>
<Dar>16:9</Dar>
<CodecName>H264</CodecName>
<Duration>79.200000</Duration>
<Fps>15.0</Fps>
<CodecTag>0x31637661</CodecTag>
<CodecTimeBase>1/30</CodecTimeBase>
<Level>31</Level>
</VideoStreamList>
<AudioStreamList>
<Timebase>1/44100</Timebase>
<Index>1</Index>
<SampleFmt>fltp</SampleFmt>
<ChannelLayout>stereo</ChannelLayout>
<Lang>und</Lang>
<Samplerate>44100</Samplerate>
<CodecLongName>AAC (Advanced Audio Coding)</CodecLongName>
<Channels>2</Channels>
<NumFrames>100</NumFrames>
<Bitrate>76.356</Bitrate>
<CodecTagString>mp4a</CodecTagString>
<StartTime>0.000000</StartTime>
<CodecName>aac</CodecName>
<Duration>79.203265</Duration>
<CodecTag>0x6134706d</CodecTag>
<CodecTimeBase>1/44100</CodecTimeBase>
</AudioStreamList>
<SubtitleStreamList>
<Index>1</Index>
<Lang>und</Lang>
</SubtitleStreamList>
</Streams>
<Format>
<StartTime>0.000000</StartTime>
<NumPrograms>0</NumPrograms>
<Size>5872904</Size>
<NumStreams>2</NumStreams>
<FormatLongName>QuickTime/MOV</FormatLongName>
<Duration>79.204000</Duration>
<Bitrate>593.192</Bitrate>
<FormatName>mov</FormatName>
</Format>
</MediaInfo>
<Description>This is description ****</Description>
<Size>5872904</Size>
<Width>640</Width>
<CoverURL>http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png</CoverURL>
<SnapshotList>
<Type>Single</Type>
<MediaWorkflowId>6cc3aa66d1cb4bb2adf14e726c0a****</MediaWorkflowId>
<ActivityName>example-activity1-****</ActivityName>
<Count>3</Count>
<MediaWorkflowName>example-workflow-****</MediaWorkflowName>
<File>
<State>Normal</State>
<URL>http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png</URL>
</File>
</SnapshotList>
<RunIdList>9343bd0e7bb54ae19228529908e5****</RunIdList>
<Duration>79.204000</Duration>
<Fps>15.0</Fps>
<Title>kled.mp4</Title>
<Format>mov</Format>
</MediaList>
<NonExistFileURLs>null</NonExistFileURLs>
<RequestId>1C8A0AEB-4321-485B-B4CB-DA4E9E6C9B42</RequestId>
</QueryMediaListByURLResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"MediaList" : [ {
"CreationTime" : "2021-07-14T13:05:00Z",
"CateId" : 123,
"Height" : "360",
"CensorState" : "Initiated",
"Tags" : [ "tag1,tag2" ],
"PlayList" : [ {
"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" : [ {
"Type" : "Gif",
"MediaWorkflowId" : "93ab850b4f6f44eab54b6e91d24d****",
"ActivityName" : "example-activity-****",
"MediaWorkflowName" : "example-mediaworkflow-****",
"File" : {
"State" : "Normal",
"URL" : "http://example-bucket-****.o"
}
} ],
"PublishState" : "Published",
"MediaInfo" : {
"Streams" : {
"VideoStreamList" : [ {
"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" : [ {
"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" : [ {
"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" : [ {
"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" : [ "9343bd0e7bb54ae19228529908e5****" ],
"Duration" : "79.204000",
"Fps" : "15.0",
"Title" : "kled.mp4",
"Format" : "mov"
} ],
"NonExistFileURLs" : [ "null" ],
"RequestId" : "1C8A0AEB-4321-485B-B4CB-DA4E9E6C9B42"
}
Kode kesalahan
Untuk daftar kode kesalahan, kunjungi Error Center.