> Documentation index: https://developer.android.com/reference/llms.txt

# VideoEncoderConfiguration

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

*** ** * ** ***


```
@ExperimentalApi
class VideoEncoderConfiguration
```

<br />

*** ** * ** ***

The complete configuration of a Video Encoder, including which `android.media.MediaCodec` is used, the settings to apply, and the bitrate to use.

## Summary

| ### Public constructors |
|---|
| `VideoEncoderConfiguration( videoEncoderSettings: VideoEncoderSettings!, format: Format!, isFallback: Boolean )` Creates an instance. |

| ### Public functions |
|---|---|
| `Boolean` | `equals(o: Any?)` |
| `Int` | `hashCode()` |
| `String!` | `toString()` |

| ### Public properties |
|---|---|
| `Format!` | `format` The `Format` the codec described by this configuration produces. |
| `Boolean` | `isFallback` Whether this is a fallback configuration. |
| `VideoEncoderSettings!` | `videoEncoderSettings` The `VideoEncoderSettings` used to configure the codec described by this configuration. |

## Public constructors

### VideoEncoderConfiguration

```
VideoEncoderConfiguration(
    videoEncoderSettings: VideoEncoderSettings!,
    format: Format!,
    isFallback: Boolean
)
```

Creates an instance.

`format` must have a non-null `sampleMimeType`. It may optionally specify the resolution (`width`, `height`, and `frameRate`) and bitrate (`averageBitrate`); unset fields must be left at `NO_VALUE`, and any set resolution or bitrate fields must be strictly positive (with all three resolution fields set together).

| Parameters |
|---|---|
| `videoEncoderSettings: VideoEncoderSettings!` | The `VideoEncoderSettings` used to configure the encoder. |
| `format: Format!` | The `Format` of the encoded video stream. |
| `isFallback: Boolean` | Whether this is a fallback configuration. |

| Throws |
|---|---|
| `java.lang.IllegalArgumentException` | If `sampleMimeType` is `null`, if only a subset of resolution fields (`width`, `height`, `frameRate`) are set, or if any set resolution or bitrate field is not strictly positive. |

## Public functions

### equals

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

### hashCode

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

### toString

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

## Public properties

### format

```
val format: Format!
```

The `Format` the codec described by this configuration produces.

`sampleMimeType` is always set. `width`, `height`, `frameRate` and `averageBitrate` are `NO_VALUE` if not configured.

### isFallback

```
val isFallback: Boolean
```

Whether this is a fallback configuration.

### videoEncoderSettings

```
val videoEncoderSettings: VideoEncoderSettings!
```

The `VideoEncoderSettings` used to configure the codec described by this configuration.