#include <IAgoraRecordingEngine.h>

Public Member Functions

 RecordingConfig ()
 
virtual ~RecordingConfig ()
 

Public Attributes

bool isAudioOnly
 
bool isVideoOnly
 
bool isMixingEnabled
 
agora::linuxsdk::MIXED_AV_CODEC_TYPE mixedVideoAudio
 
char * mixResolution
 
char * decryptionMode
 
char * secret
 
char * appliteDir
 
char * recordFileRootDir
 
char * cfgFilePath
 
agora::linuxsdk::VIDEO_FORMAT_TYPE decodeVideo
 
agora::linuxsdk::AUDIO_FORMAT_TYPE decodeAudio
 
int lowUdpPort
 
int highUdpPort
 
int idleLimitSec
 
int captureInterval
 
int audioIndicationInterval
 
agora::linuxsdk::CHANNEL_PROFILE_TYPE channelProfile
 
agora::linuxsdk::REMOTE_VIDEO_STREAM_TYPE streamType
 
agora::linuxsdk::TRIGGER_MODE_TYPE triggerMode
 
agora::linuxsdk::LANGUAGE_TYPE lang
 
char * proxyServer
 
agora::linuxsdk::AUDIO_PROFILE_TYPE audioProfile
 
char * defaultVideoBg
 
char * defaultUserBg
 

Detailed Description

The recording configuration.

Constructor & Destructor Documentation

◆ RecordingConfig()

agora::recording::RecordingConfig::RecordingConfig ( )
inline

◆ ~RecordingConfig()

virtual agora::recording::RecordingConfig::~RecordingConfig ( )
inlinevirtual

Member Data Documentation

◆ isAudioOnly

bool agora::recording::RecordingConfig::isAudioOnly

Sets whether or not to record audio only.

  • true: Enables audio recording and disables video recording.
  • false: (Default) Enables both audio and video recording.

Used together with isVideoOnly:

◆ isVideoOnly

bool agora::recording::RecordingConfig::isVideoOnly

Sets whether or not to record video only.

  • true: Enables video recording and disables audio recording.
  • false: (Default) Enables both audio and video recording.

Used together with isAudioOnly:

◆ isMixingEnabled

bool agora::recording::RecordingConfig::isMixingEnabled

Sets whether or not to enable the audio- or video-mixing mode.

  • true: Enables the composite mode, which means the audio of all uids is mixed in an audio file and the video of all uids is mixed in a video file. The sample rate, bitrate, and audio channel number of the recorded file are the same as the highest level of those of the original audio streams.
  • false: (Default) Enables the individual mode, which means one audio or video file for an uid. The bitrate and audio channel number of the recording file are the same as those of the original audio stream.

◆ mixedVideoAudio

agora::linuxsdk::MIXED_AV_CODEC_TYPE agora::recording::RecordingConfig::mixedVideoAudio

If you set isMixingEnabled as true and enable the composite mode, mixedVideoAudio allows you to mix the audio and video in a file in real time. For more information, see MIXED_AV_CODEC_TYPE.

◆ mixResolution

char* agora::recording::RecordingConfig::mixResolution

If you set isMixingEnabled as true and enable the composite mode, mixResolution allows you to set the video profile, including the width, height, frame rate, and bitrate.

Resolution, Frame Rate and Bitrate Table

Resolution Frame Rate (fps) Base Bitrate (Kbps, for Communication) Live Bitrate (Kbps, for Live Broadcast)
160 × 120 15 65 130
120 × 120 15 50 100
320 × 180 15 140 280
180 × 180 15 100 200
240 × 180 15 120 240
320 × 240 15 200 400
240 × 240 15 140 280
424 × 240 15 220 440
640 × 360 15 400 800
360 × 360 15 260 520
640 × 360 30 600 1200
360 × 360 30 400 800
480 × 360 15 320 640
480 × 360 30 490 980
640 × 480 15 500 1000
480 × 480 15 400 800
640 × 480 30 750 1500
480 × 480 30 600 1200
848 × 480 15 610 1220
848 × 480 30 930 1860
640 × 480 10 400 800
1280 × 720 15 1130 2260
1280 × 720 30 1710 3420
960 × 720 15 910 1820
960 × 720 30 1380 2760
1920 × 1080 15 2080 4160
1920 × 1080 30 3150 6300
1920 × 1080 60 4780 6500
2560 × 1440 30 4850 6500
2560 × 1440 60 6500 6500
3840 × 2160 30 6500 6500
3840 × 2160 60 6500 6500

◆ decryptionMode

char* agora::recording::RecordingConfig::decryptionMode

When the whole channel is encrypted, the recording SDK uses decryptionMode to enable the built-in decryption function.

