Android-如何使用ffmpeg混合音频和音频

标签 android ffmpeg

我想要复用视频和音频输出 1 个视频使用运行 cmd ffmpeg.and length = length audio or video min。不替换音频视频的声音。
我想将两种声音混合在一起
请你帮帮我。

最佳答案

使用 amerge filter :

ffmpeg -i video_and_audio_input -i audio_input \
-filter_complex "[0:a][1:a]amerge=inputs=2[a]" -ac 2 \
-map 0:v -map "[a]" -c:v copy output

所有输入必须具有相同的采样率和格式。如果不是,则使用 aformat filter第一的。

如果输入的持续时间不同,则输出将以最短的时间停止。

关于Android-如何使用ffmpeg混合音频和音频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36895132/

相关文章:

android - Google Glass 上的 ListView

python - 提高 Google Cloud Speech-to-Text 的准确性

android - 在 Android 上使用 MediaCodec API 解码 AAC

android - 我为 Android 使用什么版本的 Eclipse?

c++ - FFMpeg C Lib - 转置导致图像损坏

android - 为什么在为 Android 编译 FFmpeg 时得到 "error: invalid instruction mnemonic"?

ffmpeg - ffmpeg 输出中的 fps 是什么意思?

node.js - ffprobe 无法读取 AWS 上 Node JS createWriteStream() 生成的文件

android - 在溢出下拉菜单项上显示自定义布局?安卓

javascript - 在 Android 浏览器中捕获浏览器关闭事件