Stay organized with collections
Save and categorize content based on your preferences.
VideoEncoder
class VideoEncoder
Defines the video encoding. These constants are used with MediaRecorder.setVideoEncoder(int)
.
Summary
Constants |
static Int |
APV video codec
|
static Int |
AV1 video codec
|
static Int |
Default video codec
|
static Int |
Dolby Vision video codec
|
static Int |
H.
|
static Int |
H.
|
static Int |
HEVC/H.
|
static Int |
MPEG-4 SP video codec
|
static Int |
VP8 video codec
|
static Int |
VP9 video codec
|
Constants
APV
static val APV: Int
APV video codec
Value: 9
AV1
static val AV1: Int
AV1 video codec
Value: 8
DEFAULT
static val DEFAULT: Int
Default video codec
Value: 0
DOLBY_VISION
static val DOLBY_VISION: Int
Dolby Vision video codec
Value: 7
H263
static val H263: Int
H.263 video codec
Value: 1
H264
static val H264: Int
H.264 video codec
Value: 2
HEVC
static val HEVC: Int
HEVC/H.265 video codec
Value: 5
MPEG_4_SP
static val MPEG_4_SP: Int
MPEG-4 SP video codec
Value: 3
VP8
static val VP8: Int
VP8 video codec
Value: 4
VP9
static val VP9: Int
VP9 video codec
Value: 6
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],[],null,["# MediaRecorder.VideoEncoder\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nVideoEncoder\n============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/MediaRecorder.VideoEncoder \"View this page in Java\") \n\n```\nclass VideoEncoder\n```\n\n|---|-----------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.media.MediaRecorder.VideoEncoder](#) |\n\nDefines the video encoding. These constants are used with [MediaRecorder.setVideoEncoder(int)](/reference/kotlin/android/media/MediaRecorder#setVideoEncoder(kotlin.Int)).\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|-------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [APV](#APV:kotlin.Int) APV video codec |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [AV1](#AV1:kotlin.Int) AV1 video codec |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [DEFAULT](#DEFAULT:kotlin.Int) Default video codec |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [DOLBY_VISION](#DOLBY_VISION:kotlin.Int) Dolby Vision video codec |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [H263](#H263:kotlin.Int) H. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [H264](#H264:kotlin.Int) H. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [HEVC](#HEVC:kotlin.Int) HEVC/H. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [MPEG_4_SP](#MPEG_4_SP:kotlin.Int) MPEG-4 SP video codec |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [VP8](#VP8:kotlin.Int) VP8 video codec |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [VP9](#VP9:kotlin.Int) VP9 video codec |\n\nConstants\n---------\n\n### APV\n\nAdded in [API level Baklava](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val APV: Int\n```\n\nAPV video codec \n\n Value: 9\n\n### AV1\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val AV1: Int\n```\n\nAV1 video codec \n\n Value: 8\n\n### DEFAULT\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val DEFAULT: Int\n```\n\nDefault video codec \n\n Value: 0\n\n### DOLBY_VISION\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val DOLBY_VISION: Int\n```\n\nDolby Vision video codec \n\n Value: 7\n\n### H263\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val H263: Int\n```\n\nH.263 video codec \n\n Value: 1\n\n### H264\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val H264: Int\n```\n\nH.264 video codec \n\n Value: 2\n\n### HEVC\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val HEVC: Int\n```\n\nHEVC/H.265 video codec \n\n Value: 5\n\n### MPEG_4_SP\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val MPEG_4_SP: Int\n```\n\nMPEG-4 SP video codec \n\n Value: 3\n\n### VP8\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val VP8: Int\n```\n\nVP8 video codec \n\n Value: 4\n\n### VP9\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val VP9: Int\n```\n\nVP9 video codec \n\n Value: 6"]]