All Products
Search
Document Center

Intelligent Media Services:GetPlayInfo

Last Updated:Aug 05, 2026

Obtains the playback URL of a media file (video or audio) by audio or video ID. After integrating the Alibaba Cloud Player SDK (for URL-based playback) or a third-party player, you can use the URL for audio and video playback.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ice:GetPlayInfo

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

MediaId

string

No

The media asset ID.

Note

At least one of MediaId and InputURL must be specified.

86434e152b7d4f20be480574439fe***

InputURL

string

No

The InputURL specified when the media asset was registered. For more information, see RegisterMediaInfo.

Note

At least one of MediaId and InputURL must be specified.

http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4  or  vod://****20b48fb04483915d4f2cd8ac****

AuthTimeout

integer

No

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

******11-DB8D-4A9A-875B-275798******

MediaBase

object

The media asset information.

CreationTime

string

The creation time.

2021-09-22T10:07:31+08:00

Status

string

The resource status. Valid values:

  • Init: The source file is not ready.

  • Preparing: The source file is being prepared, for example, being uploaded or composed.

  • PrepareFail: The source file failed to be prepared, for example, failed to obtain source file information.

  • Normal: The source file is ready.

Normal

MediaId

string

The media asset ID.

2eea77a61c7b4ddd95bec34a6f65b***

CoverURL

string

The cover URL.

https://***.oss-cn-shanghai.aliyuncs.com/cover/281c64d6-b5fb-4c57-97cd-84da56a8b151_large_cover_url.jpg

Title

string

The title.

testTitle

MediaType

string

The media file type. Valid values:

video: video. audio: audio only.

video

MediaTags

string

The tags.

  • A maximum of 16 tags are supported.

  • Separate multiple tags with commas (,).

  • Each tag can be up to 32 bytes in length.

  • UTF-8 encoding is used.

test,ccc

CateId

integer

The category ID. You can obtain the category ID by using the following methods:

  • Log on to the IMS console and choose Media Asset Management > Category Management to view the category ID.

  • When you create a category by calling the create category operation, the category ID is the value of CateId in the response.

  • When you query a category by calling the get category operation, the category ID is the value of CateId in the response.

4220

Description

string

The content description.

desc

PlayInfoList

array<object>

The audio or video playback information (stream information).

object

The detailed audio or video information.

CreationTime

string

The creation time. The time follows the format: yyyy-MM-ddTHH:mm:ssZ (UTC).

2022-05-10T02:28:49Z

Status

string

The media stream status. Valid values:

  • Normal: normal.

  • Invisible: invisible.

Normal

NarrowBandType

string

The Narrowband HD type. Valid values:

  • 0: normal.

  • 1.0: Narrowband HD 1.0.

  • 2.0: Narrowband HD 2.0.

This parameter takes effect only when the definition of a Narrowband HD 1.0 built-in transcoding template is configured. For more information, see Transcoding template configuration - Definition.

0

Height

integer

The height of the media stream. Unit: px.

1080

Bitrate

string

The bitrate of the media stream. Unit: Kbps.

20

ModificationTime

string

The modification time. The time follows the format: yyyy-MM-ddTHH:mm:ssZ (UTC).

2022-05-13T11:39:41.714+08:00

WatermarkId

string

The watermark ID associated with the current media stream.

5bed88672b1e2520ead228935ed51***

Encrypt

integer

Indicates whether the media stream is encrypted. Valid values:

  • 0: not encrypted.

  • 1: encrypted.

0

Definition

string

The definition of the video stream. Valid values:

  • FD: low definition.

  • LD: standard definition.

  • SD: high definition.

  • HD: ultra-high definition.

  • OD: original quality.

  • 2K: 2K.

  • 4K: 4K.

  • SQ: standard sound quality.

  • HQ: high sound quality.

  • AUTO: adaptive bitrate.

HD

EncryptType

string

