# 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
public final 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/androidx/annotation/IntDef(value = ) public annotation https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings.BitrateMode` The allowed values for `bitrateMode`. |
| `public final class https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings.Builder` Builds `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings` instances. |

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

| ### Public fields |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#bitrate()` The encoding bitrate in bits per second. |
| `final int` | `@https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings.BitrateMode https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#bitrateMode()` One of `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings.BitrateMode`. |
| `final int` | `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#complexity()` The `https://developer.android.com/reference/android/media/MediaFormat.html#KEY_COMPLEXITY`. |
| `final float` | `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#iFrameIntervalSeconds()` The encoding I-Frame interval in seconds. |
| `final int` | `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#level()` The encoding level. |
| `final int` | `https://developer.android.com/reference/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. |
| `final int` | `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#numBidirectionalTemporalLayers()` The requested number of bidirectional temporal layers requested from the encoder. |
| `final int` | `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#numNonBidirectionalTemporalLayers()` The requested number of non-bidirectional temporal layers requested from the encoder. |
| `final int` | `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#operatingRate()` The encoder `https://developer.android.com/reference/android/media/MediaFormat.html#KEY_OPERATING_RATE` in frames per second. |
| `final int` | `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#priority()` The encoder `https://developer.android.com/reference/android/media/MediaFormat.html#KEY_PRIORITY`. |
| `final int` | `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#profile()` The encoding profile. |
| `final long` | `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#repeatPreviousFrameIntervalUs()` The `https://developer.android.com/reference/android/media/MediaFormat.html#KEY_REPEAT_PREVIOUS_FRAME_AFTER`, in microseconds. |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings.Builder` | `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#buildUpon()()` Returns a `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings.Builder` initialized with the values of this instance. |
| `boolean` | `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#equals(java.lang.Object)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html o)` |
| `int` | `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#hashCode()()` |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#toString()()` |

## Constants

### DEFAULT

```
public static final VideoEncoderSettings DEFAULT
```

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

### DEFAULT_I_FRAME_INTERVAL_SECONDS

```
public static final float DEFAULT_I_FRAME_INTERVAL_SECONDS = 1.0f
```

The default I-frame interval in seconds.

### NO_VALUE

```
public static final int NO_VALUE = -1
```

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

### RATE_UNSET

```
public static final int RATE_UNSET = -2
```

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

## Public fields

### bitrate

```
public final int bitrate
```

The encoding bitrate in bits per second.

### bitrateMode

```
@VideoEncoderSettings.BitrateMode
public final int bitrateMode
```

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

### complexity

```
public final int complexity
```

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

### iFrameIntervalSeconds

```
public final float iFrameIntervalSeconds
```

The encoding I-Frame interval in seconds.

### level

```
public final int level
```

The encoding level.

### maxBFrames

```
public final int 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.

### numBidirectionalTemporalLayers

```
public final int numBidirectionalTemporalLayers
```

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

### numNonBidirectionalTemporalLayers

```
public final int numNonBidirectionalTemporalLayers
```

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

### operatingRate

```
public final int operatingRate
```

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

### priority

```
public final int priority
```

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

### profile

```
public final int profile
```

The encoding profile.

### repeatPreviousFrameIntervalUs

```
public final long repeatPreviousFrameIntervalUs
```

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

## Public methods

### buildUpon

```
public VideoEncoderSettings.Builder buildUpon()
```

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

### equals

```
public boolean equals(@Nullable Object o)
```

### hashCode

```
public int hashCode()
```

### toString

```
public String toString()
```