The following decryption methods are supported:

  • “aes-128-xts”: AES-128, XTS mode.
  • “aes-128-ecb”: AES-128, ECB mode.
  • “aes-256-xts”: AES-256, XTS mode.

◆ secret

char* agora::recording::RecordingConfig::secret

The decryption password when the decryptionMode is enabled. The default value is NULL.

◆ appliteDir

char* agora::recording::RecordingConfig::appliteDir

The directory of AgoraCoreService. The default value is NULL.

◆ recordFileRootDir

char* agora::recording::RecordingConfig::recordFileRootDir

The root directory of the recorded files. The default value is NULL. The sub-path will be generated automatically.

◆ cfgFilePath

char* agora::recording::RecordingConfig::cfgFilePath

The path of the configuration file. The default value is NULL. In the configuration file, you can set the absolute path of the recorded file, but the sub-path will not be generated automatically. The content in the configuration file must be in JSON format, such as {“Recording_Dir” : “<recording path>”}. “Recording_Dir” can not be changed.

◆ decodeVideo

agora::linuxsdk::VIDEO_FORMAT_TYPE agora::recording::RecordingConfig::decodeVideo

Video decoding format. For more information, see VIDEO_FORMAT_TYPE.

Note

◆ decodeAudio

agora::linuxsdk::AUDIO_FORMAT_TYPE agora::recording::RecordingConfig::decodeAudio

Audio decoding format. For more information, see AUDIO_FORMAT_TYPE.

Note
When AUDIO_FORMAT_TYPE = 1, 2 or 3, isMixingEnabled cannot be set as true.

◆ lowUdpPort

int agora::recording::RecordingConfig::lowUdpPort

The lowest UDP port.

Ensure that the value of highUdpPort - lowUdpPort is ≥ 4. The default value is 0.

◆ highUdpPort

int agora::recording::RecordingConfig::highUdpPort

The highest UDP port.

Ensure that the value of highUdpPort - lowUdpPort is ≥ 4. The default value is 0.

◆ idleLimitSec

int agora::recording::RecordingConfig::idleLimitSec

The Agora Recording SDK automatically stops recording when there is no user in the channel after a time period of idleLimitSec.

The value must be ≥ 3 seconds. The default value is 300 seconds.

◆ captureInterval

int agora::recording::RecordingConfig::captureInterval

The time interval of the screen capture.

The time interval must be longer than 1 second and the default value is 5 seconds. captureInterval is only valid when the VIDEO_FORMAT_TYPE = 3, 4 or 5.

◆ audioIndicationInterval

int agora::recording::RecordingConfig::audioIndicationInterval

Whether or not to detect speakers. It is disabled by default.

  • ≤ 0: Disables the function of detecting speakers.
  • > 0: The time interval (ms) of detecting speakers. Agora recommends setting the time interval to be longer than 200ms. When a speaker is found, the SDK returns the UID of the speaker in the onActiveSpeaker callback.

◆ channelProfile

agora::linuxsdk::CHANNEL_PROFILE_TYPE agora::recording::RecordingConfig::channelProfile

Sets the channel mode. For more information, see CHANNEL_PROFILE_TYPE.

◆ streamType

agora::linuxsdk::REMOTE_VIDEO_STREAM_TYPE agora::recording::RecordingConfig::streamType

Takes effect only when the Agora Native SDK enables the dual-stream mode (high stream by default). For more information, see REMOTE_VIDEO_STREAM_TYPE.

◆ triggerMode

agora::linuxsdk::TRIGGER_MODE_TYPE agora::recording::RecordingConfig::triggerMode

Sets whether to record automatically or manually. For more information, see TRIGGER_MODE_TYPE.

◆ lang

agora::linuxsdk::LANGUAGE_TYPE agora::recording::RecordingConfig::lang

Sets the programming language. For more information, see LANGUAGE_TYPE.

◆ proxyServer

char* agora::recording::RecordingConfig::proxyServer

Sets the proxy server, which allows recording with the Intranet server. For more information, please contact sales.nosp@m.@ago.nosp@m.ra.io.

◆ audioProfile

agora::linuxsdk::AUDIO_PROFILE_TYPE agora::recording::RecordingConfig::audioProfile

Audio profile of the recording file. Takes effect only when isMixingEnabled is set as true. For more information, see AUDIO_PROFILE_TYPE.

◆ defaultVideoBg

char* agora::recording::RecordingConfig::defaultVideoBg

The default background image of the canvas.

◆ defaultUserBg

char* agora::recording::RecordingConfig::defaultUserBg

The background image is displayed when a user is online but not sending out any video stream.

Note
If the user uses Agora Web SDK, the user sends the audio and video stream all the time. In this case, the background image is not displayed.