# EditedMediaItem

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

*** ** * ** ***


```
@UnstableApi
public final class EditedMediaItem
```

<br />

*** ** * ** ***

A `https://developer.android.com/reference/androidx/media3/common/MediaItem` with the transformations to apply to it.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem.Builder` A builder for `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem` instances. |

| ### Public fields |
|---|---|
| `final long` | `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#durationUs()` The duration of the image in the output video for image `https://developer.android.com/reference/androidx/media3/common/MediaItem`, or the original media duration for other types of `https://developer.android.com/reference/androidx/media3/common/MediaItem`, in microseconds. |
| `final https://developer.android.com/reference/androidx/media3/transformer/Effects` | `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#effects()` The `https://developer.android.com/reference/androidx/media3/transformer/Effects` to apply to the `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#mediaItem()`. |
| `final boolean` | `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#flattenForSlowMotion()` Whether to flatten the `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#mediaItem()` if it contains slow motion markers. |
| `final @https://developer.android.com/reference/androidx/annotation/IntRange(from = 1) int` | `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#frameRate()` The frame rate of the image in the output video, in frames per second. |
| `final https://developer.android.com/reference/androidx/media3/common/MediaItem` | `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#mediaItem()` The `https://developer.android.com/reference/androidx/media3/common/MediaItem` on which transformations are applied. |
| `final boolean` | `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#removeAudio()` Whether to remove the audio from the `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#mediaItem()`. |
| `final boolean` | `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#removeVideo()` Whether to remove the video from the `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#mediaItem()`. |
| `final https://developer.android.com/reference/androidx/media3/common/SpeedParameters` | `@https://developer.android.com/reference/androidx/media3/common/util/ExperimentalApi https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#speedParameters()` |
| `final https://developer.android.com/reference/androidx/media3/common/audio/SpeedProvider` | `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#speedProvider()` |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem.Builder` | `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#buildUpon()()` Returns a `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem.Builder` initialized with the values of this instance. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#toString()()` |

## Public fields

### durationUs

```
public final long durationUs
```

The duration of the image in the output video for image `https://developer.android.com/reference/androidx/media3/common/MediaItem`, or the original media duration for other types of `https://developer.android.com/reference/androidx/media3/common/MediaItem`, in microseconds.

### effects

```
public final Effects effects
```

The `https://developer.android.com/reference/androidx/media3/transformer/Effects` to apply to the `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#mediaItem()`.

### flattenForSlowMotion

```
public final boolean flattenForSlowMotion
```

Whether to flatten the `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#mediaItem()` if it contains slow motion markers.

The flattened output is obtained by removing the slow motion metadata and by actually slowing down the parts of the video and audio streams defined in this metadata.

Only Samsung Extension Format (SEF) slow motion metadata type is supported. Flattening has no effect if the input does not contain this metadata type.

For SEF slow motion media, the following assumptions are made on the input:

- The input container format is (unfragmented) MP4.
- The input contains an AVC video elementary stream with temporal SVC.
- The recording frame rate of the video is 120 or 240 fps.

### frameRate

```
public final @IntRange(from = 1) int frameRate
```

The frame rate of the image in the output video, in frames per second.

### mediaItem

```
public final MediaItem mediaItem
```

The `https://developer.android.com/reference/androidx/media3/common/MediaItem` on which transformations are applied.

### removeAudio

```
public final boolean removeAudio
```

Whether to remove the audio from the `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#mediaItem()`.

### removeVideo

```
public final boolean removeVideo
```

Whether to remove the video from the `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem#mediaItem()`.

### speedParameters

```
@ExperimentalApi
public final SpeedParameters speedParameters
```

### speedProvider

```
public final SpeedProvider speedProvider
```

## Public methods

### buildUpon

```
public EditedMediaItem.Builder buildUpon()
```

Returns a `https://developer.android.com/reference/androidx/media3/transformer/EditedMediaItem.Builder` initialized with the values of this instance.

### toString

```
public String toString()
```