All Products
Search
Document Center

ApsaraVideo VOD:Media playback

Last Updated:Feb 12, 2026

ApsaraVideo VOD helps you quickly add secure and stable media playback to your applications. It provides a complete security system that includes playback credentials, URL signing, and video encryption. ApsaraVideo VOD also offers a cross-platform SDK to help you quickly implement video playback and reduce development costs. This topic describes how media playback works, playback URLs, playback methods, and playback security.

How it works

Whether an audio or video file can be played depends on its Status. Only videos with a Normal status (the Status field is Normal) can be played. You can obtain the playback URLs for these videos using the ApsaraVideo VOD API or SDK.

Note

Videos in the Checking or Blocked state can be previewed only in the ApsaraVideo VOD console or accessed from a configured review security IP address.

The following diagrams show the status changes of a video from upload to playback.

  • With transcoding

    image
  • Without transcoding

    image

Therefore, before you obtain a playback URL, you must make sure that the video status is Normal.

Determination Method

After you upload a video, it is not immediately ready for playback. ApsaraVideo VOD must first confirm that the video is received. Use event notifications to determine when the uploaded video is ready to play.

  • For videos or audio files that are not transcoded, you can play them after you receive a Video upload completed event notification. Then, you can call the GetPlayInfo operation to obtain the playback URL. Only files in the following formats can be played directly without transcoding: MP4, FLV, M3U8, MP3, and WEBM.

  • For transcoded videos, you can play them after you receive a Single Definition Transcoding Complete event notification. To ensure that all definitions are available, wait for the Transcode complete event notification before you process the video.

Prerequisites

  • Configure an accelerated domain name For more information, see Domain name requirements.

  • Resolve the CNAME record for the domain name: Make sure that you have attached a CNAME record to the domain name. Otherwise, playback fails. For more information, see Configure a CNAME record with Alibaba Cloud DNS or Configure a CNAME record on DNSPod.

  • Confirm the transcoding configuration: ApsaraVideo VOD can transcode or not transcode media files that you upload. For more information, see Audio and video transcoding.

  • Confirm the security configuration: ApsaraVideo VOD provides multiple security features to protect your video content. These include access control, URL signing, remote authentication, video encryption, and secure download. These security configurations determine whether a video can be played. For more information, see Video security.

Playback URLs

  • Configure the accelerated domain name.

    After you configure an accelerated domain name in the ApsaraVideo VOD console, the playback URL is a CDN file URL. You can view the URL on the Audio/Video > Manage > Video URL page in the console. Playback URLs can be fixed or dynamic. This depends on whether you enable URL signing in domain name management. For information about how to enable and configure URL signing, see URL signing.

    • Fixed Address

      Suitable for scenarios with low security requirements, the address remains permanently valid—that is, the address that does not contain authentication information after you disable the authentication switch (the value of the auth_key parameter in the URL is the authentication information). By default, the authentication switch is disabled after you add a domain name to the console.

    • Dynamic address

      Dynamic URLs are suitable for scenarios that have high security requirements. They are dynamically generated and expire after a specific period of time. The default validity period for dynamic URLs is the default validity period that you configure in URL signing. You can also set an expiration time when you Generate Playback URLs or Obtain Video Playback URLs. If a URL expires, Alibaba Cloud CDN returns HTTP 403 when accessed.

      Example of a dynamic URL:

      http://example.aliyundoc.com/video/aliyun-sample.mp4?auth_key=1500523200-0-0-80cd3862d699b7118eed99103f2a****
      Note

      In this example, the value of the auth_key parameter starts with 1500523200. This corresponds to 12:00:00 on July 20, 2017. If the Default Validity Period is set to 60 minutes, the URL expires at 13:00:00 on July 20, 2017.

  • If no accelerated domain name is configured

    • When no accelerated domain name is configured, the returned playback URLs are OSS file URLs. In this case, URL signing is unavailable, but OSS authentication information is generated by default. For more information, see OSS - Include Signatures in URLs. When you call the Get Video Playback URLs API to obtain playback URLs, you can still use the AuthTimeout parameter to specify the time-to-live (TTL) for the video's OSS URL, but you cannot customize authentication information based on your AccessKey.

    • If you set the storage Bucket to public-read on the Storage Management page in the console, you can ignore OSS authentication information (for more information, see Storage Management). In this case, the URL is permanently valid, but there is a risk of hotlinking and illegal downloads. Therefore, the storage Bucket should be set to private whenever possible.

For more information about common settings for playback URLs, see Common playback settings.

You can obtain playback URLs in one of the following ways:

  • Directly: View the event notification after transcoding is complete, or call the GetPlayInfo operation.

  • Using a playback credential: Use the ApsaraVideo Player SDK and call the GetVideoPlayAuth operation to obtain a playback credential. The ApsaraVideo Player SDK automatically uses the credential to obtain the playback URL.

Playback methods

  • Preview in the ApsaraVideo VOD console

    The ApsaraVideo VOD preview player provides features such as fast-forward, volume control, captions, audio tracks, resolution switching, and live comments. These features make it easy to preview your videos.预览视频

    • On the Audio/Video page in the console, select a video to preview. Encrypted streams are played by default.

    • On the Audio/Video > Manage > Video URL page in the console, select a stream to preview. To ensure video security, only unencrypted streams can be previewed.

  • Integrate the ApsaraVideo Player SDK

    • Obtain a playback credential from the server and send it to the client for playback. This method provides high security. For more information, see Obtain a playback credential.

    • ApsaraVideo Player supports URL-based playback. You can pass the obtained playback URL directly to the player. For more information, see Play a video using a playback URL.

  • Integrate a third-party player

    • Integrate a third-party player to play a video using a playback URL.

    • After you obtain a playback URL, pass it to your player. This method is flexible but requires you to implement features such as resolution switching and exception handling.

Playback security (limits on playback and download)

Billing description

  • If you configure an accelerated domain name, you are charged for the CDN service when audio or video files are played.

  • If you do not configure an accelerated domain name, you are charged for outbound traffic from storage when audio or video files are played.

For more information, see Basic service billing.

FAQ

How do I troubleshoot video playback failures?

  1. Check the network: Confirm that the client has normal network connectivity.

  2. Check the video status: call the Get Audio and Video Playback URLs API or check in the console whether the video status is Normal.

  3. Check the playback URL or credentials: check whether the auth_key has expired or the signature is valid.

  4. Check the player: Confirm that the player supports the video format. For information about the formats supported by ApsaraVideo Player, see Features of ApsaraVideo Player SDK.

For more information about troubleshooting other errors, see Troubleshoot playback errors.

How do I play encrypted videos?

ApsaraVideo VOD offers multiple encryption methods, such as Alibaba Cloud proprietary cryptography and HLS encryption. To use encryption, configure an encrypted transcoding template group to transcode the video. Then, use the ApsaraVideo Player SDK to decrypt and play the video. For more information, see Video encryption.