All Products
Search
Document Center

ApsaraVideo VOD:GetPlayInfo

Last Updated:Mar 31, 2026

Retrieves playback URLs for a media asset by providing its ID. You can then use these URLs to play the audio/video content with ApsaraVideo Player or any third-party player, such as a native system player, open-source player, or a self-developed one.

Operation description

  • Before using this API, ensure you fully understand the pricing and billing methods for the ApsaraVideo VOD service. Playing or downloading content from a VOD playback URL will incur outbound traffic fees. If an accelerated domain is not configured, refer to Outbound traffic. If an accelerated domain is configured, refer to Acceleration. If you have enabled cross-region transfer acceleration, additional fees will apply. For details, see Transfer acceleration.

  • Only videos with a Status of Normal can be played. For more information on playback URL usage and limitations, see Media playback.

  • If a media asset is not in the Standard storage class, set the StorageClass field of the PlayConfig parameter accordingly. For more information, see PlayConfig.

  • If you encounter playback issues, call the GetMezzanineInfo API to verify the source file information.

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

vod:GetPlayInfo

get

*All Resource

*

None

None

Request parameters

Parameter

Type

Required

Description

Example

VideoId

string

No

The ID of media asset. Only one ID is supported per request. You can obtain the ID in one of the following ways:

93ab850b4f654b6e91d24d81d44****

Formats

string

No

A comma-separated list of media stream formats to retrieve. Valid values:

  • mp4

  • m3u8

  • mp3

  • flv

  • mpd

Note
  • By default, streams in all formats are returned.

  • The mpd format is only available if DASH packaging was configured in the transcoding template. For more information, see Container.

mp4,m3u8

AuthTimeout

integer

No

The validity period of the playback URL, in seconds.

  • If OutputType is set to cdn:

    • The URL expires only if URL signing is enabled. Otherwise, it is permanently valid. For more information about URL signing, see Configure URL signing.

    • Minimum value: 1.

    • Maximum value: No limit.

    • Default value: The validity period configured in your URL signing settings.

  • If OutputType is set to oss:

    • The URL expires only if the storage access permission is set to private. Otherwise, it is permanently valid.

    • Minimum value: 1.

    • Maximum value: To mitigate security risks, the maximum value is 604800 (7 days) for VOD bucket and 129600 (36 hours) for your own OSS buckets. If you require a longer validity period, set OutputType to cdn and use URL signing.

    • Default value: 3600.

1800

OutputType

string

No

The type of playback URL to return. Valid values:

  • oss: OSS URL (source origin).

  • cdn (default): accelerated URL.

cdn

StreamType

string

No

A comma-separated list of media stream types to retrieve. Valid values:

  • video

  • audio

If not specified, all available stream types are returned.

video

ReAuthInfo

string

No

A JSON string containing parameters for secondary CDN authentication. Use this parameter to set the uid and rand fields for Type A URL signing. For more information, see Type A signing.

{"uid":"12345","rand":"abckljd"}

Definition

string

No

The definition of the video stream. Separate multiple definitions with commas (,). Valid values:

  • FD: Low definition.

  • LD: Standard definition.

  • SD: High definition.

  • HD: Ultra high definition.

  • OD: Original quality.

  • 2K: 2K.

  • 4K: 4K.

  • SQ: Standard quality.

  • HQ: High quality.

  • AUTO: Adaptive bitrate.

Note
  • By default, streams of all definitions are returned.

  • This parameter is required when generating a video with a traceable watermark. The value must match the resolution set for transcoding.

  • The AUTO format is only available if adaptive bitrate streaming was configured in the transcoding template. For more information, see PackageSetting.

LD

ResultType

string

No

The type of data to return for each format and definition. Valid values:

  • Single (default): Returns only the most recently transcoded stream for each format/definition pair.

  • Multiple: Returns all transcoded streams for each format/definition pair.

Single

PlayConfig

string

No

A JSON string for custom playback settings, such as specifying a playback domain. For more information about the parameter structure, see PlayConfig.

Note
  • If PlayConfig or its PlayDomain field is not set, the API uses the default domain configured in VOD. If no default domain is set, it uses the most recently modified domain. We recommend setting a default domain in the ApsaraVideo VOD console (Choose Configuration Management > Media Management > Storage > Manage > Origin Domain Name)

  • When EncryptType in PlayConfig is set to AliyunVoDEncryption, private encrypted streams are not returned by default for security. To retrieve them, you must also set ResultType to Multiple.

