# Print output for @column tags ?>
public
static
final
class
EncoderProfiles.VideoProfile
extends Object
java.lang.Object | |
↳ | android.media.EncoderProfiles.VideoProfile |
Configuration for a video encoder.
Public methods | |
---|---|
int
|
getBitrate()
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 |
int
|
getCodec()
The video encoder being used for the video track |
int
|
getFrameRate()
The target video frame rate in frames per second. |
int
|
getHeight()
The target video frame height in pixels |
String
|
getMediaType()
The media type of the video encoder being used for the video track |
int
|
getProfile()
The video encoder profile being used for the video track. |
int
|
getWidth()
The target video frame width in pixels |
Inherited methods | |
---|---|
public int getBitrate ()
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.
Returns | |
---|---|
int |
public int getCodec ()
The video encoder being used for the video track
See also:
public int getFrameRate ()
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(int)
. 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(int)
. 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.
Returns | |
---|---|
int |
public int getHeight ()
The target video frame height in pixels
Returns | |
---|---|
int |
public String getMediaType ()
The media type of the video encoder being used for the video track
Returns | |
---|---|
String |
This value cannot be null . |
See also:
public int getProfile ()
The video encoder profile being used for the video track.
This value is negative if there is no profile defined for the video codec.
Returns | |
---|---|
int |
public int getWidth ()
The target video frame width in pixels
Returns | |
---|---|
int |