ApsaraVideo VOD allows you to store VOD resources by using Object Storage Service (OSS) buckets without the need to activate OSS. You can add existing OSS buckets to ApsaraVideo VOD without the need to perform data migration.
Overview
Media resources in ApsaraVideo VOD are stored based on OSS. You can store resources in the bucket that is allocated to ApsaraVideo VOD by the system or in OSS buckets that you add to ApsaraVideo VOD. After you activate ApsaraVideo VOD, you must enable the bucket that is allocated to ApsaraVideo VOD by the system. The bucket is used to store media files such as video, audio, image, and subtitle files. The bucket can also be used as the origin server for Alibaba Cloud CDN. If you have stored a large number of media files in an OSS bucket, you can add the bucket to ApsaraVideo VOD and perform operations such as transcoding, snapshot capture, and playback on the media files. This frees you from migrating a large amount of data to ApsaraVideo VOD.
Comparison between the VOD bucket and an OSS bucket
Item | VOD bucket | OSS bucket |
Creation method | After you activate ApsaraVideo VOD, the system allocates a bucket to ApsaraVideo VOD. | You must add an OSS bucket to ApsaraVideo VOD. |
Quantity | One bucket is allocated in each region. | You can add up to 10 OSS buckets in each region. |
Billing |
| The storage fees for media assets in OSS buckets are added to your OSS bill. No additional fees are generated on ApsaraVideo VOD. For more information about OSS billing details, see Storage fees. |
Resource management | Media assets stored in the VOD bucket are managed based on the association logic of files. This allows you to manage the assets in a simpler and more efficient manner than file management. | Do not delete or modify media files in OSS buckets by using the OSS console. If you do so, the status of media files displayed in ApsaraVideo VOD may be different from that in OSS. As a result, errors occur when you perform operations such as playback on the files. We recommend that you call the ApsaraVideo VOD API to delete media files such as videos and images. |
Supported features | All features that are supported by ApsaraVideo VOD are provided for media assets stored in the VOD bucket. For example, you can perform the following operations on media assets: media upload, transcoding, encryption, snapshot capture, playback, and AI including review and fingerprinting. | All features that are supported by ApsaraVideo VOD are also provided for media assets stored in OSS buckets. However, specific features and their usage methods may be different or have different limits on media assets stored in the VOD bucket from those stored in OSS buckets. The following items describe the features and their usage limits for media assets stored in OSS buckets:
|
Limits
You can add OSS buckets only to the region where ApsaraVideo VOD is activated, such as China (Beijing) or China (Shanghai). For more information about the supported regions of ApsaraVideo VOD, see Region IDs of ApsaraVideo VOD.
Media transcoding in ApsaraVideo VOD is implemented based on ApsaraVideo Media Processing. If an OSS bucket is added to ApsaraVideo Media Processing, you cannot add the bucket to ApsaraVideo VOD.
You cannot manage the VOD bucket in the OSS console or modify the storage addresses of objects in the VOD bucket. You can modify the storage addresses of transcoded files. For more information, see Naming rules for transcoded files.
Procedure
Create a storage address.
Enable the VOD bucket or add an OSS bucket in the region where ApsaraVideo VOD is activated. If multiple storage addresses are available, you can specify the default storage address. For more information, see Manage VOD storage.
NoteThe validity periods of storage addresses in ApsaraVideo VOD vary based on the permissions on the storage addresses. The following items describe the validity periods of storage addresses:
If you specify public read for a storage address, the address is permanently valid but is exposed to hotlinking and illegal downloads.
If you specify private read and write for a storage address, the address is valid for 3,600 seconds by default. You can specify the
AuthTimeout
parameter when you call the GetPlayInfo operation to modify the validity period of the storage address. We recommend that you specify private read and write for your storage address.
Optional: Add a domain name to accelerate.
Configure a domain name to accelerate and add a bucket as the origin server. This reduces the workload on the origin server, prevents network congestion, and speeds up resource access. For more information, see Add a domain name for CDN.
To add the VOD bucket as the origin server, you must set the origin type to OSS Domain Name and the bucket type to VOD Default Bucket. Then, select the VOD bucket from the drop-down list.
To add an OSS bucket as the origin server, you must set the origin type to OSS Domain Name and the bucket type to Custom OSS Origin. Then, select the OSS bucket from the drop-down list.
Upload media assets to the storage address.
ApsaraVideo VOD provides multiple upload methods. You can upload media assets by using the ApsaraVideo VOD console, upload tools, or SDKs, or by calling API operations. We recommend that you use upload SDKs to upload media assets. For more information, see Overview.
Perform operations such as transcoding, encryption, snapshot capture, and review on media assets.
Media assets stored in the VOD bucket: You can use the features in the same manner for new and existing media assets.
Media assets stored in an OSS bucket: Features are used for new and existing media assets in different manners.
After you add an OSS bucket to ApsaraVideo VOD and upload media assets to the bucket, you can perform operations such as transcoding, snapshot capture, and playback on these new media assets. No additional configurations are required.
To perform operations on existing media assets that are uploaded before you add the OSS bucket to ApsaraVideo VOD, you must register the media assets by calling the RegisterMedia operation. Then, you can perform operations such as transcoding, snapshot capture, and playback on the existing media assets. Perform the following steps to register the media assets:
Obtain the objects that are stored in the OSS bucket by using an OSS SDK or calling an API operation. For more information, see List objects.
Call the RegisterMedia operation to register the media assets and generate audio or video IDs. The
FileURL
parameter in the response to the RegisterMedia operation indicates the complete storage URL of objects that contains an OSS domain name.https://example.oss-cn-shanghai.aliyuncs.com/video/example.mp4
Submit transcoding, snapshot capture, and review jobs based on audio or video IDs.