This topic describes how to configure Object Storage Service (OSS) to store live stream recordings in OSS buckets.
Background information
To store live stream recordings in OSS, you must create an OSS bucket and grant ApsaraVideo Live the permissions to write data to OSS. Then, you can view, download, and play the recordings stored in the OSS bucket. If you modify the configuration of a template that is used to store live stream recordings in OSS, the modification takes effect only for newly ingested streams.
Create an OSS bucket
For information about how to create an OSS bucket, see Create a bucket.
The OSS bucket that is used to store the live stream recordings must reside in the same region where the live center of the live stream domain is located.
For example, if the live center of the live stream domain resides in the China (Shanghai) region, you must create an OSS bucket in the China (Shanghai) region. After you create the bucket, you can create directories to better manage the recordings.
When you activate ApsaraVideo Live, you automatically grant ApsaraVideo Live the permissions to write data to OSS. If the permissions are deleted by accident, you can follow the instructions in the next section to grant the permissions again.
Grant the write permissions on OSS to ApsaraVideo Live
To enable ApsaraVideo Live to store live stream recordings and snapshots in OSS, you must authorize ApsaraVideo Live to access OSS by assigning the AliyunMTSDefaultRole role.
To authorize ApsaraVideo Live to access OSS, click Confirm Authorization Policy on the Cloud Resource Access Authorization page.
Check whether the authorization is successful.
Account type
Method
Alibaba Cloud account
Log on to the Alibaba Cloud official website by using your Alibaba Cloud account and go to the RAM console.
In the left-side navigation pane, choose
.Search for and click the AliyunMTSDefaultRole role to view the permissions.
RAM user
Use your Alibaba Cloud account to attach the AliyunRAMReadOnlyAccess policy to a RAM user.
Log on to the RAM console as the RAM user.
In the left-side navigation pane, choose
.Search for and click the AliyunMTSDefaultRole role to view the permissions.
You can create a RAM role to issue a Security Token Service (STS) token that is valid for a temporary period. This is a more secure method to grant access permissions.
Configure an accelerated domain name
You can configure an accelerated domain name for the OSS bucket to accelerate content delivery. Alibaba Cloud CDN distributes the recorded videos that are stored in OSS to points of presence (POPs) deployed around the world. Users can access files from the nearest POPs instead of the OSS bucket. This improves the access speed and reduces the overall bandwidth costs because the fees for CDN Internet traffic are only 50% of the fees for OSS Internet traffic. For information about how to configure an accelerated domain name, see Access acceleration by using Alibaba Cloud CDN.
If you use the OSS bucket only to store recordings, you do not need to configure an accelerated domain name.
The domain name for CDN must be different from the domain name used for ApsaraVideo Live.