@UnstableApi
class EditedMediaItem


A MediaItem with the transformations to apply to it.

Summary

Nested types

A builder for EditedMediaItem instances.

Public functions

EditedMediaItem.Builder!

Returns a Builder initialized with the values of this instance.

Public properties

Long

The duration of the image in the output video for image MediaItem, or the media duration for other types of MediaItem, in microseconds.

Effects!

The Effects to apply to the mediaItem.

Boolean

Whether to flatten the mediaItem if it contains slow motion markers.

@IntRange(from = 1) Int

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

MediaItem!

The MediaItem on which transformations are applied.

Boolean

Whether to remove the audio from the mediaItem.

Boolean

Whether to remove the video from the mediaItem.

Public functions

buildUpon

fun buildUpon(): EditedMediaItem.Builder!

Returns a Builder initialized with the values of this instance.

Public properties

durationUs

val durationUsLong

The duration of the image in the output video for image MediaItem, or the media duration for other types of MediaItem, in microseconds.

effects

val effectsEffects!

The Effects to apply to the mediaItem.

flattenForSlowMotion

val flattenForSlowMotionBoolean

Whether to flatten the 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

val frameRate: @IntRange(from = 1) Int

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

mediaItem

val mediaItemMediaItem!

The MediaItem on which transformations are applied.

removeAudio

val removeAudioBoolean

Whether to remove the audio from the mediaItem.

removeVideo

val removeVideoBoolean

Whether to remove the video from the mediaItem.