Stay organized with collections
Save and categorize content based on your preferences.
public
final
class
MediaRecorder.VideoEncoder
extends Object
Defines the video encoding. These constants are used with
MediaRecorder.setVideoEncoder(int)
.
Summary
Constants |
int |
APV
APV video codec
|
int |
AV1
AV1 video codec
|
int |
DEFAULT
Default video codec
|
int |
DOLBY_VISION
Dolby Vision video codec
|
int |
H263
H.263 video codec
|
int |
H264
H.264 video codec
|
int |
HEVC
HEVC/H.265 video codec
|
int |
MPEG_4_SP
MPEG-4 SP video codec
|
int |
VP8
VP8 video codec
|
int |
VP9
VP9 video codec
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Constants
APV
public static final int APV
APV video codec
Constant Value:
9
(0x00000009)
AV1
public static final int AV1
AV1 video codec
Constant Value:
8
(0x00000008)
DEFAULT
public static final int DEFAULT
Default video codec
Constant Value:
0
(0x00000000)
DOLBY_VISION
public static final int DOLBY_VISION
Dolby Vision video codec
Constant Value:
7
(0x00000007)
H263
public static final int H263
H.263 video codec
Constant Value:
1
(0x00000001)
H264
public static final int H264
H.264 video codec
Constant Value:
2
(0x00000002)
HEVC
public static final int HEVC
HEVC/H.265 video codec
Constant Value:
5
(0x00000005)
MPEG_4_SP
public static final int MPEG_4_SP
MPEG-4 SP video codec
Constant Value:
3
(0x00000003)
VP8
public static final int VP8
VP8 video codec
Constant Value:
4
(0x00000004)
VP9
public static final int VP9
VP9 video codec
Constant Value:
6
(0x00000006)
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[],[],null,["# MediaRecorder.VideoEncoder\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Constants](#constants) \\| [Inherited Methods](#inhmethods) \n\nMediaRecorder.VideoEncoder\n==========================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/MediaRecorder.VideoEncoder \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\nfinal\n\nclass\nMediaRecorder.VideoEncoder\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|------------------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | android.media.MediaRecorder.VideoEncoder |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nDefines the video encoding. These constants are used with\n[MediaRecorder.setVideoEncoder(int)](/reference/android/media/MediaRecorder#setVideoEncoder(int)).\n\nSummary\n-------\n\n| ### Constants ||\n|-------|-----------------------------------------------------------------------------------------------------------|\n| `int` | [APV](/reference/android/media/MediaRecorder.VideoEncoder#APV) APV video codec |\n| `int` | [AV1](/reference/android/media/MediaRecorder.VideoEncoder#AV1) AV1 video codec |\n| `int` | [DEFAULT](/reference/android/media/MediaRecorder.VideoEncoder#DEFAULT) Default video codec |\n| `int` | [DOLBY_VISION](/reference/android/media/MediaRecorder.VideoEncoder#DOLBY_VISION) Dolby Vision video codec |\n| `int` | [H263](/reference/android/media/MediaRecorder.VideoEncoder#H263) H.263 video codec |\n| `int` | [H264](/reference/android/media/MediaRecorder.VideoEncoder#H264) H.264 video codec |\n| `int` | [HEVC](/reference/android/media/MediaRecorder.VideoEncoder#HEVC) HEVC/H.265 video codec |\n| `int` | [MPEG_4_SP](/reference/android/media/MediaRecorder.VideoEncoder#MPEG_4_SP) MPEG-4 SP video codec |\n| `int` | [VP8](/reference/android/media/MediaRecorder.VideoEncoder#VP8) VP8 video codec |\n| `int` | [VP9](/reference/android/media/MediaRecorder.VideoEncoder#VP9) VP9 video codec |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nConstants\n---------\n\n### APV\n\n[**Added in Android Baklava**](/preview) \n\n```\npublic static final int APV\n```\n\nAPV video codec\n\n\u003cbr /\u003e\n\nConstant Value:\n\n9\n(0x00000009)\n\n\n### AV1\n\nAdded in [API level 33](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int AV1\n```\n\nAV1 video codec\n\n\u003cbr /\u003e\n\nConstant Value:\n\n8\n(0x00000008)\n\n\n### DEFAULT\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int DEFAULT\n```\n\nDefault video codec\n\n\u003cbr /\u003e\n\nConstant Value:\n\n0\n(0x00000000)\n\n\n### DOLBY_VISION\n\nAdded in [API level 33](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int DOLBY_VISION\n```\n\nDolby Vision video codec\n\n\u003cbr /\u003e\n\nConstant Value:\n\n7\n(0x00000007)\n\n\n### H263\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int H263\n```\n\nH.263 video codec\n\n\u003cbr /\u003e\n\nConstant Value:\n\n1\n(0x00000001)\n\n\n### H264\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int H264\n```\n\nH.264 video codec\n\n\u003cbr /\u003e\n\nConstant Value:\n\n2\n(0x00000002)\n\n\n### HEVC\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int HEVC\n```\n\nHEVC/H.265 video codec\n\n\u003cbr /\u003e\n\nConstant Value:\n\n5\n(0x00000005)\n\n\n### MPEG_4_SP\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int MPEG_4_SP\n```\n\nMPEG-4 SP video codec\n\n\u003cbr /\u003e\n\nConstant Value:\n\n3\n(0x00000003)\n\n\n### VP8\n\nAdded in [API level 21](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int VP8\n```\n\nVP8 video codec\n\n\u003cbr /\u003e\n\nConstant Value:\n\n4\n(0x00000004)\n\n\n### VP9\n\nAdded in [API level 33](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int VP9\n```\n\nVP9 video codec\n\n\u003cbr /\u003e\n\nConstant Value:\n\n6\n(0x00000006)"]]