EncoderProfiles.VideoProfile.Bitrate Property

Definition

The target video output bitrate in bits per second

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

Property Value

Attributes

Remarks

The target video output bitrate in bits per second

This is the target recorded video output bitrate 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 bitrate where the video is recorded with. If the application intends to record slow motion videos with the high speed quality profiles, it must set a different video bitrate that is corresponding to the desired recording output bit rate (i.e., the encoded video bitrate during normal playback) via MediaRecorder#setVideoEncodingBitRate. For example, if CamcorderProfile#QUALITY_HIGH_SPEED_720P advertises 240fps #getFrameRate and 64Mbps #getBitrate in the high speed VideoProfile, and the application intends to record 1/8 factor slow motion recording videos, the application must set 30fps via MediaRecorder#setVideoFrameRate and 8Mbps ( #getBitrate * slow motion factor) via MediaRecorder#setVideoEncodingBitRate. Failing to do so will result in videos with unexpected frame rate and bit rate, or MediaRecorder error if the output bit rate exceeds the encoder limit. 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.getBitrate().

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