Share via


MediaRecorder.SetCaptureRate(Double) Method

Definition

Set video frame capture rate.

[Android.Runtime.Register("setCaptureRate", "(D)V", "GetSetCaptureRate_DHandler")]
public virtual void SetCaptureRate (double fps);
[<Android.Runtime.Register("setCaptureRate", "(D)V", "GetSetCaptureRate_DHandler")>]
abstract member SetCaptureRate : double -> unit
override this.SetCaptureRate : double -> unit

Parameters

fps
Double

Rate at which frames should be captured in frames per second. The fps can go as low as desired. However the fastest fps will be limited by the hardware. For resolutions that can be captured by the video camera, the fastest fps can be computed using android.hardware.Camera.Parameters#getPreviewFpsRange(int[]). For higher resolutions the fastest fps may be more restrictive. Note that the recorder cannot guarantee that frames will be captured at the given rate due to camera/encoder limitations. However it tries to be as close as possible.

Attributes

Remarks

Set video frame capture rate. This can be used to set a different video frame capture rate than the recorded video's playback rate. This method also sets the recording mode to time lapse. In time lapse video recording, only video is recorded. Audio related parameters are ignored when a time lapse recording session starts, if an application sets them.

Java documentation for android.media.MediaRecorder.setCaptureRate(double).

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