Sdílet prostřednictvím


MediaRecorder.SetVideoFrameRate(Int32) Method

Definition

Sets the frame rate of the video to be captured.

[Android.Runtime.Register("setVideoFrameRate", "(I)V", "GetSetVideoFrameRate_IHandler")]
public virtual void SetVideoFrameRate (int rate);
[<Android.Runtime.Register("setVideoFrameRate", "(I)V", "GetSetVideoFrameRate_IHandler")>]
abstract member SetVideoFrameRate : int -> unit
override this.SetVideoFrameRate : int -> unit

Parameters

rate
Int32

the number of frames per second of video to capture

Attributes

Exceptions

if it is called after prepare() or before setOutputFormat().

NOTE: On some devices that have auto-frame rate, this sets the maximum frame rate, not a constant frame rate. Actual frame rate will vary according to lighting conditions.

Remarks

Sets the frame rate of the video to be captured. Must be called after setVideoSource(). Call this after setOutputFormat() but before prepare().

NOTE: On some devices that have auto-frame rate, this sets the maximum frame rate, not a constant frame rate. Actual frame rate will vary according to lighting conditions.

Java documentation for android.media.MediaRecorder.setVideoFrameRate(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