To store live recordings in Object Storage Service (OSS), you must first create an OSS bucket and grant write permissions on OSS to ApsaraVideo Live. Then, you can view, download, and play the live recordings stored in OSS.

If you modify the configuration of a template that is used to store live recordings in OSS, the modification takes effect only for newly ingested streams.

Create an OSS bucket

  1. Log on to the OSS console.
  2. In the Bucket Management section, click Create Bucket.
  3. Specify the information about the bucket.
    Note The region where the bucket resides must be the same as the region where the live domain resides.

    Assume that the live domain resides in the China (Shanghai) region. In this case, you must select China (Shanghai) from the Region drop-down list. After you create the bucket, you can create folders in the bucket as needed.

  4. On the Buckets page, click the name of the created bucket. On the Files page, click Create Folder.
    Note If you have multiple recordings, you can create folders to classify and store the recordings. This facilitates the recording management.
  5. In the Create Folder panel, set the Folder Name parameter and click OK.

Grant write permissions on OSS to ApsaraVideo Live

To enable ApsaraVideo Live to store live recordings and snapshots in OSS, you must authorize ApsaraVideo Live to access OSS. You can assign the AliyunMTSDefaultRole role to ApsaraVideo Live.

  1. To store live recordings in your OSS bucket, authorize ApsaraVideo Live to access OSS.
  2. Check whether the authorization is successful by performing the following operations: Log on to the Resource Access Management (RAM) console by using your Alibaba Cloud account. In the left-side navigation pane, click RAM Roles. Search for the AliyunMTSDefaultRole role. Attach a policy to the role.
  3. If you use a RAM user to check whether the AliyunMTSDefaultRole role is assigned to ApsaraVideo Live, you must use the Alibaba Cloud account to which the RAM user belongs to grant the AliyunRAMFullAccess permission to the RAM user.

Configure a domain name for CDN

When you store live recordings in OSS, you can configure a domain name for CDN. This way, the recordings are CDN accelerated when you view the recordings. Alibaba Cloud CDN delivers videos stored in your OSS bucket to CDN nodes that are deployed all over China. Users access the nearest CDN nodes to read files without accessing the source files in OSS or consuming OSS Internet traffic. This improves the access speed and experience of edge users. This also reduces the overall network costs because the fees for CDN Internet traffic are only 50% of the fees for OSS Internet traffic.

  1. On the Overview page of the created bucket, choose Transmission > Domain Names. Then, click Bind Custom Domain Name.
  2. In the Bind Custom Domain Name panel, configure a domain name for CDN and click Submit.
    If you only store videos, you do not need to configure a domain name for CDN.
    Note The domain name for CDN must be different from the domain name for ApsaraVideo Live. You must separately configure the two domain names.