This is my code for replacing audio. After I do so however is only getting audio. I also have an issue where some players will not play the video after the edit.Is There Any Other Way to do this?Like MediaMuxer Thanks In advance
Movie m = MovieCreator.build(new FileDataSourceViaHeapImpl(dst.toString()));
List<Track> nuTracks = new LinkedList<>();
for (Track t : m.getTracks()) {
// Re-use all tracks besides the audio track
if (!"soun".equals(t.getHandler())) {
nuTracks.add(t);
}
}
Track nuAudio = new AACTrackImpl(new FileDataSourceViaHeapImpl("/storage/extSdCard/Xender/audio/Temp.aac"));
nuTracks.add(nuAudio);
m.setTracks(nuTracks);
Container mp4file = new DefaultMp4Builder().build(m);
mp4file.writeContainer(new FileOutputStream(dst.toString()).getChannel());