在 android 中通过 ffmpeg 合并两个 mp3 文件无效

Merge two mp3 files through ffmpeg in android not working

我正在尝试通过 ffmpeg 将两个 mp3 文件合并(重叠)到一个输出文件中,但我收到了以下日志消息,我猜这是一个我无法识别的语法错误。

我正在使用这个外部库与 ffmpeg 交互:github.com/WritingMinds/ffmpeg-android-java

执行的命令ffmpeg -i /storage/emulated/0/bass.mp3 -i /storage/emulated/0/clap.mp3 -filter_complex amerge -c:a libmp3lame -q:a 4 /storage/emulated/0/output.mp3

(路径是通过getabsolutepath获取的)

从日志中获取的消息:

ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers

built on Oct 7 2014 15:08:46 with gcc 4.8 (GCC)

Input #0, mp3, from '/storage/emulated/0/bass.mp3':

[mp3 @ 0xb5886400] Estimating duration from bitrate, this may be inaccurate

[NULL @ 0xb5887000] Unable to find a suitable output format for 'ffmpeg'

ffmpeg: Invalid argument

Sooo,你的问题已在问题中报告,它是here:你不必在命令开头键入 ffmpeg。