# MediaRecorderConfiguration (/zh-CN/api-reference/rtc/android/4.6.0/class-and-enum/classes/class-mediarecorderconfiguration) > For AI agents: see the complete documentation index at [llms.txt](/llms.txt). ```java public static class MediaRecorderConfiguration { public String storagePath; public int containerFormat = CONTAINER_MP4; public int streamType = STREAM_TYPE_BOTH; public int maxDurationMs = 120000; public int recorderInfoUpdateInterval = 0; public int width; public int height; public int fps; public int sample_rate; public int channel_num; public int videoSourceType; } ``` ### `自从` [#自从] 自 v3.5.2 版本新增。 ## 属性 [#属性] ### `storagePath` [#storagepath] (必填)本地保存录制文件的绝对路径,路径需包含文件名及扩展名。例如:Android: `/storage/emulated/0/Android/data//files/example.mp4`。 :::info[注] 请确保指定路径存在且可写。 ::: ### `containerFormat` [#containerformat] 录制文件的封装格式。目前仅支持: - CONTAINER_MP4:MP4 格式。 ### `streamType` [#streamtype] 录制内容类型: - STREAM_TYPE_AUDIO:仅录制音频。 - STREAM_TYPE_VIDEO:仅录制视频。 - STREAM_TYPE_BOTH:(默认)同时录制音频和视频。 ### `maxDurationMs` [#maxdurationms] 录制的最⼤时长,单位为毫秒。默认值为 120000。 ### `recorderInfoUpdateInterval` [#recorderinfoupdateinterval] 录制信息的更新间隔,单位为毫秒。有效范围为 [1000, 10000]。SDK 会根据该值触发 [onRecorderInfoUpdated](/zh-CN/api-reference/rtc/android/recording#callback_imediarecorderobserver_onrecorderinfoupdated) 回调以更新录制信息。 ### `width` [#width] (必填)录制视频的宽度(像素)。宽高乘积的最大值不得超过 3840 × 2160。 ### `height` [#height] (必填)录制视频的高度(像素)。宽高乘积的最大值不得超过 3840 × 2160。 ### `fps` [#fps] (必填)录制视频的帧率。最大帧率不能超过 30,例如:5、10、15、24、30 等。 ### `sample_rate` [#sample_rate] (必填)录制音频的采样率(Hz)。可设置为 16000、32000、44100、48000。 ### `channel_num` [#channel_num] (必填)录制音频的声道数: - 1:单声道。 - 2:立体声。 ### `videoSourceType` [#videosourcetype] (必填)录制使用的视频源类型。详见 [VideoSourceType](/zh-CN/api-reference/rtc/android/class-and-enum/enums/enum-videosourcetype)。