All Products
Search
Document Center

Intelligent Media Services:GetPlayInfo

Last Updated:Mar 30, 2026

This API fetches the playback URL for a media file, such as video or audio, by its Media ID. Use this URL to play the media with the Alibaba Cloud Player SDK (for URL-based playback) or a third-party player.

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 ID of the media asset.

Note

Either MediaId or InputURL is required.

86434e152b7d4f20be480574439fe***

InputURL

string

No

The input URL that you specified when registering the media asset. For more information, see RegisterMediaInfo.

Note

Either MediaId or InputURL is required.

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

AuthTimeout

integer

No

The validity period of the playback URL, in seconds. The value defaults to 3600, which is also the minimum.

Response elements

Element

Type

Description

Example

object

The response body.

RequestId

string

A unique identifier for the request.

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

MediaBase

object

The media asset information.

CreationTime

string

The creation time of the media asset.

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

Status

string

The status of the media asset. Valid values:

  • Init: The source file is not ready.

  • Preparing: The source file is undergoing preparation, such as being uploaded or composited.

  • PrepareFail: Preparation of the source file failed. This can occur, for example, if the system cannot obtain information about the source file.

  • Normal: The source file is ready.

Normal

MediaId

string

A unique identifier for the media asset.

2eea77a61c7b4ddd95bec34a6f65b***

CoverURL

string

The URL of the cover image.

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

Title

string

The title of the media asset.

testTitle

MediaType

string

The type of the media asset. Valid values:

video and audio.

video

MediaTags

string

The tags of the media asset.

  • You can specify a maximum of 16 tags.

  • Separate multiple tags with commas (,).

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

  • Each tag must be encoded in UTF-8.

test,ccc

CateId

integer

The ID of the category. You can obtain the category ID in one of the following ways:

  • Log in to the Intelligent Media Services (IMS) console and choose Media Management > Category Management to view the category ID.

  • The value of the CateId parameter in the response from the CreateCategory operation.

  • The value of the CateId parameter in the response from the GetCategories operation.

4220

Description

string

The description of the media asset.

desc

PlayInfoList

array<object>

A list of playback information objects.

object

The details for a single audio or video stream.

CreationTime

string

The creation time of the media stream, in UTC and formatted as yyyy-MM-ddTHH:mm:ssZ.

2022-05-10T02:28:49Z

Status

string

The status of the media stream. Valid values:

  • Normal

  • 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 a definition is configured for a built-in Narrowband HD 1.0 transcoding template. For more information, see Transcoding template configurations - Definition.

0

Height

integer

The height of the media stream, in pixels.

1080

Bitrate

string

The bitrate of the media stream, in kbit/s.

20

ModificationTime

string

The last modification time of the media stream, in UTC and formatted as yyyy-MM-ddTHH:mm:ssZ.

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

WatermarkId

string

The ID of the watermark associated with the media stream.

5bed88672b1e2520ead228935ed51***

Encrypt

integer

Indicates whether the media stream is encrypted. Valid values:

  • 0: The media stream is not encrypted.

  • 1: The media stream is encrypted.

0

Definition

string

The definition of the video stream. Valid values:

  • FD: Fluent

  • LD: Standard Definition

  • SD: High Definition

  • HD: Ultra High Definition

  • OD: Original

  • 2K: 2K

  • 4K: 4K

  • SQ: Standard Quality

  • HQ: High Quality

  • AUTO: Adaptive Bitrate

HD

EncryptType

string

The encryption type of the media stream. Valid values:

  • AliyunVoDEncryption: Alibaba Cloud proprietary cryptography.

  • HLSEncryption: HLS standard encryption.

Note

If the encryption type is AliyunVoDEncryption, playback requires the Alibaba Cloud Player Software Development Kit (SDK).

AliyunVoDEncryption

StreamType

string

The type of the media stream. Valid values are video and audio.

video

Size

integer

The size of the media stream, in bytes.

418112

Width

integer

The width of the media stream, in pixels.

1024

Fps

string

The frame rate of the media stream, in frames per second.

25

Duration

string

The duration of the media stream, in seconds.

9.0464

PlayURL

string

The playback URL of the media stream.

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

Format

string

The format of the media stream.

  • For video streams, valid values are mp4 and m3u8.

  • For audio-only streams, the only valid 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 of the media stream.

8

FileURL

string

The OSS File URL.

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

TransTemplateType

string

The type of the transcoding template. Valid values:

  • Normal: A normal transcoding template.

  • AudioTranscode: an audio transcoding template.

  • Remux: a remuxing template.

  • NarrowBandV1: a Narrowband HD 1.0 template.

  • NarrowBandV2: a Narrowband HD 2.0 template.

  • UHD: an audio and video enhancement template.

Normal

StreamTags

string

Stream tags that identify the transcoding type.

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

JobId

string

A unique identifier for the job.

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.