# Av1Config

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

*** ** * ** ***


```
@UnstableApi
public final class Av1Config
```

<br />

*** ** * ** ***

AV1 configuration data.

## Summary

| ### Public fields |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/Av1Config#bitdepth()` The bit depth of the samples, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown. |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/extractor/Av1Config#codecs()` An RFC 6381 codecs string representing the video format. |
| `final @https://developer.android.com/reference/androidx/media3/common/C.ColorRange int` | `https://developer.android.com/reference/androidx/media3/extractor/Av1Config#colorRange()` The `https://developer.android.com/reference/androidx/media3/common/C.ColorRange` of the video, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable. |
| `final int` | `@https://developer.android.com/reference/androidx/media3/common/C.ColorSpace https://developer.android.com/reference/androidx/media3/extractor/Av1Config#colorSpace()` The `https://developer.android.com/reference/androidx/media3/common/C.ColorSpace` of the video, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable. |
| `final int` | `@https://developer.android.com/reference/androidx/media3/common/C.ColorTransfer https://developer.android.com/reference/androidx/media3/extractor/Av1Config#colorTransfer()` The `https://developer.android.com/reference/androidx/media3/common/C.ColorTransfer` of the video, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable. |

| ### Public methods |
|---|---|
| `static @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/extractor/Av1Config` | `https://developer.android.com/reference/androidx/media3/extractor/Av1Config#parse(byte[])(byte[] initializationData)` Parses the av1C configuration record and OBU sequence header and returns an `https://developer.android.com/reference/androidx/media3/extractor/Av1Config` from their data. |

## Public fields

### bitdepth

```
public final int bitdepth
```

The bit depth of the samples, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown.

### codecs

```
public final String codecs
```

An RFC 6381 codecs string representing the video format.

See `https://developer.android.com/reference/androidx/media3/common/Format#codecs()` and the [AV1 codec string spec](https://aomediacodec.github.io/av1-isobmff/#codecsparam).

### colorRange

```
public final @C.ColorRange int colorRange
```

The `https://developer.android.com/reference/androidx/media3/common/C.ColorRange` of the video, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable.

Value is one of the following:

- `Format.NO_VALUE`

<br />

### colorSpace

```
@C.ColorSpace
public final int colorSpace
```

The `https://developer.android.com/reference/androidx/media3/common/C.ColorSpace` of the video, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable.

Value is one of the following:

- `Format.NO_VALUE`

<br />

### colorTransfer

```
@C.ColorTransfer
public final int colorTransfer
```

The `https://developer.android.com/reference/androidx/media3/common/C.ColorTransfer` of the video, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable.

Value is one of the following:

- `Format.NO_VALUE`

<br />

## Public methods

### parse

```
public static @Nullable Av1Config parse(byte[] initializationData)
```

Parses the av1C configuration record and OBU sequence header and returns an `https://developer.android.com/reference/androidx/media3/extractor/Av1Config` from their data.

See av1C configuration record syntax in the [AV1 ISOBMFF spec](https://aomediacodec.github.io/av1-isobmff/#av1codecconfigurationbox-syntax).

See av1C OBU syntax in the [AV1 Bitstream spec](https://aomediacodec.github.io/av1-spec/av1-spec.pdf).

| Parameters |
|---|---|
| `byte[] initializationData` | The exact bytes of the AV1 configuration data to parse. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/extractor/Av1Config` | A parsed representation of the AV1 configuration data, or `null` if the version isn't supported. |

| Throws |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/ParserException` | If an error occurred parsing the data. |