This topic shows you how to add and configure domain names for Content Delivery Network (CDN), obtain a streaming URL, and push and play streams.
- An Alibaba Cloud account is created. For more information, see Sign up with Alibaba Cloud.
- Two licensed domains are available. For more information about how to apply for an ICP license, see ICP filing.
- If you select a live center and use CDN nodes for domain names that are hosted outside mainland China, you do not need to apply for an ICP license.
- If the ingest domain and streaming domain that you want to add are second-level domains under the same top-level domain, you need to apply for an ICP license only for the top-level domain.
If you are using ApsaraVideo Live for the first time, you can start with Limits.
Activate ApsaraVideo Live
- Log on to the Alibaba Cloud International site (alibabacloud.com). In the top navigation bar, choose .
- On the ApsaraVideo Live product page, click Buy Now.
- On the ApsaraVideo Live activation page, select Pay-By-Traffic as the billing method. Read and accept the service agreement, and click Activate Now. Then, you can go to the ApsaraVideo Live console.
Add an ingest domain and streaming domain
- To add an ingest domain, set the Domain Type parameter to Ingest Domain. To add a streaming domain, set the Domain Type parameter to Streaming Domain.
- The ingest domain and streaming domain must be different.
- When you add a domain name to ApsaraVideo Live, ApsaraVideo Live verifies the ownership of the domain name. For more information, see Verify the ownership of a domain name.
- Log on to the ApsaraVideo Live console.
- In the left-side navigation pane, click Domains to go to the Domain Management page.
Configure a CNAME record
You must configure a canonical name (CNAME) record to map your domain name for CDN to the CNAME that is allocated by ApsaraVideo Live. This way, the requests sent to the domain name can be redirected to the CDN nodes provided by ApsaraVideo Live for content delivery acceleration.
- On the Domain Management page, find the streaming domain that you added in the previous step and copy the CNAME of the domain name.
Note If an exclamation point (!) exists in the CNAME column, no CNAME record has been configured for the domain name that you specified. You can perform the following steps to configure a CNAME record.
- Add a CNAME record for the domain name.
The following example shows you how to add a CNAME record for a domain name in the Alibaba Cloud DNS console. If your DNS service is provided by other DNS service providers, such as DNSPod, Xinnet, or GoDaddy, add a CNAME record for your domain name in the system of your service provider. The procedure is similar to the procedure that is described in this topic.
- Log on to the Alibaba Cloud DNS console.
- On the Manage DNS page, find the domain name that you want to manage and click Configure in the Actions column.
- Click Add Record and add a CNAME record.
- Type: Select
CNAME- Canonical namefrom the drop-down list.
- Host: Enter the prefix of the domain name for CDN.
Domain name for CDN Host
- ISP Line: Use the default value.
- Value: Enter the CNAME that you copied in the previous step.
- TTL: Use the default value.
- Type: Select
- Click Confirm.
- After you add a CNAME record for the streaming domain, you must perform the same steps to add a CNAME record for the ingest domain.
Note The CNAME records take effect shortly after they are added.
- A new CNAME record takes effect immediately. A modified CNAME record takes effect within 72 hours.
- If you encounter record conflict issues when you add a CNAME record, change the domain name or solve the problem by referring to Evaluate record conflicts.
- It takes about 10 minutes until the status of the CNAME is updated. Therefore, even if you have configured a CNAME record, the No CNAME record is added message may be displayed on the Domain Management page in the ApsaraVideo Live console. In this case, ignore the message.
- Check whether the CNAME record takes effect.
The time required for a CNAME record to take effect varies with the DNS service provider. You can run the
digcommand followed by a domain name for CDN to check whether the new CNAME record takes effect. If your request to the domain name for CDN is redirected to
*.*kunlun*.com, both the CNAME record and the CDN service take effect.
Bind an ingest domain to a streaming domain
ApsaraVideo Live uses the edge pushing method. To push and play streams, you must bind an ingest domain to a streaming domain.
- On the Domain Management page, find the streaming domain that you added and click Domain Settings.
- Choose Basic Information tab.
and click the On this tab, you can view the CNAME record, time when the domain name was added, domain type, live center, and edge group of the domain.
- Click the Stream Ingest Information tab.
- Click the Edit icon next to Add Stream Ingest Information or Ingest Domain, select the ingest domain that you want to bind to, and then click OK.
Configure URL authentication
The URL authentication feature can be used to protect resources on origin servers from unauthorized access and downloads. By default, URL authentication is enabled. We recommend that you keep this feature enabled to prevent your content from being pirated.
You can use the default URL authentication method or a custom URL authentication method based on your business requirements.
- Default URL authentication
If you select the default URL authentication method, no additional configuration is required.
- Custom URL authentication
If you do not want to use the default configuration, you can customize Primary Key, Secondary Key, and Validity Period and enter the original URL.
- In the left-side navigation pane of the ApsaraVideo Live console, click Domains. The Domain Management page appears.
- Find the streaming domain that you want to configure and click Domain Settings.
- Choose URL Authentication tab, and then click Change Settings. , click the
- Modify the URL authentication configurations and click OK.
Generate ingest and streaming URLs
- Choose .
- Select a streaming domain and its associated ingest domain.
- Set the Application Name and Stream Name parameters.
- Set the Transcoding Template parameter as required.
- Click Generate URLs. The ingest URL and streaming URLs are generated.
Push and play streams
- Download and install a stream pushing tool and media player.
Note The third-party products that are described in this topic are only for reference. Alibaba Cloud does not make any guarantee, either explicitly or implicitly, with respect to the performance and reliability of the third-party products, as well as potential impacts of operations on the products.
- Download and install a stream pushing tool. In this topic, Open Broadcaster Software (OBS) is used as an example. For more information about the download URL, visit Download OBS Studio.
- Download and install a media player. In this topic, VLC media player is used as an example. For more information about the download URL, visit VLC media player.
- Enter the signed ingest URL in the stream pushing tool.
Split the signed ingest URL and enter them in the URL and Stream Key fields.
- URL: Enter the part of the ingest URL up to the application name, including the application name.
- Stream Key: Enter the part of the ingest URL starting from the stream name.
For example, if the ingest URL is
rtmp://push.aliyunlive.com/app/stream?auth_key=1543302081-0-0-9c6e7c8190c10bdfb3c0************, specify the following values for each field.
Note In this example, the ingest URL consists of an ingest domain, an application name, a stream name, and an access token. In actual practice, use the actual values of your ingest URL.
- URL: Enter
- Stream Key: Enter
For more information about OBS configurations and usage, see OBS.
- Enter the streaming URL in the media player.
- Open VLC media player and choose
- Enter the streaming URL in the Please enter a network URL field and click Play.
For example, the streaming URL is
rtmp://play.aliyunlive.com/app/stream?auth_key=1543300311-0-0-d47ce016332bf280cf275********.Note In this example, the streaming URL consists of a streaming domain, an application name, a stream name, and an access token. In actual practice, use the actual values of your streaming URL.
For information about cross-domain errors for playing streams, see What can I do if I receive a message indicating a cross-domain error when the player plays streams based on M3U8 playlists?
- Open VLC media player and choose .
You can also play streams by using ApsaraVideo Player for web on a PC.
ApsaraVideo Live provides various features, such as permission management, basic services, live stream acceleration, live stream security, live stream latency control, HTTP configuration, media processing for live streams, live stream management, statistics, and log management. For more information about how to use the preceding features, see Overview.