Android 编译好的ffmepg

https://github.com/tanersener/mobile-ffmpeg

我主要是使用了音频加入到视频中,但是不知道为啥必须要清除原视频的声音,有大神的话可以留言指导一下

            //去掉原视频的音
            String comm1 = "-i " + BuildConfig.XF_PATH + "lpsp.mp4" + " -c:v copy -an  " + BuildConfig.XF_PATH + "no_audio_lpsp.mp4";
            int rc1 = FFmpeg.execute(comm1);
            //合成
            String comm2 = "-i " + BuildConfig.XF_PATH + "no_audio_lpsp.mp4" + " -i " + BuildConfig.XF_PATH + "xfyy.wav" + " -y " + BuildConfig.XF_PATH + "new.mp4";
            int rc2 = FFmpeg.execute(comm2);
            //直接往视频上添加音频
                        String comm3 = " -i " + BuildConfig.XF_PATH + name + ".mp4" + " -i " + BuildConfig.XF_PATH + name + ".wav" + " -c:v copy -c:a aac -strict experimental " + BuildConfig.XF_PATH + "new" + name + ".mp4";
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页