Class EditedMediaItem.Builder

    • Method Detail

      • setRemoveAudio

        @CanIgnoreReturnValue
        public EditedMediaItem.Builder setRemoveAudio​(boolean removeAudio)
        Sets whether to remove the audio from the MediaItem.

        The default value is false.

        The audio and video cannot both be removed because the output would not contain any samples.

        Parameters:
        removeAudio - Whether to remove the audio.
        Returns:
        This builder.
      • setRemoveVideo

        @CanIgnoreReturnValue
        public EditedMediaItem.Builder setRemoveVideo​(boolean removeVideo)
        Sets whether to remove the video from the MediaItem.

        The default value is false.

        The audio and video cannot both be removed because the output would not contain any samples.

        Parameters:
        removeVideo - Whether to remove the video.
        Returns:
        This builder.
      • setDurationUs

        @CanIgnoreReturnValue
        public EditedMediaItem.Builder setDurationUs​(long durationUs)
        Sets the duration of the output video in microseconds.

        This should be set for inputs that don't have an implicit duration (e.g. images). It will be ignored for inputs that do have an implicit duration (e.g. video).

        No duration is set by default.

      • setFrameRate

        @CanIgnoreReturnValue
        public EditedMediaItem.Builder setFrameRate​(@IntRange(from=0L)
                                                    int frameRate)
        Sets the frame rate of the output video in frames per second.

        This should be set for inputs that don't have an implicit frame rate (e.g. images). It will be ignored for inputs that do have an implicit frame rate (e.g. video).

        No frame rate is set by default.