다음을 통해 공유


MediaRecorder.SetVideoEncodingBitRate(Int32) Method

Definition

Sets the video encoding bit rate for recording.

[Android.Runtime.Register("setVideoEncodingBitRate", "(I)V", "GetSetVideoEncodingBitRate_IHandler")]
public virtual void SetVideoEncodingBitRate (int bitRate);
[<Android.Runtime.Register("setVideoEncodingBitRate", "(I)V", "GetSetVideoEncodingBitRate_IHandler")>]
abstract member SetVideoEncodingBitRate : int -> unit
override this.SetVideoEncodingBitRate : int -> unit

Parameters

bitRate
Int32

the video encoding bit rate in bits per second.

Attributes

Remarks

Sets the video encoding bit rate for recording. Call this method before prepare(). Prepare() may perform additional checks on the parameter to make sure whether the specified bit rate is applicable, and sometimes the passed bitRate will be clipped internally to ensure the video recording can proceed smoothly based on the capabilities of the platform.

NB: the actual bitrate and other encoding characteristics may be affected by the minimum quality floor behavior introduced in android.os.Build.VERSION_CODES#S. More detail on how and where this impacts video encoding can be found in the MediaCodec page and looking for "quality floor" (near the top of the page).

Java documentation for android.media.MediaRecorder.setVideoEncodingBitRate(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to