Back to Exoplayer

Mp4Muxer.Builder (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/muxer/Mp4Muxer.Builder.html

latest4.2 KB
Original Source

Package com.google.android.exoplayer2.muxer

Class Mp4Muxer.Builder


public static final classMp4Muxer.Builderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

A builder for Mp4Muxer instances.

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Builder​(FileOutputStream fileOutputStream) | Creates a Mp4Muxer.Builder instance with default values. |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | Mp4Muxer | build() | Builds an Mp4Muxer instance. | | Mp4Muxer.Builder | setAnnexBToAvccConverter​(AnnexBToAvccConverter annexBToAvccConverter) | Sets the AnnexBToAvccConverter to be used by the muxer to convert H.264 and H.265 NAL units from the Annex-B format (using start codes to delineate NAL units) to the AVCC format (which uses length prefixes). | | Mp4Muxer.Builder | setLastFrameDurationBehavior​(@com.google.android.exoplayer2.muxer.Mp4Muxer.LastFrameDurationBehavior int lastFrameDurationBehavior) | Sets the Mp4Muxer.LastFrameDurationBehavior for the video track. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

Builder

public Builder​([FileOutputStream](https://developer.android.com/reference/java/io/FileOutputStream.html "class or interface in java.io")fileOutputStream)

Creates a Mp4Muxer.Builder instance with default values. Parameters:fileOutputStream - The FileOutputStream to write the media data to.

Method Detail

- 

setLastFrameDurationBehavior

@CanIgnoreReturnValue
public[Mp4Muxer.Builder](Mp4Muxer.Builder.html "class in com.google.android.exoplayer2.muxer")setLastFrameDurationBehavior​(@com.google.android.exoplayer2.muxer.Mp4Muxer.LastFrameDurationBehavior int lastFrameDurationBehavior)

Sets the Mp4Muxer.LastFrameDurationBehavior for the video track.

The default value is Mp4Muxer.LAST_FRAME_DURATION_BEHAVIOR_INSERT_SHORT_FRAME.

- 

setAnnexBToAvccConverter

@CanIgnoreReturnValue
public[Mp4Muxer.Builder](Mp4Muxer.Builder.html "class in com.google.android.exoplayer2.muxer")setAnnexBToAvccConverter​([AnnexBToAvccConverter](AnnexBToAvccConverter.html "interface in com.google.android.exoplayer2.muxer")annexBToAvccConverter)

Sets the AnnexBToAvccConverter to be used by the muxer to convert H.264 and H.265 NAL units from the Annex-B format (using start codes to delineate NAL units) to the AVCC format (which uses length prefixes).

The default value is AnnexBToAvccConverter.DEFAULT.

- 

build

public[Mp4Muxer](Mp4Muxer.html "class in com.google.android.exoplayer2.muxer")build()

Builds an Mp4Muxer instance.