Setting up Your Environment
In this topic, you will learn how to set up environment to integrate Agora Recording SDK.
The following table lists the hardware requirements:
|Server||Physical or virtual.|
|System||Ubuntu Linux 14.04+ LTS 64-bit or CentOS 7+ x64|
|Network||The Linux server needs Internet access|
Decide the Internet bandwidth based on the number of channels being recorded simultaneously. Refer to the following data:
For detailed bandwidth data, refer to Recording API .
Agora recommends the following hardware configurattions:
|SUPERMICRO SYS-6017R-TDF||1U rack-mounted SYS-6017R-TDF Intel® Xeon® E5-2600 Series Processor||1|
|Case||1U Rackmountable (440-W high-efficiency redundant power supply w/ PMBus)||1|
|Processor||Intel Xeon E5-2620V2 2.1 G, L3:15M, 6C (P4X-DPE52620V2-SR1AN)||2|
|Memory||MEM-DR380L-HL06-ER16 (8-GB DDR3-1600 2Rx8 1.35-V ECC REG RoHS)||1|
|Hard Disk||250-G 3.5 SATA Enterprise (HDD-T0250-WD2503ABYZ)||2|
Assuming two users are in a channel in a video call (communication mode), with the resolution of 640*360, frame rate of 15 fps and bitrate of one video stream of 500kbps:
The CPU is fully loaded and 100 channels are recorded simultaneously:
Each channel writes to the disk at a speed of 60 kB/s. The total write-in speed is 6.0 MB/s, which is much lower than the maximum write-in speed of the disk;
Each channel uses 25 MB of memory. Thus, 2.5 GB of memory, which is 31% of the total memory, is taken;
The downstream Internet flow for each channel is 500 kbps * 2 = 1 Mbps. The total downstream flow is 100 Mbps. The upstream flow is neglected.
Compatibility with the Agora SDKs
The recording SDK supports:
recording the communication that uses the native SDK;
recording the communication that uses the web SDK;
recording the communication that uses both the native SDK and the web SDK;
The recording SDK is compatible with the following Agora SDKs:
Agora Native SDK v1.7.0+ for all platforms;
Agora Web SDK v1.12.0+ .
If any user in the channel uses Agora SDK which is not compatible with Agora recording SDK, recording fails for the whole channel.
Setting up the environment
Download the Agora Recording SDK for Linux package. The package structure is listed as follows:
|bin||The directory where AgoraCoreService is located|
|libs||Required libraries for developing the recording application|
Open the TCP ports 1080 and 8000.
Open the UDP ports:
Duplex ports: 1080, 4000-4030, 8000, 9700 and 25000;
Simplex downstream ports used by the recording processes.
Use the command line
iptables -Lto check the UDP port.
To record the content in channels, you need one recording process for each of the channels. One recording process requires four simplex downstream ports. There must be no port conflict among the processes, including the system processes and all the recording processes.
Agora recommends that you specify the range of ports used by the recording processes. Configure a large range for all recording processes (Agora recommends 40000 ~ 41000 or larger). If so, the 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 parameters
If the parameters,
highUdpPort, are not specified, the ports used by the recording processes are at random, which may cause port conflicts.
Set whitelist domains:
Ensure that your compiler is gcc 4.4+.
For the purpose of debug, Agora recommends you to enable core dump on your Linux system. Possible crash information will be recorded. You can refer to the script
If you wish to use java delegate to enable recording, you must install JDK.