Package io.agora.rtc2
Class AgoraMediaRecorder.MediaRecorderConfiguration
java.lang.Object
io.agora.rtc2.AgoraMediaRecorder.MediaRecorderConfiguration
- Enclosing class:
- AgoraMediaRecorder
- Since:
- v3.5.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionintNumber of channels for audio capturing: - 1: Mono - 2: Stereo This parameter is required only when you call `createMediaRecorder` and set the `recorderStreamType` in `RecorderStreamInfo` to 1.intThe format of the recording file.intFrame rate for recording video.intHeight (px) of the recorded video.intMaximum recording duration in milliseconds.intInterval for updating recording information, in milliseconds.intSampling rate (Hz) for recording audio.The absolute path where the recording file is saved locally.intRecording content: - `STREAM_TYPE_AUDIO`: Audio only.intThe type of the video source for recording.intWidth (px) of the recorded video. -
Constructor Summary
ConstructorsConstructorDescriptionMediaRecorderConfiguration(String storagePath, int containerFormat, int streamType, int maxDurationMs, int recorderInfoUpdateInterval) MediaRecorderConfiguration(String storagePath, int containerFormat, int streamType, int maxDurationMs, int recorderInfoUpdateInterval, int width, int height, int fps, int sample_rate, int channel_num, int videoSourceType) -
Method Summary
-
Field Details
-
storagePath
The absolute path where the recording file is saved locally. The path must include the file name and extension. For example: - Android: `/storage/emulated/0/Android/data//files/example.mp4` -
containerFormat
public int containerFormatThe format of the recording file. Currently, only `CONTAINER_MP4` is supported. -
streamType
public int streamTypeRecording content: - `STREAM_TYPE_AUDIO`: Audio only. - `STREAM_TYPE_VIDEO`: Video only. - `STREAM_TYPE_BOTH`: (Default) Both audio and video. -
maxDurationMs
public int maxDurationMsMaximum recording duration in milliseconds. The default value is 120000. -
recorderInfoUpdateInterval
public int recorderInfoUpdateIntervalInterval for updating recording information, in milliseconds. The valid range is [1000, 10000]. The SDK triggers the `onRecorderInfoUpdated` callback based on this value to report the updated recording information. -
width
public int widthWidth (px) of the recorded video. The maximum value of width × height must not exceed 3840 × 2160. This parameter is required only when you call `createMediaRecorder` and set the `recorderStreamType` of `RecorderStreamInfo` to 0. -
height
public int heightHeight (px) of the recorded video. The maximum value of width × height must not exceed 3840 × 2160. This parameter is required only when you call `createMediaRecorder` and set the `recorderStreamType` of `RecorderStreamInfo` to 1. -
fps
public int fpsFrame rate for recording video. The maximum value must not exceed 30, such as: 5, 10, 15, 24, 30, etc. You only need to pass this parameter when calling `createMediaRecorder` and setting the `recorderStreamType` of `RecorderStreamInfo` to 1. -
sample_rate
public int sample_rateSampling rate (Hz) for recording audio. You can set it to 16000, 32000, 44100, or 48000. This parameter is required only when you call `createMediaRecorder` and set the `recorderStreamType` of `RecorderStreamInfo` to 1. -
channel_num
public int channel_numNumber of channels for audio capturing: - 1: Mono - 2: Stereo This parameter is required only when you call `createMediaRecorder` and set the `recorderStreamType` in `RecorderStreamInfo` to 1. -
videoSourceType
public int videoSourceTypeThe type of the video source for recording. See `VideoSourceType`. You only need to specify this parameter when calling `createMediaRecorder` and setting the `recorderStreamType` of `RecorderStreamInfo` to 1.
-
-
Constructor Details
-
MediaRecorderConfiguration
public MediaRecorderConfiguration(String storagePath, int containerFormat, int streamType, int maxDurationMs, int recorderInfoUpdateInterval) -
MediaRecorderConfiguration
public MediaRecorderConfiguration(String storagePath, int containerFormat, int streamType, int maxDurationMs, int recorderInfoUpdateInterval, int width, int height, int fps, int sample_rate, int channel_num, int videoSourceType)
-