# VideoEncoderSettings

Artifact: [androidx.media3:media3-transformer](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/transformer/VideoEncoderSettings.java+class:androidx.media3.transformer.VideoEncoderSettings)

*** ** * ** ***


```
@UnstableApi
class VideoEncoderSettings
```

<br />

*** ** * ** ***

Represents the video encoder settings.

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) @https://developer.android.com/reference/kotlin/androidx/annotation/IntDef(value = ) annotation https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings.BitrateMode` The allowed values for `bitrateMode`. |
| `class https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings.Builder` Builds `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings` instances. |

| ### Constants |
|---|---|
| `const https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings!` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#DEFAULT()` A default `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#DEFAULT_I_FRAME_INTERVAL_SECONDS() = 1.0f` The default I-frame interval in seconds. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#NO_VALUE() = -1` A value for various fields to indicate that the field's value is unknown or not applicable. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#RATE_UNSET() = -2` A value for `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings.Builder#setEncoderPerformanceParameters(int,int)` to disable setting performance parameters. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings.Builder!` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#buildUpon()()` Returns a `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings.Builder` initialized with the values of this instance. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#equals(java.lang.Object)(o: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#bitrate()` The encoding bitrate in bits per second. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings.BitrateMode https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#bitrateMode()` One of `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings.BitrateMode`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#complexity()` The `https://developer.android.com/reference/android/media/MediaFormat.html#KEY_COMPLEXITY`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#iFrameIntervalSeconds()` The encoding I-Frame interval in seconds. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#level()` The encoding level. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#maxBFrames()` The `https://developer.android.com/reference/android/media/MediaFormat.html#KEY_MAX_B_FRAMES` allowed between I and P frames in the produced encoded video. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#numBidirectionalTemporalLayers()` The requested number of bidirectional temporal layers requested from the encoder. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#numNonBidirectionalTemporalLayers()` The requested number of non-bidirectional temporal layers requested from the encoder. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#operatingRate()` The encoder `https://developer.android.com/reference/android/media/MediaFormat.html#KEY_OPERATING_RATE` in frames per second. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#priority()` The encoder `https://developer.android.com/reference/android/media/MediaFormat.html#KEY_PRIORITY`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#profile()` The encoding profile. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings#repeatPreviousFrameIntervalUs()` The `https://developer.android.com/reference/android/media/MediaFormat.html#KEY_REPEAT_PREVIOUS_FRAME_AFTER`, in microseconds. |

## Constants

### DEFAULT

```
const val DEFAULT: VideoEncoderSettings!
```

A default `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings`.

### DEFAULT_I_FRAME_INTERVAL_SECONDS

```
const val DEFAULT_I_FRAME_INTERVAL_SECONDS = 1.0f: Float
```

The default I-frame interval in seconds.

### NO_VALUE

```
const val NO_VALUE = -1: Int
```

A value for various fields to indicate that the field's value is unknown or not applicable.

### RATE_UNSET

```
const val RATE_UNSET = -2: Int
```

A value for `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings.Builder#setEncoderPerformanceParameters(int,int)` to disable setting performance parameters.

## Public functions

### buildUpon

```
fun buildUpon(): VideoEncoderSettings.Builder!
```

Returns a `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings.Builder` initialized with the values of this instance.

### equals

```
fun equals(o: Any?): Boolean
```

### hashCode

```
fun hashCode(): Int
```

### toString

```
fun toString(): String!
```

## Public properties

### bitrate

```
val bitrate: Int
```

The encoding bitrate in bits per second.

### bitrateMode

```
@VideoEncoderSettings.BitrateMode
val bitrateMode: Int
```

One of `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings.BitrateMode`.

### complexity

```
val complexity: Int
```

The `https://developer.android.com/reference/android/media/MediaFormat.html#KEY_COMPLEXITY`.

### iFrameIntervalSeconds

```
val iFrameIntervalSeconds: Float
```

The encoding I-Frame interval in seconds.

### level

```
val level: Int
```

The encoding level.

### maxBFrames

```
val maxBFrames: Int
```

The `https://developer.android.com/reference/android/media/MediaFormat.html#KEY_MAX_B_FRAMES` allowed between I and P frames in the produced encoded video.

### numBidirectionalTemporalLayers

```
val numBidirectionalTemporalLayers: Int
```

The requested number of bidirectional temporal layers requested from the encoder.

### numNonBidirectionalTemporalLayers

```
val numNonBidirectionalTemporalLayers: Int
```

The requested number of non-bidirectional temporal layers requested from the encoder.

### operatingRate

```
val operatingRate: Int
```

The encoder `https://developer.android.com/reference/android/media/MediaFormat.html#KEY_OPERATING_RATE` in frames per second.

### priority

```
val priority: Int
```

The encoder `https://developer.android.com/reference/android/media/MediaFormat.html#KEY_PRIORITY`.

### profile

```
val profile: Int
```

The encoding profile.

### repeatPreviousFrameIntervalUs

```
val repeatPreviousFrameIntervalUs: Long
```

The `https://developer.android.com/reference/android/media/MediaFormat.html#KEY_REPEAT_PREVIOUS_FRAME_AFTER`, in microseconds.