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 composite recording mode.

  • true: Enables composite recording 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. You can set the audio profile of the recording file by the audioProfile parameter and set the video profile by the mixResolution parameter.
  • false: (Default) Enables individual recording mode, which means one audio or video file for each uid. The sampling rate of the recording file is 48 kHz, and the bitrate and audio channel number of the recording file are the same as those of the original audio stream. The video profile of the recording file is the same as that of the original video profile.

◆ mixedVideoAudio

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

If you set isMixingEnabled as true and enable composite recording mode, mixedVideoAudio allows you to mix the audio and video in an MP4 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 composite recording mode, mixResolution allows you to set the video profile, including the width, height, frame rate, and bitrate. The default setting is 640, 360, 15, 500.

Note
Agora supports the following frame rates: 1 fps, 7 fps, 10 fps, 15 fps, 24 fps, 30 fps, and 60 fps. The default value is 15 fps. If you set other frame rates, the SDK uses the default value.

See the Video Profile Table.

◆ 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 default value is NULL.

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.
Note
The decryption method of the recording application must be the same as that of the Native/Web SDK.

◆ secret

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

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

◆ appliteDir

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

Sets the path of AgoraCoreService.

The default path of AgoraCoreService is Agora_Recording_SDK_for_Linux_FULL/bin/.

◆ recordFileRootDir

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

Sets the path of the recorded files. The default value is NULL.

After setting recordFileRootDir, the subdirectory will be automatically generated according to the date of the recording.

◆ cfgFilePath

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

Sets the path of the configuration file. The default value is NULL.

In the configuration file, you can set the absolute directory of the output, but the subdirectory will not be generated automatically. The content in the configuration file must be in JSON format, such as {"Recording_Dir" : "<recording path>"}. You cannot change "Recording_Dir".

◆ decodeVideo

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

Sets the video decoding format. For more information, see VIDEO_FORMAT_TYPE.

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

◆ decodeAudio

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

Sets the 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

Sets the lowest UDP port.

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

◆ highUdpPort

int agora::recording::RecordingConfig::highUdpPort

Sets the highest UDP port.

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

◆ idleLimitSec

int agora::recording::RecordingConfig::idleLimitSec

Sets a time period. The value must be ≥ 3 seconds. The default value is 300 seconds.

When the Agora Recording SDK is recording, if there is no user in the channel after a time period of idleLimitSec, it automatically stops recording and leaves the channel.

Note
We charge you this time period.

◆ captureInterval

int agora::recording::RecordingConfig::captureInterval

Sets the interval of the screen capture.

The interval must be longer than 1 second and the default value is 5 seconds.

Note
captureInterval is only valid when decodeVideo is set as 3, 4, or 5.

◆ audioIndicationInterval

int agora::recording::RecordingConfig::audioIndicationInterval

Sets whether or not to detect the users who speak.

  • ≤ 0: (Default) Do not detect the users who speak.
  • > 0: Sets the interval (ms) of detecting the users who speak. Agora recommends setting the interval to be longer than 200 ms. When the SDK detects the users who speak, the SDK returns the UID of the user who speaks loudest in the onActiveSpeaker callback and returns the UIDs of all users who speak and their voice volumes in the onAudioVolumeIndication 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

If you set isMixingEnabled as true and enable composite recording mode, audioProfile allows you to set the audio profile of the recording file. For more information, see AUDIO_PROFILE_TYPE.

◆ defaultVideoBg

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

Sets the directory of the default background image of the canvas in composite recording mode.

If defaultVideoBg is not set, the canvas displays the background color.

Note
Only supports local images in JPEG format.

◆ defaultUserBg

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

Sets the directory of the default background image of users in composite recording mode.

The background image is displayed when a user is online and does not send any video stream. If defaultUserBg is not set, the user region displays the background color.

Note
  • Only supports local images in JPEG format.
  • The background image is not displayed for users using the Agora Web SDK.