# CodecDbLite

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/CodecDbLite.java+class:androidx.media3.transformer.CodecDbLite)

*** ** * ** ***


```
@UnstableApi
public final class CodecDbLite
```

<br />

*** ** * ** ***

Repository of chipset-specific recommendations and/or optimizations for using Android platform provided `https://developer.android.com/reference/android/media/MediaCodec.html`.

Recommendations made by this class are based on Google-collected benchmark data collected on production devices leveraging the chipsets represented.

## Summary

| ### Public methods |
|---|---|
| `static https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings` | `https://developer.android.com/reference/androidx/media3/transformer/CodecDbLite#getRecommendedVideoEncoderSettings(androidx.media3.common.Format)(https://developer.android.com/reference/androidx/media3/common/Format format)` Returns the recommended `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings` for the provided format. |
| `static https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/transformer/CodecDbLite#getRecommendedVideoMimeType()()` Returns the MIME type recommended for video encoding on the runtime device. |

## Public methods

### getRecommendedVideoEncoderSettings

```
public static VideoEncoderSettings getRecommendedVideoEncoderSettings(Format format)
```

Returns the recommended `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings` for the provided format.

The returned `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#bitrate()` is `https://developer.android.com/reference/androidx/media3/transformer/VideoEncoderSettings#NO_VALUE()` if no recommendation is available for the current device and the provided format.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format format` | the video format to recommend settings for which must include `https://developer.android.com/reference/androidx/media3/common/Format#sampleMimeType()` to identify the codec. For best results, `https://developer.android.com/reference/androidx/media3/common/Format#width()`, `https://developer.android.com/reference/androidx/media3/common/Format#height()`, `https://developer.android.com/reference/androidx/media3/common/Format#frameRate()` should be set since some optimizations are resolution dependent. |

### getRecommendedVideoMimeType

```
public static String getRecommendedVideoMimeType()
```

Returns the MIME type recommended for video encoding on the runtime device.