# MediaRecorder.VideoEncoder

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# VideoEncoder

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/media/MediaRecorder.VideoEncoder "View this page in Java")  

```
class VideoEncoder
```

|---|--------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                       ||
| ↳ | [android.media.MediaRecorder.VideoEncoder](https://developer.android.com/reference/kotlin/android/media/MediaRecorder.VideoEncoder#) |

Defines the video encoding. These constants are used with[MediaRecorder.setVideoEncoder(int)](https://developer.android.com/reference/kotlin/android/media/MediaRecorder#setVideoEncoder(kotlin.Int)).

## Summary

|                                                                                                                 Constants                                                                                                                  ||
|----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [APV](https://developer.android.com/reference/kotlin/android/media/MediaRecorder.VideoEncoder#APV:kotlin.Int) APV video codec                            |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [AV1](https://developer.android.com/reference/kotlin/android/media/MediaRecorder.VideoEncoder#AV1:kotlin.Int) AV1 video codec                            |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [DEFAULT](https://developer.android.com/reference/kotlin/android/media/MediaRecorder.VideoEncoder#DEFAULT:kotlin.Int) Default video codec                |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [DOLBY_VISION](https://developer.android.com/reference/kotlin/android/media/MediaRecorder.VideoEncoder#DOLBY_VISION:kotlin.Int) Dolby Vision video codec |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [H263](https://developer.android.com/reference/kotlin/android/media/MediaRecorder.VideoEncoder#H263:kotlin.Int) H.                                       |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [H264](https://developer.android.com/reference/kotlin/android/media/MediaRecorder.VideoEncoder#H264:kotlin.Int) H.                                       |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [HEVC](https://developer.android.com/reference/kotlin/android/media/MediaRecorder.VideoEncoder#HEVC:kotlin.Int) HEVC/H.                                  |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [MPEG_4_SP](https://developer.android.com/reference/kotlin/android/media/MediaRecorder.VideoEncoder#MPEG_4_SP:kotlin.Int) MPEG-4 SP video codec          |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [VP8](https://developer.android.com/reference/kotlin/android/media/MediaRecorder.VideoEncoder#VP8:kotlin.Int) VP8 video codec                            |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [VP9](https://developer.android.com/reference/kotlin/android/media/MediaRecorder.VideoEncoder#VP9:kotlin.Int) VP9 video codec                            |

## Constants

### APV

Added in[API level 36.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val APV: Int
```

APV video codec  

    Value: 9

### AV1

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val AV1: Int
```

AV1 video codec  

    Value: 8

### DEFAULT

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val DEFAULT: Int
```

Default video codec  

    Value: 0

### DOLBY_VISION

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val DOLBY_VISION: Int
```

Dolby Vision video codec  

    Value: 7

### H263

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val H263: Int
```

H.263 video codec  

    Value: 1

### H264

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val H264: Int
```

H.264 video codec  

    Value: 2

### HEVC

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val HEVC: Int
```

HEVC/H.265 video codec  

    Value: 5

### MPEG_4_SP

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val MPEG_4_SP: Int
```

MPEG-4 SP video codec  

    Value: 3

### VP8

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val VP8: Int
```

VP8 video codec  

    Value: 4

### VP9

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val VP9: Int
```

VP9 video codec  

    Value: 6