{"PlayDomain":"vod.test_domain","XForwardedFor":"yqCD7Fp1uqChoVj/sl/p5Q==","PreviewTime":"20","MtsHlsUriToken":"yqCD7Fp1uqChoVjslp5Q"}

AdditionType

string

No

Set to danmu to retrieve the URL for bullet chat (danmaku) overlay data.

Note

This parameter is only effective when OutputType is cdn.

danmu

Trace

string

No

User-defined information for a digital watermark.

  • If you set DigitalWatermarkType to TraceMark, the value of this parameter is embedded as the traceable watermark information. The API returns a video stream URL containing this watermark. The value supports English letters, digits, and Chinese characters, up to 1024 characters.

  • If you set DigitalWatermarkType to CopyrightMark, the value must match the watermark text defined in the watermark template. The API returns the video stream with the specified copyright watermark.

test mark

DigitalWatermarkType

string

No

The type of the digital watermark. Valid values:

  • TraceMark: tracing watermark.

  • CopyrightMark: copyright watermark.

TraceMark

ReferenceId

string

No

Custom ID. Supports letters, digits, hyphens (-), and underscores (_). Length: 6 to 64 characters. Must be unique per user.

123-123

Response elements

Element

Type

Description

Example

object

The response.

RequestId

string

The request ID.

F552E596-967D-5500-842F-17E6364****

VideoBase

object

The basic information about the audio or video file.

CreationTime

string

The time when the audio or video file was created. The time is in the yyyy-MM-ddTHH:mm:ssZ format in UTC.

2017-06-26T06:38:48Z

Status

string

The status of the audio or video file. For more information about the valid values and descriptions, see Status: Audio and video statuses.

Normal

VideoId

string

The ID of the audio or video file.

93ab850b4f654b6e91d24d81d44****

CoverURL

string

The URL of the thumbnail.

Note

To obtain the thumbnail URL in real time after uploading a video, configure ApsaraVideo VOD callbacks. For more information, see HTTP callback and Thumbnail capture complete.

http://example.aliyundoc.com/sample.jpg?auth_key=2333232-atb****

Duration

string

The duration of the audio or video file. Unit: seconds.

3.1667

Title

string

The title of the audio or video file.

Alibaba Cloud VOD

MediaType

string

The type of the media file. Valid values:

  • video: video.

  • audio: audio-only.

video

DanMuURL

string

The URL of the live comment overlay data.

http://example.aliyundoc.com/****?auth_key=abdf2123-6783232****

StorageClass

string

The storage class of the media asset. Valid values:

  • Standard: Standard.

  • IA: Infrequent Access (IA).

  • Archive: Archive.

  • ColdArchive: Cold Archive.

  • SourceIA: Source IA.

  • SourceArchive: Source Archive.

  • SourceColdArchive: Source Cold Archive.

  • Changing: The storage class is being changed.

  • SourceChanging: The storage class of the source file is being changed.

Standard

PlayInfoList

object

PlayInfo

array<object>

The playback information of the audio or video stream.

object

The details of the audio or video file.

CreationTime

string

The time when the stream was created. The time is in the yyyy-MM-ddTHH:mm:ssZ format in UTC.

2022-04-18T07:37:15Z

Status

string

The status of the media stream. Valid values:

  • Normal: The stream is in the normal state. This status is assigned to the latest transcoded stream for each definition and format.

  • Invisible: The stream is in the invisible state. If multiple streams are generated for the same definition and format, the latest stream is marked as Normal and the others are marked as Invisible.

Normal

Specification

string

The specifications of the transcoded output. For more information about the valid values and descriptions, see Specification: Output specifications.

H264.LD

NarrowBandType

string

The transcoding type. Valid values:

  • 0: Normal transcoding.

  • 1.0: Narrowband HD 1.0.

  • 2.0: Narrowband HD 2.0.

0

Height

integer

The height of the media stream. Unit: px.

640

Bitrate

string

The bitrate of the media stream. Unit: Kbps.

Note

Due to the dynamic sharding feature of M3U8, the calculated bitrate may have a drift.

450.878

ModificationTime

