All Products
Search
Document Center

ApsaraVideo Live:Configure OSS

Last Updated:Dec 04, 2023

This topic describes how to configure Object Storage Service (OSS) before you store live stream recordings in OSS.

Background information

To store live stream recordings in OSS, you must first create an OSS bucket and grant the write permissions on OSS to ApsaraVideo Live. 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

Important

If you use a Resource Access Management (RAM) user to create an OSS bucket, you must grant the required permissions to the RAM user. For more information, see Use the credentials of a RAM user to log on to the OSS console.

  1. Log on to the OSS console.

  2. On the Buckets page, click Create Bucket.

  3. In the Create Bucket panel, specify the information about the bucket and click OK. For more information, see Create a bucket.

    Note

    The region of the bucket must be the same as the region where the domain name used for ApsaraVideo Live resides.

    For example, if the domain name resides in the China (Shanghai) region, you must select China (Shanghai) from the Region drop-down list. After you create the bucket, you can create directories in the bucket.

  4. On the Buckets page, click the name of the created bucket. In the left-side navigation pane, choose Object Management > Objects. Then, click Create Directory.

    Note

    If you have a number of recordings, you can create directories to classify and store the recordings. This facilitates the recording management.

  5. In the Create Directory panel, specify the Directory Name parameter and click OK.

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 ApsaraVideo Live.

  1. To authorize ApsaraVideo Live to access OSS, click Confirm Authorization Policy on the Cloud Resource Access Authorization page.

  2. Check whether the authorization is successful.

    Account type

    Method

    Alibaba Cloud account

    1. Log on to the Alibaba Cloud official website by using your Alibaba Cloud account and go to the RAM console.

    2. In the left-side navigation pane, choose Identities > Roles.

    3. Search for and click the AliyunMTSDefaultRole role to view the permissions.

    RAM user

    1. Use your Alibaba Cloud account to attach the AliyunRAMReadOnlyAccess policy to a RAM user.

    2. Log on to the RAM console as the RAM user.

    3. In the left-side navigation pane, choose Identities > Roles.

    4. Search for and click the AliyunMTSDefaultRole role to view the permissions.

Note

You can create a RAM role to issue a Security Token Service (STS) token that is valid within a temporary period. This is a more secure method to grant access permissions.

Configure a domain name for CDN

If you store live stream recordings in OSS, you can configure a domain name for CDN to accelerate content delivery when you view the recordings. Alibaba Cloud CDN delivers the recorded videos that are stored in OSS to points of presence (POPs) deployed around the world. Users access the nearest POPs to read files without accessing the source objects in OSS or consuming OSS Internet traffic. This improves the access speed and experience of edge users, and also reduces the overall network costs because the fees for CDN Internet traffic are only 50% of the fees for OSS Internet traffic.

  1. In the left-side navigation tree of the bucket details page, choose Bucket Settings > Domain Names. On the Domain Names page, click Map Custom Domain Name.

  2. In the Map Custom Domain Name panel, specify 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 used for ApsaraVideo Live. You must separately configure the two domain names.