mirror of
https://github.com/samsonjs/media.git
synced 2026-04-12 12:25:47 +00:00
Simplify the audio encoder input timestamp calculation. The new calculation avoids drifting by tracking the total number of bytes encoded rather than tracking the timestamp and remainder separately, and also makes the timestamps match the decoder output buffer timestamps. Also switch one of the export tests that was passing through AMR samples over to using WAVE audio. The problem with using AMR is that the compressed samples are not necessarily an integer number of audio frames and the shadow decoder would pass them from input to output, so the audio encoder was receiving non-integer numbers of audio frames. Tested by logging the timestamps at the decoder output and encoder input with forcing transcoding audio, and verifying that after this change the audio timestamps are no longer off by one. PiperOrigin-RevId: 523409869 |
||
|---|---|---|
| .. | ||
| src | ||
| build.gradle | ||
| README.md | ||
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 'androidx.media3:media3-transformer:1.X.X'
where 1.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.