string

The time when the stream was last updated. The time is in the yyyy-MM-ddTHH:mm:ssZ format in UTC.

2022-04-20T06:32:19Z

WatermarkId

string

The ID of the watermark template associated with the current media stream.

dgfn26457856****

Encrypt

integer

Indicates whether the media stream is encrypted. Valid values:

  • 0: No.

  • 1: Yes.

1

Definition

string

The definition of the video stream. Valid values are:

  • FD: Low definition.

  • LD: Standard definition.

  • SD: High definition.

  • HD: Ultra high definition.

  • OD: Original quality.

  • 2K: 2K resolution.

  • 4K: 4K resolution.

  • SQ: Standard-quality audio.

  • HQ: High-quality audio.

  • AUTO: Adaptive bitrate.

LD

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, you can play the stream only using ApsaraVideo Player SDK.

AliyunVoDEncryption

EncryptMode

string

The encryption mode of the media stream. Valid values:

  • License: Local decryption mode.

Note

If the encryption mode is License, you can play the stream only using ApsaraVideo Player SDK.

License

StreamType

string

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

video

JobId

string

The ID of the transcoding job for the media stream. This ID serves as the unique identifier for the media stream.

80e9c6580e754a798c3c19c59b16****

Size

integer

The size of the media stream. Unit: byte.

Note

Due to the dynamic sharding feature of M3U8, the calculated stream size may have a drift.

418112

Width

integer

The width of the media stream. Unit: px.

360

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://example.aliyundoc.com/d52ee123f331466aabf6ab32a93d****/a777f9e24e6e47a2a942467d5c38ea37-8ee8e04293c6657fdda282bc422704****.m3u8

Format

string

The format of the media stream.

  • The value is mp4 or m3u8 for a video file.

  • The value is mp3 for an audio-only file.

m3u8

HDRType

string

The High Dynamic Range (HDR) type of the media stream. Valid values:

  • HDR

  • HDR10

  • HLG

  • DolbyVision

  • HDRVivid

  • SDR+

HLG

BitDepth

integer

The color depth. The value is an integer.

8

JobType

integer

The type of the digital watermark. Valid values:

  • 1: Tracing watermark.

  • 2: Copyright watermark.

2

JobExt

string

The custom watermark information for the copyright watermark. This field is returned only when JobType is 2.

CopyrightMarkTest

CodecName

string

The encoding type. Valid values:

  • H264

  • H265

H264

Examples

Success response

JSON format

{
  "RequestId": "F552E596-967D-5500-842F-17E6364****",
  "VideoBase": {
    "CreationTime": "2017-06-26T06:38:48Z",
    "Status": "Normal",
    "VideoId": "93ab850b4f654b6e91d24d81d44****",
    "CoverURL": "http://example.aliyundoc.com/sample.jpg?auth_key=2333232-atb****",
    "Duration": "3.1667",
    "Title": "Alibaba Cloud VOD",
    "MediaType": "video",
    "DanMuURL": "http://example.aliyundoc.com/****?auth_key=abdf2123-6783232****",
    "StorageClass": "Standard"
  },
  "PlayInfoList": {
    "PlayInfo": [
      {
        "CreationTime": "2022-04-18T07:37:15Z",
        "Status": "Normal",
        "Specification": "H264.LD",
        "NarrowBandType": "0",
        "Height": 640,
        "Bitrate": "450.878",
        "ModificationTime": "2022-04-20T06:32:19Z",
        "WatermarkId": "dgfn26457856****",
        "Encrypt": 1,
        "Definition": "LD",
        "EncryptType": "AliyunVoDEncryption",
        "EncryptMode": "License",
        "StreamType": "video",
        "JobId": "80e9c6580e754a798c3c19c59b16****",
        "Size": 418112,
        "Width": 360,
        "Fps": "25",
        "Duration": "9.0464",
        "PlayURL": "https://example.aliyundoc.com/d52ee123f331466aabf6ab32a93d****/a777f9e24e6e47a2a942467d5c38ea37-8ee8e04293c6657fdda282bc422704****.m3u8",
        "Format": "m3u8",
        "HDRType": "HLG",
        "BitDepth": 8,
        "JobType": 2,
        "JobExt": "CopyrightMarkTest",
        "CodecName": "H264"
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.