解决方法:在执行合并命令时加上参数“-sync 1”,使音视频同步。示例代码如下:
String[] command = new String[]{"-i", videoPath, "-i", audioPath, "-c:v", "copy", "-c:a", "aac", "-map", "0:v:0", "-map", "1:a:0", "-sync","1", outputFilePath};
FFmpegKit.execute(command);
上一篇:AndroidFFMPEGKIT合并音频和视频文件存在问题。
下一篇:AndroidFFMPEG视频编辑操作失败