All Products
Search
Document Center

Intelligent Media Services:GetPlayInfo

Last Updated:Jun 15, 2026

This API retrieves the playback URL for a media file (video or audio) using a given audio/video ID. Use this URL for audio/video playback after integrating 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 media asset ID.

Note

Specify at least one of MediaId and InputURL.

86434e152b7d4f20be480574439fe***

InputURL

string

No

The InputURL used to register the media asset. For more information, see RegisterMediaInfo.

Note

Specify at least one of MediaId and InputURL.

http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4  or  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 data returned.

RequestId

string

The request ID.

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

MediaBase

object

The basic information about the media asset.

CreationTime

string

The time when the media asset was created.

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 being prepared. This process may involve uploading or compositing.

  • PrepareFail: Preparation of the source file failed. For example, the system failed to retrieve the source file metadata.

  • 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 type of the media file. Valid values:

video: A video file. audio: An audio-only file.

video

MediaTags

string

The tags.

  • You can add up to 16 tags.

  • Separate multiple tags with commas (,).

  • The maximum length of a tag is 32 bytes.

  • Tags must be UTF-8 encoded.

test,ccc

CateId

integer

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

  • Log on to the IMS console and choose media asset management > category management to view the category ID.

  • The create category operation returns the category ID in the CateId parameter.

  • The get category operation returns the category ID in the CateId parameter.

4220

Description

string

The description.

desc

PlayInfoList

array<object>

A list of audio or video playback streams.

object

The details of an audio or video stream.

CreationTime

string

The creation time. The time is in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2022-05-10T02:28:49Z

Status

string

The media stream status. Valid values:

  • Normal: The stream is available.

  • Invisible: The stream is not visible.

Normal

NarrowBandType

string

The Narrowband HD type. Valid values:

  • 0: regular.

  • 1.0: Narrowband HD 1.0.

  • 2.0: Narrowband HD 2.0.

This parameter applies only if a definition is configured in the built-in transcoding template for Narrowband HD 1.0. For more information, see Configure transcoding templates - 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. The time is in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

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

WatermarkId

string

The ID of the watermark that is associated with the media stream.

5bed88672b1e2520ead228935ed51***

Encrypt

integer

Indicates whether the media stream is encrypted. Valid values:

  • 0: No.

  • 1: Yes.

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

  • 4K

  • SQ: standard-quality audio

  • HQ: high-quality audio

  • AUTO: adaptive bitrate

HD

EncryptType

string

The encryption type of the media stream. Valid values:

  • AliyunVoDEncryption: Alibaba Cloud VoD Encryption.

  • HLSEncryption: HLS standard encryption.

Note

If a stream is encrypted with AliyunVoDEncryption, you can play it only with the Alibaba Cloud Player SDK.

AliyunVoDEncryption

StreamType

string

The type of the media stream. The value is video for video streams or audio for audio-only streams.

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 video 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 value is mp3.

mp4

HDRType

string

The High Dynamic Range (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 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: regular transcoding

  • AudioTranscode: audio transcoding

  • Remux: remuxing

  • NarrowBandV1: Narrowband HD 1.0

  • NarrowBandV2: Narrowband HD 2.0

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

Normal

StreamTags

string

The stream tags, which are used to identify the transcoding 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.