Console configuration

更新时间:
复制 MD 格式

This topic describes the required ApsaraVideo Live console configurations for an interactive classroom project, including ingest and streaming domains and Interactive Messaging applications. The configurations are presented in the following order: Prerequisites, Ingest domain configuration, Streaming domain configuration, Interactive scenario configuration, and Whiteboard configuration.

Prerequisites

  1. Register an Alibaba Cloud account and complete real-name verification.

  2. Activate ApsaraVideo Live. For more information, see Activate Service.

  3. You must prepare an ingest domain and a streaming domain, and complete the ICP filing for them. For more information, see Register an Alibaba Cloud domain name and ICP filing.

    Note
    • If your live center is located outside the Chinese mainland and you select Outside Chinese Mainland or Outside Chinese Mainland as the acceleration region, your domains do not require an ICP filing.

    • If the ingest domain and the streaming domain are subdomains of the same primary domain, you only need to complete the ICP filing for the primary domain.

  4. Attach the AliyunFCFullAccess, AliyunLiveFullAccess, and AliyunVODFullAccess system policies. For more information, see Create a RAM user and grant permissions.

Ingest domain configuration

Configure the ingest domain on the ApsaraVideo Live console.

Add an ingest domain

  1. In the navigation pane on the left, choose Domains. On the Domain Management page, click Add Domain.

  2. Configure the parameters to add your domain.

    1. For Domain Type, select Ingest Domain.

    2. For information about how to select an acceleration region, see Select an acceleration region for a domain name.

    3. For Domain Name, enter your ingest domain.

    4. For information about how to select a live center, see Select a live center.

    Important

    The ingest domain and streaming domain must be in the same live center region. This setting cannot be changed after the initial configuration.

    Note

    When adding a domain to ApsaraVideo Live for the first time, you must verify its ownership by following the on-screen prompts. For more information, see Verify domain ownership.

  3. Click Next and follow the prompts to configure a CNAME record. This record directs user traffic to live streaming nodes for accelerated access.

    DNS changes can take 5 to 10 minutes to propagate. After the verification is successful, Configured is displayed next to your ingest domain.

Your ingest domain is now configured. The result on the console is shown below.

On the Domain Management page, the Status of the ingest domain is Running.

Note

The CNAME status on the console may update with a delay. The CNAME verification result is the definitive confirmation of a successful configuration.

View authentication key

The URL authentication feature protects your content from unauthorized access and piracy. This feature is enabled by default when you add a domain.

  1. On the ApsaraVideo Live console, go to the Domains page. Find your ingest domain and click Configure in the Actions column.

  2. Choose Stream Management > Access Control.

  3. Find and record the primary key of your ingest domain for your server-side deployment.

    On the URL Authentication tab, you can view the primary key in the Authentication URL Settings section.

Streaming domain configuration

Configure the streaming domain on the ApsaraVideo Live console.

Add a streaming domain

Adding a streaming domain follows the same steps as adding an ingest domain, except you must select Streaming Domain for Domain Type.

Warning

The streaming domain and the ingest domain must be in the same live center region.

After you add the streaming domain, it is configured with the specified parameters. The result on the console is shown below.

In the domain management list, the CNAME Status for the domain is Configured, and the Status is Running.

View authentication key

URL authentication is enabled by default. Record the primary key for the streaming domain. The procedure is the same as that for the ingest domain, as described in the View the authentication key section.

Associate ingest domain

Next, you must associate the ingest domain with the corresponding streaming domain.

  1. In the navigation pane on the left, choose Domains to go to the Domain Management page.

  2. Find your streaming domain and click Configure in the Actions column.

  3. Choose Stream Management > Basic Settings, click the Ingest Information tab, and then click Add Ingest Information.

  4. Select the ingest domain from the same live center and click OK.

After you complete these steps, the streaming domain and the ingest domain are associated. The result on the console is shown below.

