Queries media files based on media file IDs.
Usage notes
You can call this operation to query up to 10 media files at a time.
QPS limit
You can call this operation up to 100 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limits.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | QueryMediaList |
The operation that you want to perform. Set the value to QueryMediaList. |
| MediaIds | String | Yes | 3e1cd21131a94525be55acf65888****,e26cfa29e784402388463f61dbec**** |
The IDs of the media files. To obtain the ID of a media file, you can perform the following operations in the ApsaraVideo Media Processing (MPS) console: In the left-side navigation pane, choose Media Management > Media List. Find the required video and click Manage. The ID of the video is displayed on the Basics tab. Separate multiple IDs with commas (,). You can query up to 10 media files at a time. |
| IncludePlayList | Boolean | No | true |
Specifies whether to include playback information in the returned result.
|
| IncludeSnapshotList | Boolean | No | true |
Specifies whether to include snapshot information in the returned result.
|
| IncludeMediaInfo | Boolean | No | true |
Specifies whether to include media information in the returned result.
|
| IncludeSummaryList | Boolean | No | true |
Specifies whether to include summaries in the returned result.
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| NonExistMediaIds | Array of String | {"MediaId":[e26cfa29e784402388463f61dbec****]} |
The IDs of the media files that do not exist. This parameter is not returned when all specified media files exist. |
| MediaList | Array of Media |
The list of media files. |
|
| Media | |||
| CreationTime | String | 2016-09-14T08:30:33Z |
The time when the media file was created. |
| CateId | Long | 1 |
The ID of the category to which the media file belongs. |
| Height | String | 1080 |
The height of the media file. |
| CensorState | String | Initiated |
The review status of the media file. Valid values:
|
| Tags | Array of String | tag1,tag2 |
The tags of the media file. |
| PlayList | Array of Play |
The playlist. |
|
| Play | |||
| Encryption | String | 0 |
Indicates whether the media file is encrypted. Valid values:
|
| Height | String | 1080 |
The height. |
| Bitrate | String | 2659.326 |
The bitrate of the media file. |
| File | Object |
The playback file. |
|
| State | String | Normal |
The status of the file. Valid values:
|
| URL | String | http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4 |
The Object Storage Service (OSS) URL of the output file. |
| MediaWorkflowId | String | 93ab850b4f6f44eab54b6e91d24d**** |
The ID of the workflow that generates the playback file. |
| Width | String | 760 |
The width of the media file. |
| Size | String | 2647692 |
The size of the media file. |
| Fps | String | 25.0 |
The frame rate of the media file. |
| Duration | String | 7.965000 |
The duration of the media file. |
| ActivityName | String | example-activity-**** |
The name of the workflow activity. |
| Format | String | mp4 |
The encoding format of the media file. Valid values: mov, mp4, m4a, 3gp, 3g2, and mj2. |
| MediaWorkflowName | String | example-mediaworkflow-**** |
The name of the workflow that generates the playback file. |
| Bitrate | String | 2659.326 |
The bitrate. |
| MediaId | String | 3e1cd21131a94525be55acf65888**** |
The ID of the media file. |
| File | Object |
The details of the input file. |
|
| State | String | Normal |
The status of the input file. Valid values:
|
| URL | String | http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4 |
The OSS URL of the input file. |
| SummaryList | Array of Summary |
The list of video summaries. |
|
| Summary | |||
| Type | String | Video |
The type of the summary. Valid values:
|
| MediaWorkflowId | String | 93ab850b4f6f44eab54b6e91d24d**** |
The ID of the workflow that generates the summary. |
| ActivityName | String | example-activity-**** |
The name of the workflow activity. |
| MediaWorkflowName | String | example-mediaworkflow-**** |
The name of the workflow that generates the summary. |
| File | Object |
The information about the input file. |
|
| State | String | Normal |
The status of the file. Valid values:
|
| URL | String | http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4 |
The OSS URL of the input file. |
| PublishState | String | Published |
The publishing status of the media file. Valid values:
|
| MediaInfo | Object |
The media information. |
|
| Streams | Object |
The stream information. |
|
| VideoStreamList | Array of VideoStream |
The list of video streams. |
|
| VideoStream | |||
| Sar | String | 1:1 |
The sample aspect ratio (SAR). |
| Height | String | 1080 |
The latter number in the video resolution. The number indicates the video height. |
| CodecTagString | String | avc1 |
The tag string of the encoding format. |
| NetworkCost | Object |
The network bandwidth consumption. |
|
| PreloadTime | String | 0.01 |
The amount of preload time. |
| AvgBitrate | String | 2659.326 |
The average bitrate. |
| CostBandwidth | String | 100 |
The maximum bandwidth that was consumed. |
| Width | String | 100 |
The former number in the video resolution. The number indicates the video width. |
| Index | String | 5 |
The sequence number of the video stream. The value indicates the position of the video stream in all video streams. |
| Timebase | String | 1/30000 |
The time base. |
| AvgFPS | String | 29.97003 |
The average frame rate. |
| PixFmt | String | yuv420p |
The pixel format. |
| Lang | String | und |
The language. For more information, see FFmpeg documentation. |
| CodecLongName | String | QuickTime/MOV |
The full name of the encoding format. |
| NumFrames | String | 12 |
The total number of frames. |
| Rotate | String | 90 |
The video rotation angle. |
| Bitrate | String | 2659.326 |
The bitrate. |
| HasBFrames | String | 2 |
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. |
| Profile | String | High |
The codec profile. |
| StartTime | String | 0.000000 |
The start time. |
| Dar | String | 16:9 |
The display aspect ratio (DAR). |
| CodecName | String | mov |
The short name of the encoding format. Valid values: mov, mp4, m4a, 3gp, 3g2, and mj2. |
| Duration | String | 182.683000 |
The duration. |
| Fps | String | 29.97003 |
The frame rate. |
| CodecTag | String | 0x31637661 |
The tag of the encoding format. |
| CodecTimeBase | String | 1001/60000 |
The codec time base. |
| Level | String | 40 |
The codec level. |
| AudioStreamList | Array of AudioStream |
The list of audio streams. |
|
| AudioStream | |||
| Timebase | String | 1/44100 |
The time base. |
| Index | String | 1 |
The sequence number of the audio stream. The value indicates the position of the audio stream in all audio streams. |
| SampleFmt | String | fltp |
The sampling format. |
| ChannelLayout | String | stereo |
The output layout of the sound channels. |
| Lang | String | und |
The language. For more information, see FFmpeg documentation. |
| Samplerate | String | 44100 |
The sampling rate. |
| CodecLongName | String | AAC(Advanced Audio Coding) |
The full name of the encoding format. |
| Channels | String | 2 |
The number of sound channels. |
| NumFrames | String | 100 |
The total number of frames. |
| Bitrate | String | 160.008 |
The bitrate. |
| CodecTagString | String | mp4a |
The tag string of the encoding format. |
| StartTime | String | 0.000000 |
The start time. |
| CodecName | String | mov |
The short name of the encoding format. Valid values: H264, mov, aac, avc, and mpeg. |
| Duration | String | 182.591995 |
The duration. |
| CodecTag | String | 0x6134706d |
The tag of the encoding format. |
| CodecTimeBase | String | 1/44100 |
The codec time base. |
| SubtitleStreamList | Array of SubtitleStream |
The list of subtitle streams. |
|
| SubtitleStream | |||
| Index | String | 3 |
The sequence number of the subtitle stream. The value indicates the position of the subtitle stream in all subtitle streams. |
| Lang | String | und |
The language. For more information, see FFmpeg documentation. |
| Format | Object |
The format information. |
|
| StartTime | String | 0.000000 |
The start time. |
| NumPrograms | String | 2 |
The total number of program streams. |
| Size | String | 2647692 |
The size of the file. |
| NumStreams | String | 2 |
The total number of media streams. |
| FormatLongName | String | QuickTime/MOV |
The full name of the container format. |
| Duration | String | 7.965000 |
The total duration. |
| Bitrate | String | 2659.326 |
The bitrate. |
| FormatName | String | mov |
The short name of the container format. Valid values: mov, mp4, m4a, 3gp, 3g2, and mj2. |
| Description | String | This is description **** |
The description. |
| Size | String | 2647692 |
The size of the file. |
| Width | String | 1920 |
The width. |
| CoverURL | String | http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png |
The OSS URL of the thumbnail. |
| SnapshotList | Array of Snapshot |
The list of snapshots. |
|
| Snapshot | |||
| Type | String | Sequence |
The type of the snapshot. Valid values:
|
| MediaWorkflowId | String | 6cc3aa66d1cb4bb2adf14e726c0a**** |
The ID of the workflow that generates the snapshot. |
| ActivityName | String | example-activity1-**** |
The name of the workflow activity that generates the snapshot. |
| Count | String | 5 |
The number of snapshots. This parameter is valid only when the value of the Type parameter is Sequence. |
| MediaWorkflowName | String | example-workflow-**** |
The name of the workflow that generates the snapshot. |
| File | Object |
The snapshot. |
|
| State | String | Normal |
The status of the file. Valid values:
|
| URL | String | http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png |
The OSS URL of the snapshot. |
| RunIdList | Array of String | null |
The ID of the instance. |
| Duration | String | 7.965000 |
The duration. |
| Fps | String | 25.0 |
The frame rate. |
| Title | String | example-title-**** |
The title. |
| Format | String | mov |
The encoding format. Valid values: mov, mp4, m4a, 3gp, 3g2, and mj2. |
| RequestId | String | 283DC68C-146F-4489-A2A1-2F88F1472A56 |
The ID of the request. |
Examples
Sample requests
http(s)://mts.cn-shanghai.aliyuncs.com/?Action=AddMedia
&MediaIds=3e1cd21131a94525be55acf65888****,e26cfa29e784402388463f61dbec****
&IncludePlayList=true
&IncludeSnapshotList=true
&IncludeMediaInfo=true
&IncludeSummaryList=true
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<QueryMediaListResponse>
<NonExistMediaIds>{"MediaId":[e26cfa29e784402388463f61dbec****]}</NonExistMediaIds>
<MediaList>
<CreationTime>2016-09-14T08:30:33Z</CreationTime>
<CateId>1</CateId>
<Height>1080</Height>
<CensorState>Initiated</CensorState>
<Tags>tag1,tag2</Tags>
<PlayList>
<Encryption>0</Encryption>
<Height>1080</Height>
<Bitrate>2659.326</Bitrate>
<File>
<State>Normal</State>
<URL>http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4</URL>
</File>
<MediaWorkflowId>93ab850b4f6f44eab54b6e91d24d****</MediaWorkflowId>
<Width>760</Width>
<Size>2647692</Size>
<Fps>25.0</Fps>
<Duration>7.965000</Duration>
<ActivityName>example-activity-****</ActivityName>
<Format>mp4</Format>
<MediaWorkflowName>example-mediaworkflow-****</MediaWorkflowName>
</PlayList>
<Bitrate>2659.326</Bitrate>
<MediaId>3e1cd21131a94525be55acf65888****</MediaId>
<File>
<State>Normal</State>
<URL>http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4</URL>
</File>
<SummaryList>
<Type>Video</Type>
<MediaWorkflowId>93ab850b4f6f44eab54b6e91d24d****</MediaWorkflowId>
<ActivityName>example-activity-****</ActivityName>
<MediaWorkflowName>example-mediaworkflow-****</MediaWorkflowName>
<File>
<State>Normal</State>
<URL>http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4</URL>
</File>
</SummaryList>
<PublishState>Published</PublishState>
<MediaInfo>
<Streams>
<VideoStreamList>
<Sar>1:1</Sar>
<Height>1080</Height>
<CodecTagString>avc1</CodecTagString>
<NetworkCost>
<PreloadTime>0.01</PreloadTime>
<AvgBitrate>2659.326</AvgBitrate>
<CostBandwidth>100</CostBandwidth>
</NetworkCost>
<Width>100</Width>
<Index>5</Index>
<Timebase>1/30000</Timebase>
<AvgFPS>29.97003</AvgFPS>
<PixFmt>yuv420p</PixFmt>
<Lang>und</Lang>
<CodecLongName>QuickTime/MOV</CodecLongName>
<NumFrames>12</NumFrames>
<Rotate>90</Rotate>
<Bitrate>2659.326</Bitrate>
<HasBFrames>2</HasBFrames>
<Profile>High</Profile>
<StartTime>0.000000</StartTime>
<Dar>16:9</Dar>
<CodecName>mov</CodecName>
<Duration>182.683000</Duration>
<Fps>29.97003</Fps>
<CodecTag>0x31637661</CodecTag>
<CodecTimeBase>1001/60000</CodecTimeBase>
<Level>40</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>160.008</Bitrate>
<CodecTagString>mp4a</CodecTagString>
<StartTime>0.000000</StartTime>
<CodecName>mov</CodecName>
<Duration>182.591995</Duration>
<CodecTag>0x6134706d</CodecTag>
<CodecTimeBase>1/44100</CodecTimeBase>
</AudioStreamList>
<SubtitleStreamList>
<Index>3</Index>
<Lang>und</Lang>
</SubtitleStreamList>
</Streams>
<Format>
<StartTime>0.000000</StartTime>
<NumPrograms>2</NumPrograms>
<Size>2647692</Size>
<NumStreams>2</NumStreams>
<FormatLongName>QuickTime/MOV</FormatLongName>
<Duration>7.965000</Duration>
<Bitrate>2659.326</Bitrate>
<FormatName>mov</FormatName>
</Format>
</MediaInfo>
<Description>This is descirption ****</Description>
<Size>2647692</Size>
<Width>1920</Width>
<CoverURL>http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png</CoverURL>
<SnapshotList>
<Type>Sequence</Type>
<MediaWorkflowId>6cc3aa66d1cb4bb2adf14e726c0a****</MediaWorkflowId>
<ActivityName>example-activity1-****</ActivityName>
<Count>5</Count>
<MediaWorkflowName>example-workflow-****</MediaWorkflowName>
<File>
<State>Normal</State>
<URL>http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png</URL>
</File>
</SnapshotList>
<RunIdList>{"RunId":["47b42486019c4f688bf144c1a6ba****"]}</RunIdList>
<Duration>7.965000</Duration>
<Fps>25.0</Fps>
<Title>example-title-****</Title>
<Format>mov</Format>
</MediaList>
<RequestId>283DC68C-146F-4489-A2A1-2F88F1472A56</RequestId>
</QueryMediaListResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"NonExistMediaIds" : [ "{\"MediaId\":[e26cfa29e784402388463f61dbec****]}" ],
"MediaList" : [ {
"CreationTime" : "2016-09-14T08:30:33Z",
"CateId" : 1,
"Height" : "1080",
"CensorState" : "Initiated",
"Tags" : [ "tag1,tag2" ],
"PlayList" : [ {
"Encryption" : "0",
"Height" : "1080",
"Bitrate" : "2659.326",
"File" : {
"State" : "Normal",
"URL" : "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4"
},
"MediaWorkflowId" : "93ab850b4f6f44eab54b6e91d24d****",
"Width" : "760",
"Size" : "2647692",
"Fps" : "25.0",
"Duration" : "7.965000",
"ActivityName" : "example-activity-****",
"Format" : "mp4",
"MediaWorkflowName" : "example-mediaworkflow-****"
} ],
"Bitrate" : "2659.326",
"MediaId" : "3e1cd21131a94525be55acf65888****",
"File" : {
"State" : "Normal",
"URL" : "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4"
},
"SummaryList" : [ {
"Type" : "Video",
"MediaWorkflowId" : "93ab850b4f6f44eab54b6e91d24d****",
"ActivityName" : "example-activity-****",
"MediaWorkflowName" : "example-mediaworkflow-****",
"File" : {
"State" : "Normal",
"URL" : "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4"
}
} ],
"PublishState" : "Published",
"MediaInfo" : {
"Streams" : {
"VideoStreamList" : [ {
"Sar" : "1:1",
"Height" : "1080",
"CodecTagString" : "avc1",
"NetworkCost" : {
"PreloadTime" : "0.01",
"AvgBitrate" : "2659.326",
"CostBandwidth" : "100"
},
"Width" : "100",
"Index" : "5",
"Timebase" : "1/30000",
"AvgFPS" : "29.97003",
"PixFmt" : "yuv420p",
"Lang" : "und",
"CodecLongName" : "QuickTime/MOV",
"NumFrames" : "12",
"Rotate" : "90",
"Bitrate" : "2659.326",
"HasBFrames" : "2",
"Profile" : "High",
"StartTime" : "0.000000",
"Dar" : "16:9",
"CodecName" : "mov",
"Duration" : "182.683000",
"Fps" : "29.97003",
"CodecTag" : "0x31637661",
"CodecTimeBase" : "1001/60000",
"Level" : "40"
} ],
"AudioStreamList" : [ {
"Timebase" : "1/44100",
"Index" : "1",
"SampleFmt" : "fltp",
"ChannelLayout" : "stereo",
"Lang" : "und",
"Samplerate" : "44100",
"CodecLongName" : "AAC(Advanced Audio Coding)",
"Channels" : "2",
"NumFrames" : "100",
"Bitrate" : "160.008",
"CodecTagString" : "mp4a",
"StartTime" : "0.000000",
"CodecName" : "mov",
"Duration" : "182.591995",
"CodecTag" : "0x6134706d",
"CodecTimeBase" : "1/44100"
} ],
"SubtitleStreamList" : [ {
"Index" : "3",
"Lang" : "und"
} ]
},
"Format" : {
"StartTime" : "0.000000",
"NumPrograms" : "2",
"Size" : "2647692",
"NumStreams" : "2",
"FormatLongName" : "QuickTime/MOV",
"Duration" : "7.965000",
"Bitrate" : "2659.326",
"FormatName" : "mov"
}
},
"Description" : "This is descirption ****",
"Size" : "2647692",
"Width" : "1920",
"CoverURL" : "http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png",
"SnapshotList" : [ {
"Type" : "Sequence",
"MediaWorkflowId" : "6cc3aa66d1cb4bb2adf14e726c0a****",
"ActivityName" : "example-activity1-****",
"Count" : "5",
"MediaWorkflowName" : "example-workflow-****",
"File" : {
"State" : "Normal",
"URL" : "http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png"
}
} ],
"RunIdList" : [ "{\"RunId\":[\"47b42486019c4f688bf144c1a6ba****\"]}" ],
"Duration" : "7.965000",
"Fps" : "25.0",
"Title" : "example-title-****",
"Format" : "mov"
} ],
"RequestId" : "283DC68C-146F-4489-A2A1-2F88F1472A56"
}
Error codes
For a list of error codes, visit the API Error Center.