This page shows how to set up the environment to integrate the Agora On-premise Recording SDK.
The Agora On-premise Recording SDK for Linux is integrated on your Linux server instead of in your app.
Recording audio and video within a channel is like a special audience joining the channel. The audience gets the audio and video from the channel, transcodes it, and stores it on a Linux server. Therefore, you must integrate the On-premise Recording SDK on your Linux server. The same App ID is used in the On-premise Recording SDK and the Agora SDK for audio and video calls.
The following table lists the basic requirements for installing the On-premise Recording SDK:
Hardware and Network | Requirements |
---|---|
Server | Physical or virtual. |
System | Ubuntu 14.04+ x64 or CentOS 6.5+ (7.0 recommended) x64. |
Network | The Linux server needs Internet access. |
Internet Bandwidth | Use an Internet bandwidth based on the number of channels being recorded simultaneously. Refer to the following data:
For detailed bandwidth data, see Recording API. |
We conduct tests on the recording concurrency based on the following cloud hosting configuration:
Test conditions:
Test results:
Channel Profile | Recording Mode | Performance |
---|---|---|
Live Broadcast | Audio + Video Individual recording |
When recording 215 channels simultaneously, the CPU usage is about 75%. We recommend recording 200 channels simultaneously. |
Audio + Video Composite recording |
When recording 70 channels simultaneously, the CPU usage is about 75%. We recommend recording 60 channels simultaneously. |
|
Audio only Composite recording |
When recording 300 channels simultaneously, the CPU usage is about 75%. | |
Communication | Audio + Video Individual recording |
When recording 210 channels simultaneously, the CPU usage is about 75%. We recommend recording 200 channels simultaneously. |
Audio + Video Composite recording |
When recording 60 channels simultaneously, the CPU usage is about 75%. |
The test results are for reference purposes only. Set up your own cloud hosting according to your recording requirement.
Set up the environment on your Linux server:
Download the Agora On-premise Recording SDK for Linux package. The package structure is listed as follows:
Folder | Description |
---|---|
bin | The directory where AgoraCoreService is located. |
include |
|
libs | Required libraries for developing the recording application. |
samples | Sample code
|
Tools | Transcoding tools. |
Prepare the required libraries:
librecorder.a
file is connected to the project.Ensure that your compiler is GCC 4.4+.
If your firewall restricts access to the Agora services, use cloud proxy service.
Open the UDP ports used by the recording processes. The UDP ports are the ports between the lowUdpPort
and highUdpPort
parameters specified in RecordingConfig
.
- Use the
iptables -L
command line to check the UDP port.- To record the content in the channels, you need one recording process for each of the channels. One recording process requires four UDP ports. There must be no port conflict among the processes, including the system processes and all recording processes.
- We recommend that you specify the range of ports used by the recording processes. Configure a large range for all recording processes (Agora recommends 40000 to 41000 or larger). If so, the On-premise Recording SDK assigns ports to each recording process within the specified range and avoids port conflicts automatically. To set the port range, you need to configure the
lowUdpPort
andhighUdpPort
parameters.- If the
lowUdpPort
andhighUdpPort
parameters are not specified, the ports used by the recording processes are at random, which may cause port conflicts.
The Agora On-premise Recording SDK is integrated. You can choose either of the following ways to start recording:
The command line and API methods implement the same recording functions.