The Ingest Information tab displays the associated ingest domain, CNAME, Ingest Protocols (RTMP and RTS are enabled by default, SRT is disabled by default), Ingest URL (in the format rtmp://ingest-domain/AppName/StreamName), and Ingest Callback URL.

Configure CORS

Cross-Origin Resource Sharing (CORS) is a standard HTML5 feature that allows a web page to securely load and access resources from a different origin. For more information, see Cross-Origin Resource Sharing. To enable web-based playback for this project, you must configure the streaming domain's response headers to allow CORS.

  1. In the navigation pane on the left, choose Domains. On the Domain Management page, find your streaming domain and click Configure in the Actions column.

  2. Choose Stream Management > HTTP Header and click Add.

  3. Set the parameter to Access-Control-Allow-Origin and the value to *.

For detailed instructions, see Configure HTTP response headers. After the configuration is successful, the result on the console is shown below.

The HTTP Header list displays the added header parameter Access-Control-Allow-Origin with a value of *.

Enable HTTPS

HTTPS acceleration encrypts user information to prevent data leakage and verifies data integrity to prevent man-in-the-middle (MITM) attacks like DNS hijacking or content tampering. For more information, see Configure HTTPS secure acceleration.

Note

After purchasing a certificate, apply for it on the console. You can use the certificate only after your application is approved. For more information, see Purchase a commercial SSL certificate.

In the navigation pane on the left, choose HTTPS. In the HTTPS Certificate section, the certificate switch is enabled, and detailed information such as Certificate Type (Cloud Shield Certificate), Certificate Name, Certificate Brand, and Expiration Time is displayed.

Configure transcoding template

Live transcoding resolves playback issues, such as poor quality or buffering, that are caused by inconsistent bitrates from the ingest source. For more information on configuring standard transcoding, see Configure standard transcoding.

Note

Record the AppName. The transcoding template takes effect only when the AppName in the ingest URL matches the AppName of the transcoding template.

Activate RTS

Real-time Streaming (RTS) is a value-added feature of ApsaraVideo Live that provides a live video service with easy client access, ultra-low latency, high concurrency, and smooth HD streaming. For an overview, see Real-time Streaming (RTS).

  1. Log on to the ApsaraVideo Live console.

  2. In the navigation pane on the left, choose Feature Center > RTS.

  3. Select a streaming domain.

  4. Turn on the RTS switch and select Sub-second Latency (700ms-900ms end-to-end latency).

The sub-second latency mode supports RTMP and ARTC for ingest and HLS, FLV, RTMP, and ARTC for playback. Live streams that contain B-frames and AAC are not supported.

Configure recording and playback

Use the ApsaraVideo Live recording feature to enable recording and playback for your applications. For more information, see Recording.

Record to VOD

  1. In the left-side navigation pane, click Domain Names. The Domain Management page appears.

  2. Find the streaming domain that you want to configure and click Domain Settings in the Actions column.

  3. In the left-side navigation pane, choose Feature Management > Recording.

  4. Select the streaming domain that you want to configure. On the VOD tab, click Add.

  5. In the dialog box that appears, select a transcoding template and click OK. For more information about recording template parameters, see Store recordings in ApsaraVideo VOD.

    Note
    • Transcode audio to AAC in the transcoding template to ensure compatibility.

    • If no transcoding template is configured in ApsaraVideo VOD, go to the ApsaraVideo VOD console to configure one.

Record to OSS

  1. Log on to the ApsaraVideo Live console.
  2. In the left-side navigation pane, choose Feature Management > Recording.

  3. Select the streaming domain that you want to configure. Click the OSS tab, and then click Add.

  4. Configure the recording template.

  5. Click OK. For more information about recording template parameters, see Store recordings in OSS.

Interactive scenario

Create an interactive messaging application

This project requires interactive features, so you must create an Interactive Messaging application as follows:

  1. In the navigation pane on the left of the ApsaraVideo Live console, click Feature Center > Interactive Messaging > Application Management.

  2. Click Create Application.

  3. In the Create Application dialog box, select a region and enter an application name. Leave the callback settings and security review options disabled for now.

  4. Click Create. The new application is added to the list, and the system automatically generates an AppId, AppKey, and AppSign.

The application status is displayed as Enabled. The Actions column provides options to View Details, Disable, and Delete.

Click View Details to view and record the AppId, AppKey, and AppSign for your server-side deployment.

Create an RTC application

This project requires co-streaming and stream mixing, so you must create a Real-Time Communication (RTC) application. This feature enhances class interactivity by allowing students to ask questions and join the teacher for co-streaming Q&A sessions. When a student co-streams with the teacher, the audience receives a mixed stream from all participants, as shown in the following figure.

image..png

To create an RTC application on the console, follow these steps:

  1. In the navigation pane on the left of the ApsaraVideo Live console, click Feature Center > RTC > Application Management.

  2. On the Application Management page, click Create Application, enter a custom Application Name, accept the Terms of Service, and then click Purchase Now.

    Note

    Creating an application is free of charge. You are billed on a pay-as-you-go basis for your actual usage. For more information, see RTC pricing.

  3. After a success message appears, refresh the Application Management page to view your new RTC application.

  4. Click the RTC application. On the Server-side Stream Relay page, in the Global Server-side Stream Relay to ApsaraVideo Live section, enable Server-side Stream Relay. Enter the streaming domain that you added in the Add an ingest domain step (it cannot be a sub-streaming domain) and enable Single-stream Relay. If you want to configure recording or snapshots, you must configure them for this domain.

On the Application Management page, the Status of the newly created RTC application is Enabled.

In the management interface, view and record the AppId and AppKey for your server-side deployment.

Whiteboard configuration

This project uses the Netease CommsEase whiteboard service, which supports tools like drawing and text. In the Netease CommsEase console, activate and configure the interactive whiteboard feature. Then, navigate to Application Configuration, click the AppKey Management tab, and record the AppKey and AppSecret for server-side deployment. For more information on configuring the interactive whiteboard, see the Interactive Whiteboard Quick Start Guide.

Summary

In this document, we have completed all the prerequisites for the interactive classroom project, including Prerequisites, Ingest domain configuration, Streaming domain configuration, Interactive scenario configuration, and Whiteboard configuration. The information that you need to record for subsequent server-side deployment is as follows.

  1. The domain name and primary key for both the ingest and streaming domains.

  2. The AppId, AppKey, and AppSign for the Interactive Messaging application.

  3. The AppId and AppKey for the RTC application.

  4. The AppKey and AppSecret for the interactive whiteboard.