EncoderProfiles.VideoProfile.FrameRate Property

Definition

The target video frame rate in frames per second.

public int FrameRate { [Android.Runtime.Register("getFrameRate", "()I", "", ApiSince=31)] get; }
[<get: Android.Runtime.Register("getFrameRate", "()I", "", ApiSince=31)>]
member this.FrameRate : int

Property Value

Attributes

Remarks

The target video frame rate in frames per second.

This is the target recorded video output frame rate per second if the application configures the video recording via MediaRecorder#setProfile without specifying any other MediaRecorder encoding parameters. For example, for high speed quality profiles (from CamcorderProfile#QUALITY_HIGH_SPEED_LOW to CamcorderProfile#QUALITY_HIGH_SPEED_2160P), this is the frame rate where the video is recorded and played back with. If the application intends to create slow motion use case with the high speed quality profiles, it must set a different video frame rate that is corresponding to the desired output (playback) frame rate via MediaRecorder#setVideoFrameRate. For example, if CamcorderProfile#QUALITY_HIGH_SPEED_720P advertises 240fps #getFrameRate in the VideoProfile, and the application intends to create 1/8 factor slow motion recording videos, the application must set 30fps via MediaRecorder#setVideoFrameRate. Failing to do so will result in high speed videos with normal speed playback frame rate (240fps for above example). If the application intends to do the video recording with MediaCodec encoder, it must set each individual field of MediaFormat similarly according to this VideoProfile.

Java documentation for android.media.EncoderProfiles.VideoProfile.getFrameRate().

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