Public Member Functions

 RecordingConfig ()
 

Public Attributes

boolean isAudioOnly
 
boolean isVideoOnly
 
boolean isMixingEnabled
 
MIXED_AV_CODEC_TYPE mixedVideoAudio
 
String mixResolution
 
String decryptionMode
 
String secret
 
String appliteDir
 
String recordFileRootDir
 
String cfgFilePath
 
VIDEO_FORMAT_TYPE decodeVideo
 
AUDIO_FORMAT_TYPE decodeAudio
 
int lowUdpPort
 
int highUdpPort
 
int idleLimitSec
 
int captureInterval
 
int audioIndicationInterval
 
CHANNEL_PROFILE_TYPE channelProfile
 
REMOTE_VIDEO_STREAM_TYPE streamType
 
int triggerMode
 
String proxyServer
 
int audioProfile
 
String defaultVideoBgPath
 
String defaultUserBgPath
 

Constructor & Destructor Documentation

◆ RecordingConfig()

io.agora.recording.common.RecordingConfig.RecordingConfig ( )

Member Data Documentation

◆ isAudioOnly

boolean io.agora.recording.common.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:

  • If isAudioOnly is true and isVideoOnly is false, only records audio.
  • If isAudioOnly is false and isVideoOnly is true, only records video.
  • If isAudioOnly is false and isVideoOnly is false, records both audio and video.
  • isAudioOnly and isVideoOnly can not be set as true at the same time.

◆ isVideoOnly

boolean io.agora.recording.common.RecordingConfig.isVideoOnly

Sets whether or not to record video only:

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

Used together with isAudioOnly:

  • If isAudioOnly is true and isVideoOnly is false, only records audio.
  • If isAudioOnly is false and isVideoOnly is true, only records video.
  • If isAudioOnly is false and isVideoOnly is false, records both audio and video.
  • isAudioOnly and isVideoOnly can not be set as true at the same time.

◆ isMixingEnabled

boolean io.agora.recording.common.RecordingConfig.isMixingEnabled

Sets whether or not to enable the audio- or video-composite 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 recording 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

MIXED_AV_CODEC_TYPE io.agora.recording.common.RecordingConfig.mixedVideoAudio

If you set isMixingEnabled as true, mixedVideoAudio allows you to mix audio and video in real time. For details, see MIXED_AV_CODEC_TYPE.

◆ mixResolution

String io.agora.recording.common.RecordingConfig.mixResolution

If you set isMixingEnabled as true, mixResolution allows you to set the resolution in the format of width, height, fps, and Kbps; representing the width, height, frame rate, and bitrate of the video stream.

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

◆ decryptionMode

String io.agora.recording.common.RecordingConfig.decryptionMode

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

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

◆ secret

String io.agora.recording.common.RecordingConfig.secret

The decryption password when decryption mode is enabled. The default value is NULL.

◆ appliteDir

String io.agora.recording.common.RecordingConfig.appliteDir

The directory of AgoraCoreService. The default value is NULL.

◆ recordFileRootDir

String io.agora.recording.common.RecordingConfig.recordFileRootDir

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

◆ cfgFilePath

String io.agora.recording.common.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

VIDEO_FORMAT_TYPE io.agora.recording.common.RecordingConfig.decodeVideo

Video decoding format. See VIDEO_FORMAT_TYPE.

Note
  • When VIDEO_FORMAT_TYPE = 1, 2, 3 or 4, isMixingEnabled cannot be set as true.
  • When the video is decoded into raw video data, that is, VIDEO_FORMAT_TYPE = 1, 2, 3 or 5, raw video data in YUV format for the Web SDK is supported while H.264 format is not supported.

◆ decodeAudio

AUDIO_FORMAT_TYPE io.agora.recording.common.RecordingConfig.decodeAudio

Audio decoding format. See AUDIO_FORMAT_TYPE.

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

◆ lowUdpPort

int io.agora.recording.common.RecordingConfig.lowUdpPort

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

◆ highUdpPort

int io.agora.recording.common.RecordingConfig.highUdpPort

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

◆ idleLimitSec

int io.agora.recording.common.RecordingConfig.idleLimitSec

The Agora Recording SDK automatically stops recording when there is no user in the recorded channel after a time period of idleLimitSec. The value must be ≥ three seconds. The default value is 300 seconds.

◆ captureInterval

int io.agora.recording.common.RecordingConfig.captureInterval

Time interval of the screen capture. The value ranges between one second and five seconds. You need to use captureInterval with decodeVideo = 3, 4 or 5 when joining the channel. See createChannel to allow a user to join a channel.

◆ audioIndicationInterval

int io.agora.recording.common.RecordingConfig.audioIndicationInterval

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

  • ≤ 0: Disables detecting the speakers.
  • > 0: The time interval (ms) of detecting the speakers, which should be longer than 200 ms. When an active speaker is found, the SDK returns the user ID of the speaker in the onActiveSpeaker callback.

◆ channelProfile

CHANNEL_PROFILE_TYPE io.agora.recording.common.RecordingConfig.channelProfile

Sets the channel mode. See CHANNEL_PROFILE_TYPE.

◆ streamType

REMOTE_VIDEO_STREAM_TYPE io.agora.recording.common.RecordingConfig.streamType

streamType takes effect only when the Agora Native SDK or Web SDK has enabled the dual-stream mode (high stream by default). See REMOTE_VIDEO_STREAM_TYPE.

◆ triggerMode

int io.agora.recording.common.RecordingConfig.triggerMode

Sets whether to record automatically or manually upon joining the channel:

  • 0: Automatically
  • 1: Manually

If you wish to call startService and stopService, then choose Manually.

◆ proxyServer

String io.agora.recording.common.RecordingConfig.proxyServer

Deploy the Enterprise Proxy. It allows you to record the content with the Intranet server. For details, please contact support@agora.io.

◆ audioProfile

int io.agora.recording.common.RecordingConfig.audioProfile

Audio profile of the recording file:

  • AUDIO_PROFILE_DEFAULT = 0: (Default) Sampling rate of 48 kHz, communication encoding, mono, and a bitrate of up to 48 Kbps.
  • AUDIO_PROFILE_MUSIC_HIGH_QUALITY = 1: Sampling rate of 48 kHz, music encoding, mono, and a bitrate of up to 128 Kbps.
  • AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO = 2: Sampling rate of 48 kHz, music encoding, stereo, and a bitrate of up to 192 Kbps.

◆ defaultVideoBgPath

String io.agora.recording.common.RecordingConfig.defaultVideoBgPath

The default background image of the canvas.

◆ defaultUserBgPath

String io.agora.recording.common.RecordingConfig.defaultUserBgPath

The default background image of the user. 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.