ApsaraVideo Live is a live video and audio broadcasting and streaming platform. It allows you to live-stream high-definition video and audio content. The ApsaraVideo Live platform can be accessed and managed using Alibaba Cloud's Management Console, where you can customize your live-streaming media infrastructure. This service is relatively easy to use and enables you to quickly establish a high-quality live video and audio platform.
In this tutorial, you will learn how you can use this service to host and stream live videos.
Before you can complete the steps outlined in this tutorial, you will need the following:
Now, follow these steps to set up ApsaraVideo Live:
1. Go to the Management Console, then scroll down to the Media Services section in the Products & Services area of the Management Console. Next, click on ApsaraVideo Live. You will see a screen like the one below.
2. Click the checkbox to show that you agree to the LiveVideo Service Agreement.
3. Last, you'll want to click Enable. After doing so, you'll see a screen like the one below.
In this section, you'll add a new domain name to the ApsaraVideo Live platform, bind a CNAME and configure the relevant authentication. There are several ways to apply for a live video domain name. The most common method for Mainland China is to apply at http://www.net.cn , for example. More information on alternative methods is available here: https://www.alibabacloud.com/help/doc-detail/84094.htm . For this, you will need to have the details of your domain available to complete this step.
1. Go to the Domains section of the ApsaraVideo Live Console. It will look something like this:
2. Select the region where you want your streaming service to be available. Remember, you will need a domain with an ICP license if you want to serve content to Mainland China.
3. Click Add New Domain.
4. Enter the Live domain name into the textbox. For this tutorial the live domain name is 'videolive-en.aliyun.com'.
5. Click Next step.
1. Copy the CNAME value for the live video domain we've just added from the Console:
2. Go to the Domain Console: https://dc.console.aliyun.com .
3. Go to the Domain Name List page, then, when there select the domain name, and click Resolve.
Now, we need to bind the streaming address provided by Alibaba Cloud with the live video domain name. This acts as a gateway to push your video stream through to the live video center at the time when it reaches the live video domain name. To do this, continue by following the steps below:
4. Click Add Record.
5. Click Add Record again.
6. This will bring up a window where you need to add the resolution parameters for the domain. These are:
videolive-en.aliyun.com
, then the secondary domain name is videolive-en
.You can either use the default settings to configure the authentication, or customize the authentication. For the purpose of this tutorial, we will go through the default authentication procedure. More information on customization options is available here. The authentication function uses these settings for this example: the authentication function is in the Opened state by default, the Main KEY is abcd1234 and the Expire time is 1800s. This means that the authentication expires if the time exceeds 1800s. For this part, log on to the ApsaraVideo Live Console and complete these steps:
1. Click Domains in the left-side navigation pane, then select the region and the domain name, and then click Detail at the right side.
2. In Base Information > Center streaming information, click Go to generate authentication URL at the right side of Authentication settings.
3. In the Generate authentication URL page, click Start to generate.
4. Click to copy the generated URL authentication address. Store this in a secure location, you will need it later.
5. Click OK.
6. The generated Authentication URL rtmp://video-center.alivecdn.com/AppName/StreamName?vhost=videolive-en.aliyun.com&auth_key=**************
can be used for streaming and playback with your chosen streaming tool for the streaming operation.
A live video service address consists of three levels of live video management units: the domain name (Domain
), an application (AppName
) and a live-stream (StreamName
). You can create multiple apps (AppName
) under each domain name (Domain
), and multiple live-streams (StreamName
) under each app. AppName
and StreamName
can be edited and customized. Naturally, different values generate different streaming and playback addresses. For example, if an app is named live
you can create multiple live-streams under live
. The streaming addresses are then as follows:
rtmp://video-center.alivecdn.com/{live}/{3}?vhost={live video domain name}
rtmp://video-center.alivecdn.com/{live}/{1}?vhost={live video domain name}
rtmp://video-center.alivecdn.com/{live}/{2}?vhost={live video domain name}
You can also create multiple live-streams for the app:
rtmp://video-center.alivecdn.com/{live1}/{Stream}?vhost={live video domain name}
rtmp://video-center.alivecdn.com/{live2}/{Stream}?vhost={live video domain name}
rtmp://video-center.alivecdn.com/{live3}/{Stream}?vhost={live video domain name}
Before proceeding, check if you have added a live video domain to the Console, binded a CNAME to the domain, entered the authentication settings, and generated an authentication URL. If you have completed all of this, you can now move to the next section.
In this section, we will give you the information you need to take to step up a live-streaming process. By definition, streaming is the process of transmitting live content to the server using streaming tools and other content capturing software. To stream your content, you need to use a third-party streaming tool. Alibaba Cloud recommends the following streaming tools:
The ApsaraVideo Live platform will sync with your streaming tool so that, when you start to create content, it is automatically generated in the ApsaraVideo Live console. It does this using the authenticated URL information that was generated previously in this tutorial.
In this section, we will show you how to preview your streaming content from the Alibaba Cloud console:
1. Go to the ApsaraVideo Live Console and click on Streams, then select the region, the domain name, and the stream status.
2. Next, select the streaming address, and click Address at the right side.
3. You can then check the playback address and preview the content by clicking Copy and pasting the address into a browser address bar. Alternatively, you can click Play, and the content will play using the VLC Player.
4. If you are happy with your preview, copy the URL of the desired quality and format for your live-streaming content and paste it into the URL field of your encoder or browser. You have now created your first piece of streaming content on the Alibaba ApsaraVideo Live platform.
2,599 posts | 764 followers
FollowAlibaba Clouder - August 16, 2021
Alibaba Clouder - November 19, 2018
Alibaba Cloud Indonesia - November 30, 2023
Alibaba Clouder - September 25, 2020
Iain Ferguson - December 10, 2021
Alibaba Clouder - April 29, 2020
2,599 posts | 764 followers
FollowA professional solution for live video and audio
Learn MoreElastic and secure virtual cloud servers to cater all your cloud hosting needs.
Learn MoreAn encrypted and secure cloud storage service which stores, processes and accesses massive amounts of data from anywhere in the world
Learn MoreMore Posts by Alibaba Clouder