On-premise Recording SDK v3.0.6 API Reference for Linux (C++)
|
Public Member Functions |
|
RecordingConfig () | |
virtual | ~RecordingConfig () |
Public Attributes |
|
bool | isAudioOnly |
bool | isVideoOnly |
bool | isMixingEnabled |
bool | autoSubscribe |
bool | enableCloudProxy |
agora::linuxsdk::MIXED_AV_CODEC_TYPE | mixedVideoAudio |
const char * | mixResolution |
const char * | decryptionMode |
const char * | secret |
const char * | appliteDir |
const char * | recordFileRootDir |
const 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 |
int | proxyType |
const char * | proxyServer |
agora::linuxsdk::AUDIO_PROFILE_TYPE | audioProfile |
const char * | defaultVideoBg |
const char * | defaultUserBg |
const char * | subscribeVideoUids |
const char * | subscribeAudioUids |
bool | enableIntraRequest |
bool | enableH265Support |
The recording configuration.
|
inline |
|
inlinevirtual |
bool agora::recording::RecordingConfig::isAudioOnly |
Sets whether or not to record audio only.
Used together with isVideoOnly:
bool agora::recording::RecordingConfig::isVideoOnly |
Sets whether or not to record video only.
Used together with isAudioOnly:
bool agora::recording::RecordingConfig::isMixingEnabled |
Sets whether or not to enable composite recording mode.
bool agora::recording::RecordingConfig::autoSubscribe |
Sets whether to record the streams of all users or specified users.
bool agora::recording::RecordingConfig::enableCloudProxy |
Sets whether or not to enable the cloud proxy:
For more information, see Use Cloud Proxy。
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.
mixedVideoAudio
to
AV_CODEC_MIXED_TS_ONLY(6)
or AV_CODEC_MIXED_TS_AND_MP4(7)
in
the composite recording mode to ensure the availability of recording files after the
recording process crashes. If it is set to AV_CODEC_MIXED_TS_AND_MP4(7), there will be
a certain degree of performance regression for recording.
const 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 360 x 640, 15 fps, 500 Kbps.
See the Video Profile Table.
const 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:
const char* agora::recording::RecordingConfig::secret |
Sets the decryption password when the decryptionMode is enabled. The default value is NULL.
const char* agora::recording::RecordingConfig::appliteDir |
Sets the path of AgoraCoreService.
The default path of AgoraCoreService is Agora_Recording_SDK_for_Linux_FULL/bin/.
const 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.
const char* agora::recording::RecordingConfig::cfgFilePath |
Sets the path of the configuration file. The default value is NULL. For example,
--cfgFilePath /home/guest/recording_dir/cfg.json
.
The content in the configuration file must be in JSON format. You can configure the following parameters:
Recording_Dir
: The absolute directory of the output in the string
format. The recording service does not automatically create a subdirectory.
For example, {"Recording_Dir": "/home/guest/recording_dir/"}
, which
means the recording service stores the recording files in the
/home/guest/recording_dir/
directory.
Chunk_Time_Span
: Time interval (s) between two successive recorded
files in the string format. Only in the LiveBroadcasting
channel
profile and in an individual recording session can you set
Chunk_Time_Span
, which must be >= 10.
For example: {"Chunk_Time_Span": "15"}
, which means the recording
service creates a file every 15 seconds.
Secondary_Recorder
: String. Records audio files in two formats.
Secondary_Recorder
is the added audio file format.
For example: {"Secondary_Recorder":"mp3"}
, which means to generate
audio files in AAC and MP3 formats.
Audio_Only_Record
: String. Records audio files in one format only.
Audio_Only_Record
is the audio file format.
For example: {"Audio_Only_Record":"mp3"}
, which means to generate audio
files only in MP3 format.
Audio_Sample_Rate
: Number. Sets the sample rate of the recorded audio
files.
For example: {"Audio_Sample_Rate":16000}
,which means the sample rate
of the recorded audio is 16000Hz.
Pcm_Sample_Rate
: Number. Sets the sample rate for recording original
audio data in PCM format (getAudioFrame
is 2
or
3
).
For example: {"Pcm_Sample_Rate":16000}
,which means the sample rate of
the recorded original audio in PCM format is 16000Hz.
Chunk_Time_Span
parameter only when you use the
recording service in individual recording mode in a live interactive streaming
channel.
Chunk_Time_Span
parameter, you must set
enableIntraRequest
as true
to enable the keyframe
request. Whether the sender sends the keyframe depends on the Agora RTC SDK
version used by the sender.
Audio_Sample_Rate
can be set to 16000Hz, 32000Hz, 44100Hz, 48000Hz.
If the sample rate you set is not within the above range, the default sample rate
is 16000Hz
.
Pcm_Sample_Rate
can be set to 8000Hz, 16000Hz, 32000Hz. If the sample
rate you set is not within the above range, the configuration does not take
effect.
agora::linuxsdk::VIDEO_FORMAT_TYPE agora::recording::RecordingConfig::decodeVideo |
Sets the video decoding format. For more information, see VIDEO_FORMAT_TYPE.
agora::linuxsdk::AUDIO_FORMAT_TYPE agora::recording::RecordingConfig::decodeAudio |
Sets the audio decoding format. For more information, see AUDIO_FORMAT_TYPE.
int agora::recording::RecordingConfig::lowUdpPort |
Sets the lowest UDP port.
Ensure that the value of highUdpPort - lowUdpPort is ≥ 6. The default value is 0.
int agora::recording::RecordingConfig::highUdpPort |
Sets the highest UDP port.
Ensure that the value of highUdpPort - lowUdpPort is ≥ 6. The default value is 0.
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.
idleLimitSec
), the recording service automatically stops and leaves
the channel.
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.
int agora::recording::RecordingConfig::audioIndicationInterval |
Sets whether or not to detect the users who speak.
agora::linuxsdk::CHANNEL_PROFILE_TYPE agora::recording::RecordingConfig::channelProfile |
Sets the channel mode. For more information, see CHANNEL_PROFILE_TYPE.
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.
agora::linuxsdk::TRIGGER_MODE_TYPE agora::recording::RecordingConfig::triggerMode |
Sets whether to record automatically or manually. For more information, see TRIGGER_MODE_TYPE.
agora::linuxsdk::LANGUAGE_TYPE agora::recording::RecordingConfig::lang |
Sets the programming language. For more information, see LANGUAGE_TYPE.
int agora::recording::RecordingConfig::proxyType |
Sets the type of the proxy server:
After setting the proxyType
parameter, you need to set the
proxyServer
parameter. See
Use Cloud Proxy
for details.
const char* agora::recording::RecordingConfig::proxyServer |
Sets the IP address (domain) and port of the proxy server for a recording within the
intranet according to the type of the proxy server that you choose with the
proxyType
parameter.
"<ip>:<port>"
."<domain>:<port>"
."<ip1>,<ip2>,...,<ipx>:<port>"
.
See Use Cloud Proxy for details.
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.
const 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.
const 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.
const char* agora::recording::RecordingConfig::subscribeVideoUids |
An array of UIDs whose video streams you want to record.
If you set autoSubscribe as false, subscribeVideoUids enables you to record the video streams of specified users.
const char* agora::recording::RecordingConfig::subscribeAudioUids |
An array of UIDs whose audio streams you want to record.
If you set autoSubscribe as false, subscribeAudioUids enables you to record the audio streams of specified users.
bool agora::recording::RecordingConfig::enableIntraRequest |
Sets whether to enable the keyframe request. The default value is true
,
which can improve the audio and video quality under poor network conditions. To play the
video file recorded in individual recording mode from a specified position, you must set
enableIntraRequest
as false.
bool agora::recording::RecordingConfig::enableH265Support |
Sets whether to enable recording video stream in H.265 format: