# Effect

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

*** ** * ** ***


```
@UnstableApi
public interface Effect
```

<br />

Known direct subclasses [GlEffect](https://developer.android.com/reference/androidx/media3/effect/GlEffect)

|---|---|
| `https://developer.android.com/reference/androidx/media3/effect/GlEffect` | Interface for a video frame effect with a `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram` implementation. |

Known indirect subclasses [AlphaScale](https://developer.android.com/reference/androidx/media3/effect/AlphaScale), [Brightness](https://developer.android.com/reference/androidx/media3/effect/Brightness), [ByteBufferGlEffect](https://developer.android.com/reference/androidx/media3/effect/ByteBufferGlEffect), [ColorConversion](https://developer.android.com/reference/androidx/media3/effect/ColorConversion), [ColorLut](https://developer.android.com/reference/androidx/media3/effect/ColorLut), [Contrast](https://developer.android.com/reference/androidx/media3/effect/Contrast), [Crop](https://developer.android.com/reference/androidx/media3/effect/Crop), [DebugViewEffect](https://developer.android.com/reference/androidx/media3/effect/DebugViewEffect), [FrameCache](https://developer.android.com/reference/androidx/media3/effect/FrameCache), [FrameDropEffect](https://developer.android.com/reference/androidx/media3/effect/FrameDropEffect), [GaussianBlurWithFrameOverlaid](https://developer.android.com/reference/androidx/media3/effect/GaussianBlurWithFrameOverlaid), [GaussianBlur](https://developer.android.com/reference/androidx/media3/effect/GaussianBlur), [GlMatrixTransformation](https://developer.android.com/reference/androidx/media3/effect/GlMatrixTransformation), [HslAdjustment](https://developer.android.com/reference/androidx/media3/effect/HslAdjustment), [LanczosResample](https://developer.android.com/reference/androidx/media3/effect/LanczosResample), [MatrixTransformation](https://developer.android.com/reference/androidx/media3/effect/MatrixTransformation), [OverlayEffect](https://developer.android.com/reference/androidx/media3/effect/OverlayEffect), [Presentation](https://developer.android.com/reference/androidx/media3/effect/Presentation), [RgbAdjustment](https://developer.android.com/reference/androidx/media3/effect/RgbAdjustment), [RgbFilter](https://developer.android.com/reference/androidx/media3/effect/RgbFilter), [RgbMatrix](https://developer.android.com/reference/androidx/media3/effect/RgbMatrix), [ScaleAndRotateTransformation](https://developer.android.com/reference/androidx/media3/effect/ScaleAndRotateTransformation), [SeparableConvolution](https://developer.android.com/reference/androidx/media3/effect/SeparableConvolution), [SingleColorLut](https://developer.android.com/reference/androidx/media3/effect/SingleColorLut), [SpeedChangeEffect](https://developer.android.com/reference/androidx/media3/effect/SpeedChangeEffect), [TimestampAdjustment](https://developer.android.com/reference/androidx/media3/effect/TimestampAdjustment), [TimestampWrapper](https://developer.android.com/reference/androidx/media3/effect/TimestampWrapper)

|---|---|
| `https://developer.android.com/reference/androidx/media3/effect/AlphaScale` | Scales the alpha value (i.e. the translucency) of a frame. |
| `https://developer.android.com/reference/androidx/media3/effect/Brightness` | Modifies brightness of an input frame. |
| `https://developer.android.com/reference/androidx/media3/effect/ByteBufferGlEffect` | A `https://developer.android.com/reference/androidx/media3/effect/GlEffect` implementation that runs an asynchronous `https://developer.android.com/reference/androidx/media3/effect/ByteBufferGlEffect.Processor` on video frame data passed in as a `https://developer.android.com/reference/androidx/media3/effect/ByteBufferGlEffect.Image`. |
| `https://developer.android.com/reference/androidx/media3/effect/ColorConversion` | Converts frames from an input color space to an electrical output color space. |
| `https://developer.android.com/reference/androidx/media3/effect/ColorLut` | Specifies color transformations using color lookup tables to apply to each frame in the fragment shader. |
| `https://developer.android.com/reference/androidx/media3/effect/Contrast` | A `https://developer.android.com/reference/androidx/media3/effect/RgbMatrix` to control the contrast of video frames. |
| `https://developer.android.com/reference/androidx/media3/effect/Crop` | Specifies a crop to apply in the vertex shader. |
| `https://developer.android.com/reference/androidx/media3/effect/DebugViewEffect` | `https://developer.android.com/reference/androidx/media3/effect/GlEffect` that renders to a `https://developer.android.com/reference/android/view/SurfaceView.html` provided by `https://developer.android.com/reference/androidx/media3/common/DebugViewProvider`. |
| `https://developer.android.com/reference/androidx/media3/effect/FrameCache` | Caches the input frames. |
| `https://developer.android.com/reference/androidx/media3/effect/FrameDropEffect` | Drops frames to lower average frame rate to around `targetFrameRate`. |
| `https://developer.android.com/reference/androidx/media3/effect/GaussianBlurWithFrameOverlaid` | A `https://developer.android.com/reference/androidx/media3/effect/SeparableConvolution` to apply a Gaussian blur on image data. |
| `https://developer.android.com/reference/androidx/media3/effect/GaussianBlur` | A `https://developer.android.com/reference/androidx/media3/effect/SeparableConvolution` to apply a Gaussian blur on image data. |
| `https://developer.android.com/reference/androidx/media3/effect/GlMatrixTransformation` | Specifies a 4x4 transformation `https://developer.android.com/reference/android/opengl/Matrix.html` to apply in the vertex shader for each input frame. |
| `https://developer.android.com/reference/androidx/media3/effect/HslAdjustment` | Adjusts the HSL (Hue, Saturation, and Lightness) of a frame. |
| `https://developer.android.com/reference/androidx/media3/effect/LanczosResample` | A `https://developer.android.com/reference/androidx/media3/effect/GlEffect` that applies a Lanczos-windowed sinc function when resampling an image. |
| `https://developer.android.com/reference/androidx/media3/effect/MatrixTransformation` | Specifies a 3x3 transformation `https://developer.android.com/reference/android/graphics/Matrix.html` to apply in the vertex shader for each frame. |
| `https://developer.android.com/reference/androidx/media3/effect/OverlayEffect` | Applies a list of `https://developer.android.com/reference/androidx/media3/effect/TextureOverlay`s to a frame in FIFO order (the last overlay in the list is displayed on top). |
| `https://developer.android.com/reference/androidx/media3/effect/Presentation` | Controls how a frame is presented with options to set the output resolution and choose how to map the input pixels onto the output frame geometry (for example, by stretching the input frame to match the specified output frame, or fitting the input frame using letterboxing). |
| `https://developer.android.com/reference/androidx/media3/effect/RgbAdjustment` | Scales the red, green, and blue color channels of a frame. |
| `https://developer.android.com/reference/androidx/media3/effect/RgbFilter` | Provides common color filters. |
| `https://developer.android.com/reference/androidx/media3/effect/RgbMatrix` | Specifies a 4x4 RGB color transformation matrix to apply to each frame in the fragment shader. |
| `https://developer.android.com/reference/androidx/media3/effect/ScaleAndRotateTransformation` | Specifies a simple rotation and/or scale to apply in the vertex shader. |
| `https://developer.android.com/reference/androidx/media3/effect/SeparableConvolution` | A `https://developer.android.com/reference/androidx/media3/effect/GlEffect` for performing separable convolutions. |
| `https://developer.android.com/reference/androidx/media3/effect/SingleColorLut` | Transforms the colors of a frame by applying the same color lookup table to each frame. |
| `https://developer.android.com/reference/androidx/media3/effect/SpeedChangeEffect` | **This class is deprecated.** Use `EditedMediaItem.Builder#setSpeed(SpeedProvider)` instead. <br /> |
| `https://developer.android.com/reference/androidx/media3/effect/TimestampAdjustment` | **This class is deprecated.** Use `EditedMediaItem.Builder#setSpeed(SpeedProvider)` instead. <br /> |
| `https://developer.android.com/reference/androidx/media3/effect/TimestampWrapper` | Applies a `https://developer.android.com/reference/androidx/media3/effect/GlEffect` from `startTimeUs` to `endTimeUs`, and no change on all other timestamps. |

*** ** * ** ***

Marker interface for a video frame effect.

## Summary

| ### Public methods |
|---|---|
| `default long` | `https://developer.android.com/reference/androidx/media3/common/Effect#getDurationAfterEffectApplied(long)(long durationUs)` Returns the expected duration of the output stream when the effect is applied given a input `durationUs`. |

## Public methods

### getDurationAfterEffectApplied

```
default long getDurationAfterEffectApplied(long durationUs)
```

Returns the expected duration of the output stream when the effect is applied given a input `durationUs`.