Go with mp4 parser of google compile 'org.mp4parser:isoparser:1.9.27'
Otherwise if your input video and audio are of different formats(other than mp4) and there are other things needed such as speed up, video resolution normalization, go with ffmpeg android library.
GitHub - tanersener/mobile-ffmpeg: FFmpeg for Android, iOS and tvOS[
^]
Use LTS version of ffmpeg library to support from 16 and above android api level