All Products
Search
Document Center

ApsaraVideo VOD:Get playback URLs

Last Updated:Jul 10, 2026

You can retrieve playback URLs through event notifications or API/SDK calls.

Get URLs via event notifications

You can receive event notifications when a video stream is transcoded to a specific definition (StreamTranscodeComplete) or when all transcoded streams are generated (TranscodeComplete). The event notifications contain playback URLs. Save these URLs on your server and return them to clients on playback requests.

Note

This method is ideal for high-concurrency playback. By caching URLs on your server and pre-warming content with the purge and prefetch feature, you can scale to millions of concurrent viewers. See Purge and prefetch.

Usage notes

  • The playback URLs obtained from event notifications are static URLs. If URL signing is enabled, you must generate a signed URL yourself.

  • If you disable or delete an old domain, you must replace it with the new domain when retrieving saved playback URLs.

  • If video encryption is configured, the returned playback URL points to an encrypted stream that the player must decrypt before playback.

Get URLs through API/SDK calls

When you upload a media file to ApsaraVideo VOD, a VideoId is assigned. Call the GetPlayInfo operation with the VideoId to retrieve the playback URL.

Usage notes

  • By default, this operation returns only the latest transcoded stream in each definition and format. When calling the GetPlayInfo API, you can set ResultType to Multiple to retrieve all completed streams for the video.

  • If you have enabled Alibaba Cloud proprietary cryptography, the video can only be played using the ApsaraVideo Player. By default, the GetPlayInfo API does not return privately encrypted streams. You can set ResultType to Multiple to retrieve all completed streams, including encrypted ones.

  • If you have enabled HLS encryption, the API returns the standard encrypted stream with priority for playback by default.

  • If you have configured tiered storage for your media files, this API behaves as follows:

    • By default, the API returns playback streams for Standard storage class. For non-standard tiers such as Archive, the API does not return a playback stream. If the source file is in a non-standard tier, the API returns transcoded streams but not the source video stream.

    • You can set the StorageClass field within the PlayConfig parameter to request streams from a specified non-standard storage tier.

Workflow

The following diagram shows the workflow for retrieving and playing a video through a CDN-accelerated domain.

image
  1. The client sends a request to your application server to get a playback URL.

  2. The server calls GetPlayInfo using the Server SDK to obtain the playback authorization.

  3. ApsaraVideo VOD returns the playback URL to the server.

  4. The server returns the playback URL to the client.

  5. The client player requests media resource based on the returned playback URL.

  6. If the resource is not cached on the CDN POP or the cache has expired, the CDN performs an origin-pull from the OSS bucket.

  7. The OSS bucket returns the resource to the CDN POP, which then caches the resource.

  8. The CDN POP serves the media resource to the client.

What to do next