我试过ffmpeg但是在android上太慢了。我正在研究isoparser将视频音量调整到50%,但它不起作用。 这是我的代码:
Movie originalMovie = MovieCreator.build(input.getAbsolutePath());
Track imageTrack = originalMovie.getTracks().get(0);
Track audioTrack = originalMovie.getTracks().get(1);
audioTrack.getTrackMetaData().setVolume(0.5f);
Movie movie = new Movie();
movie.addTrack(imageTrack);
movie.addTrack(audioTrack);
Container container = new DefaultMp4Builder().build(movie);
FileChannel fc = new FileOutputStream(output).getChannel();
container.writeContainer(fc);
fc.close();