MediaFormat.KeyFrameRate Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A key describing the frame rate of a video format in frames/sec.
[Android.Runtime.Register("KEY_FRAME_RATE")]
public const string KeyFrameRate;
[<Android.Runtime.Register("KEY_FRAME_RATE")>]
val mutable KeyFrameRate : string
Field Value
- Attributes
Remarks
A key describing the frame rate of a video format in frames/sec.
The associated value is normally an integer when the value is used by the platform, but video codecs also accept float configuration values. Specifically, MediaExtractor#getTrackFormat MediaExtractor
provides an integer value corresponding to the frame rate information of the track if specified and non-zero. Otherwise, this key is not present. MediaCodec#configure MediaCodec
accepts both float and integer values.
This represents the desired operating frame rate if the #KEY_OPERATING_RATE
is not present and #KEY_PRIORITY
is 0
(realtime). Otherwise, this is just informational.
For video encoders this value corresponds to the intended frame rate (the rate at which the application intends to send frames to the encoder, as calculated by the buffer timestamps, and not from the actual real-time rate that the frames are sent to the encoder). Encoders use this hint for rate control, specifically for the initial frames, as encoders are expected to support variable frame rate (for rate control) based on the actual MediaCodec.BufferInfo#presentationTimeUs buffer timestamps
of subsequent frames.
This key is not used in the MediaCodec
MediaCodec#getInputFormat input
/MediaCodec#getOutputFormat output
formats, nor by MediaMuxer#addTrack MediaMuxer
.
Java documentation for android.media.MediaFormat.KEY_FRAME_RATE
.
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.