# 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
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 functions |
|---|---|
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings!` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/CodecDbLite#getRecommendedVideoEncoderSettings(androidx.media3.common.Format)(format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!)` Returns the recommended `https://developer.android.com/reference/kotlin/androidx/media3/transformer/VideoEncoderSettings` for the provided format. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/CodecDbLite#getRecommendedVideoMimeType()()` Returns the MIME type recommended for video encoding on the runtime device. |

## Public functions

### getRecommendedVideoEncoderSettings

```
java-static fun getRecommendedVideoEncoderSettings(format: Format!): VideoEncoderSettings!
```

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

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

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

### getRecommendedVideoMimeType

```
java-static fun getRecommendedVideoMimeType(): String!
```

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