我正在尝试裁剪音频文件,然后将其与android上的视频文件合并。
我可以使用下面的命令将它们合并在一起
String command[] = {"-i", mOutputFile.getAbsolutePath(), " -i", mOutputAudioFile.getAbsolutePath(), "-c:v", "copy", "-c:a", "aac","-shortest", dest.getAbsolutePath()};但我需要修剪我的音频文件的开头(例如半秒)之前(为了同步问题)。所以如果你能用一个命令来帮助我,那就太好了,但是也许我可以连续运行两个ffmpeg命令,但是我不知道该怎么做。谢谢!
发布于 2017-08-30 21:28:44
好了,我解决了这个问题,它只是关于语法,我必须写
{"-i", mOutputFile.getAbsolutePath(), "-ss", "0.5", "-i", mOutputAudioFile.getAbsolutePath(), "-c:v", "copy", "-c:a", "aac", "-shortest", dest.getAbsolutePath()};谢谢
发布于 2017-08-30 17:36:57
将seek选项应用于音频:
String command[] = {"-i", mOutputFile.getAbsolutePath(), " -ss 0.5", " -i", mOutputAudioFile.getAbsolutePath(), "-c:v", "copy", "-c:a", "aac","-shortest", dest.getAbsolutePath()};这将从0.5秒开始播放音频提要。
https://stackoverflow.com/questions/45956565
复制相似问题