
When clipping a MediaItem with start time > 0, the audio was ending before the video. This is because: - Audio timestamps are computed based on the sample sizes, with a start time set to streamOffsetUs (i.e. the streamStartPositionUs is not taken into account). - The SamplePipeline was subtracting streamStartPositionUs from the timestamps before sending the samples to the muxer. - As a result, the audio timestamps were shifted by streamStartPositionUs, while they should be shifter by streamOffsetUs. PiperOrigin-RevId: 511175923
Transformer module
Provides functionality for transforming media files.
Getting the module
The easiest way to get the module is to add it as a gradle dependency:
implementation 'com.google.android.exoplayer:exoplayer-transformer:2.X.X'
where 2.X.X
is the version, which must match the version of the other media
modules being used.
Alternatively, you can clone this GitHub project and depend on the module locally. Instructions for doing this can be found in the top level README.