All Products
Search
Document Center

Common playback settings

Last Updated: Sep 17, 2019

Overview

When playing videos in ApsaraVideo for VOD, you can select different playback URL types based on the playback scenario. You can use the following settings to control the playback URL type:

Domain name settings

Domain name configuration

Before playing videos in ApsaraVideo for VOD, ensure that your domain name has been registered and a CNAME record has been bound to the domain name. Otherwise, video playback fails. For more information, see the configuration procedures for HiChina, Xinnet, and DNSPod domain names. For more information about how to configure a CDN domain name, see Add a domain name.

URL signing configuration

URL expiration time

You can set an expiration time (AuthTimeout) for CDN URLs. For more information, see URL expiration time.

CDN reauthentication

  • If CDN reauthentication is enabled, you can set the ReAuthInfo parameter to add the uid and rand parameters to CDN authentication parameters.
  • If CDN reauthentication is disabled, you can set the rand parameter in the ReAuthInfo parameter to ensure that a different URL is generated each time. For example, you can set the rand parameter to UUID.

Selection from multiple domain names

If multiple domain names are configured for your origin, you can set PlayDomain in the PlayConfigparameter to specify the CDN domain name included in playback URLs.

HTTPS-secured acceleration

The image URLs and playback URLs returned by the API are HTTP URLs by default. To obtain HTTPS URLs, you can enable HTTPS-secured acceleration for a CDN domain name in ApsaraVideo for VOD. For more information, see HTTPS-secured acceleration.

Transcoding settings

ApsaraVideo for VOD allows you to transcode or not transcode the uploaded media files. If media files are transcoded, the playback URLs are those of transcoded streams. The format of a playback URL and the definition, encryption, and watermark ID parameters in the playback URL depend on your transcoding settings. If media files are not transcoded, the playback URLs are those of the uploaded mezzanine files for playback in original quality. For more information, see Transcoding template.

Playback settings

ApsaraVideo for VOD allows you to play videos by obtaining playback URLs or by using ApsaraVideo Player SDKs. When you play videos by obtaining playback URLs through the GetPlayInfo operation, you can configure this operation to obtain required playback URLs. When you play videos by using ApsaraVideo Player SDKs, you can configure ApsaraVideo Player SDKs so that they automatically obtain required playback URLs.

Playback operation settings

ApsaraVideo for VOD allows you to set the following parameters of the GetPlayInfo operation to obtain required playback URLs in different playback scenarios.

Definition

``The definition of a video stream. The GetPlayInfo operation allows you to specify multiple definitions at a time so that you can switch the definition based on the network conditions. If you do not set this parameter, the GetPlayInfo operation returns the playback URLs of video streams in all definitions for the specified video.

Formats

`The container format of a transcoded stream. Currently, only theMP4,MP3, andM3U8` formats are supported. The GetPlayInfo operation allows you to specify multiple formats at a time so that you can select a video stream of the appropriate format based on the playback scenario.

StreamType

``That stream type. Valid values: video and audio. You can select the appropriate stream type based on the playback scenario.

OutputType

`The type of the playback URLs that are returned. If no CDN domain name is configured, the GetPlayInfo operation returns OSS URLs by default. If a CDN domain name is configured, the GetPlayInfo operation returns CDN URLs by default. You can set theOutputType` parameter to obtain the OSS URLs or CDN URLs as required.

ResultType

`The result type. By default, ApsaraVideo for VOD provides only one playback URL for each definition and format. If you submit a media transcoding job for a video that has been transcoded, multiple playback URLs are available for each definition and format. To ensure that the latest transcoded stream is played each time, the GetPlayInfo operation returns only the latest transcoded stream in each definition and format by default. To obtain the playback URLs of all the transcoded streams, you can setResultTypetoMultiple`.

Note: When ResultType is set to Multiple, the GetPlayInfo operation can return a maximum of 100 playback URLs even if a video has more than 100 playback URLs.

Player settings

ApsaraVideo Player SDKs can automatically obtain playback URLs based on playback credentials. Currently, ApsaraVideo Player SDKs for web (HTML5 and Flash), Android, and iOS are provided. The following section describes the player settings supported for each terminal.

ApsaraVideo Player SDK for web

  • For an HTML5 player that integrates the ApsaraVideo Player SDK, you can set mediaType (indicating the output stream type), format (indicating the output file format), and definition.
  • A Flash player that integrates the ApsaraVideo can play only video files. For a Flash player that integrates the ApsaraVideo Player SDK, you can set mediaType (indicating the output stream type) and format (indicating the output file format).

ApsaraVideo Player SDK for iOS

  • With ApsaraVideo Player SDK, you can set format (indicating the output file format), and specify a definition for playback by quality.

ApsaraVideo Player SDK for Android

  • With ApsaraVideo Player SDK, you can set format (indicating the output file format), and specify a definition for playback by quality.