# FrameworkMuxer.Factory

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

*** ** * ** ***


```
class FrameworkMuxer.Factory : Muxer.Factory
```

<br />

*** ** * ** ***

`https://developer.android.com/reference/kotlin/androidx/media3/muxer/Muxer.Factory` for `https://developer.android.com/reference/kotlin/androidx/media3/transformer/FrameworkMuxer`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/transformer/FrameworkMuxer.Factory#Factory()()` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/transformer/FrameworkMuxer!` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/FrameworkMuxer.Factory#create(java.lang.String)(path: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Returns a new `https://developer.android.com/reference/kotlin/androidx/media3/muxer/Muxer`. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/FrameworkMuxer.Factory#getSupportedSampleMimeTypes(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType trackType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the supported sample `https://developer.android.com/reference/kotlin/androidx/media3/common/MimeTypes` for the given `https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/transformer/FrameworkMuxer.Factory!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/transformer/FrameworkMuxer.Factory#setVideoDurationUs(long)(videoDurationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the duration of the video track (in microseconds) in the output. |

### Inherited functions

From [androidx.media3.muxer.Muxer.Factory](https://developer.android.com/reference/kotlin/androidx/media3/muxer/Muxer.Factory) `https://developer.android.com/reference/kotlin/androidx/media3/muxer/Muxer!` `https://developer.android.com/reference/kotlin/androidx/media3/muxer/Muxer.Factory#create(android.os.ParcelFileDescriptor)(pfd: https://developer.android.com/reference/android/os/ParcelFileDescriptor.html!)`

Returns a new `https://developer.android.com/reference/kotlin/androidx/media3/muxer/Muxer`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/muxer/Muxer.Factory#supportsWritingNegativeTimestampsInEditList()()`

Whether the muxer supports writing negative timestamps into an edit list to instruct players to ignore these samples.

## Public constructors

### Factory

```
Factory()
```

## Public functions

### create

```
fun create(path: String!): FrameworkMuxer!
```

Returns a new `https://developer.android.com/reference/kotlin/androidx/media3/muxer/Muxer`.

| Parameters |
|---|---|
| `path: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The path to the output file. |

| Throws |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/muxer/MuxerException` | If an error occurs opening the output file for writing. |

### getSupportedSampleMimeTypes

```
fun getSupportedSampleMimeTypes(@C.TrackType trackType: Int): ImmutableList<String!>!
```

Returns the supported sample `https://developer.android.com/reference/kotlin/androidx/media3/common/MimeTypes` for the given `https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType`.

### setVideoDurationUs

```
@CanIgnoreReturnValue
fun setVideoDurationUs(videoDurationUs: Long): FrameworkMuxer.Factory!
```

Sets the duration of the video track (in microseconds) in the output.

Only the duration of the last sample is adjusted to achieve the given duration. Duration of the other samples remains unchanged.

The default is `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` to not set any duration in the output. In this case the video track duration is determined by the samples written to it and the duration of the last sample would be the same as that of the sample before that.

| Parameters |
|---|---|
| `videoDurationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The duration of the video track (in microseconds) in the output, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` to not set any duration. Only applicable when a video track is `https://developer.android.com/reference/kotlin/androidx/media3/transformer/FrameworkMuxer#addTrack(androidx.media3.common.Format)`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/transformer/FrameworkMuxer.Factory!` | This factory. |