# Effects

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

*** ** * ** ***

<br />

```
@UnstableApi
class Effects
```

<br />

*** ** * ** ***

Effects to apply to a `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem` or to a `https://developer.android.com/reference/kotlin/androidx/media3/transformer/Composition`.

## Summary

| ### Constants |
|---|---|
| `const https://developer.android.com/reference/kotlin/androidx/media3/transformer/Effects!` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/Effects#EMPTY()` An empty `https://developer.android.com/reference/kotlin/androidx/media3/transformer/Effects` instance. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/transformer/Effects#Effects(java.util.List<androidx.media3.common.audio.AudioProcessor>,java.util.List<androidx.media3.common.Effect>)( audioProcessors: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor!>!, videoEffects: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/Effect!>! )` Creates an instance. |

| ### Public functions |
|---|---|
| `java-static https://developer.android.com/reference/android/util/Pair.html<https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor!, https://developer.android.com/reference/kotlin/androidx/media3/common/Effect!>!` | `[createExperimentalSpeedChangingEffect](https://developer.android.com/reference/kotlin/androidx/media3/transformer/Effects#createExperimentalSpeedChangingEffect(androidx.media3.common.audio.SpeedProvider))(speedProvider: https://developer.android.com/reference/kotlin/androidx/media3/common/audio/SpeedProvider!)` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/transformer/EditedMediaItem.Builder#setSpeed(androidx.media3.common.audio.SpeedProvider)` instead. <br /> |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/Effects#toString()()` |

| ### Public properties |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/Effects#audioProcessors()` The list of `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor` to apply to audio buffers. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://developer.android.com/reference/kotlin/androidx/media3/common/Effect!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/Effects#videoEffects()` The list of `https://developer.android.com/reference/kotlin/androidx/media3/common/Effect` to apply to each frame. |

## Constants

### EMPTY

```
const val EMPTY: Effects!
```

An empty `https://developer.android.com/reference/kotlin/androidx/media3/transformer/Effects` instance.

## Public constructors

### Effects

```
Effects(
    audioProcessors: (Mutable)List<AudioProcessor!>!,
    videoEffects: (Mutable)List<Effect!>!
)
```

Creates an instance.

| Parameters |
|---|---|
| `audioProcessors: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor!>!` | The `https://developer.android.com/reference/kotlin/androidx/media3/transformer/Effects#audioProcessors()`. |
| `videoEffects: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/Effect!>!` | The `https://developer.android.com/reference/kotlin/androidx/media3/transformer/Effects#videoEffects()`. |

## Public functions

### createExperimentalSpeedChangingEffect

```
java-static fun [createExperimentalSpeedChangingEffect](https://developer.android.com/reference/kotlin/androidx/media3/transformer/Effects#createExperimentalSpeedChangingEffect(androidx.media3.common.audio.SpeedProvider))(speedProvider: SpeedProvider!): Pair<AudioProcessor!, Effect!>!
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/transformer/EditedMediaItem.Builder#setSpeed(androidx.media3.common.audio.SpeedProvider)` instead.

Creates an interlinked `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor` and `https://developer.android.com/reference/kotlin/androidx/media3/common/Effect` that changes the speed of media samples in segments of the input file specified by the given `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/SpeedProvider`.

The `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor` and `https://developer.android.com/reference/kotlin/androidx/media3/common/Effect` are interlinked to help maintain A/V sync. When using Transformer, if the input file doesn't have audio, or audio is being removed, you may have to include `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TRACK_TYPE_AUDIO()` in the `trackTypes` of the `https://developer.android.com/reference/kotlin/androidx/media3/transformer/EditedMediaItemSequence` for the interlinked effects to function correctly. Alternatively, you can use `https://developer.android.com/reference/kotlin/androidx/media3/effect/SpeedChangeEffect` when the input has no audio.

| Parameters |
|---|---|
| `speedProvider: https://developer.android.com/reference/kotlin/androidx/media3/common/audio/SpeedProvider!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/SpeedProvider` determining the speed for the media at specific timestamps. |

### toString

```
fun toString(): String!
```

## Public properties

### audioProcessors

```
val audioProcessors: ImmutableList<AudioProcessor!>!
```

The list of `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor` to apply to audio buffers. They are applied in the order of the list, and buffers will only be modified by that `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor` if it `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor#isActive()` based on the current configuration.

### videoEffects

```
val videoEffects: ImmutableList<Effect!>!
```

The list of `https://developer.android.com/reference/kotlin/androidx/media3/common/Effect` to apply to each frame. They are applied in the order of the list.