The encryption type of the media stream. Valid values:

  • AliyunVoDEncryption: Alibaba Cloud video encryption.

  • HLSEncryption: HLS standard encryption.

Note

If the encryption type is AliyunVoDEncryption, only the Alibaba Cloud Player SDK can be used for playback.

AliyunVoDEncryption

StreamType

string

The media stream type. If the media stream is a video, the value is video. If the media stream is audio only, the value is audio.

video

Size

integer

The size of the media stream. Unit: bytes.

418112

Width

integer

The width of the media stream. Unit: px.

1024

Fps

string

The frame rate of the media stream. Unit: frames per second.

25

Duration

string

The duration of the media stream. Unit: seconds.

9.0464

PlayURL

string

The playback URL of the video stream.

https://***.aliyuncdn.com/sv/756bee1-17f980f0945/756bee1-17f980f0945.mp4

Format

string

The format of the media stream.

  • If the media file is a video, valid values are mp4 and m3u8.

  • If the media file is audio only, the value is mp3.

mp4

HDRType

string

The HDR type of the media stream. Valid values:

  • HDR

  • HDR10

  • HLG

  • DolbyVision

  • HDRVivid

  • SDR+

HDR

BitDepth

integer

The color bit depth.

8

FileURL

string

The OSS URL of the file.

http://outin-***.oss-cn-shanghai.aliyuncs.com/sv/43a68ee9-181809b6aba/43a68ee9-181809b6aba.mpeg

TransTemplateType

string

The transcoding templatetype. Valid values:

  • Normal: normal template.

  • AudioTranscode: audio transcoding.

  • Remux: encapsulation conversion.

  • NarrowBandV1: Narrowband HD 1.0.

  • NarrowBandV2: Narrowband HD 2.0.

  • UHD: audio and video enhancement (ultra-high definition).

Normal

StreamTags

string

The stream tag that identifies the transcoding processing type.

"{\"ims.audioServiceType\": \"AudioEnhancement\"}"

JobId

string

The job ID.

36c9d38e70bf43ed9f7f8f48d6356***

Examples

Success response

JSON format

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "MediaBase": {
    "CreationTime": "2021-09-22T10:07:31+08:00",
    "Status": "Normal",
    "MediaId": "2eea77a61c7b4ddd95bec34a6f65b***",
    "CoverURL": "https://***.oss-cn-shanghai.aliyuncs.com/cover/281c64d6-b5fb-4c57-97cd-84da56a8b151_large_cover_url.jpg",
    "Title": "testTitle",
    "MediaType": "video",
    "MediaTags": "test,ccc",
    "CateId": 4220,
    "Description": "desc"
  },
  "PlayInfoList": [
    {
      "CreationTime": "2022-05-10T02:28:49Z",
      "Status": "Normal",
      "NarrowBandType": "0",
      "Height": 1080,
      "Bitrate": "20",
      "ModificationTime": "2022-05-13T11:39:41.714+08:00",
      "WatermarkId": "5bed88672b1e2520ead228935ed51***",
      "Encrypt": 0,
      "Definition": "HD",
      "EncryptType": "AliyunVoDEncryption",
      "StreamType": "video",
      "Size": 418112,
      "Width": 1024,
      "Fps": "25",
      "Duration": "9.0464",
      "PlayURL": "https://***.aliyuncdn.com/sv/756bee1-17f980f0945/756bee1-17f980f0945.mp4",
      "Format": "mp4",
      "HDRType": "HDR",
      "BitDepth": 8,
      "FileURL": "http://outin-***.oss-cn-shanghai.aliyuncs.com/sv/43a68ee9-181809b6aba/43a68ee9-181809b6aba.mpeg",
      "TransTemplateType": "Normal",
      "StreamTags": "\"{\\\"ims.audioServiceType\\\": \\\"AudioEnhancement\\\"}\"",
      "JobId": "36c9d38e70bf43ed9f7f8f48d6356***"
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.