在ffmpeg中混合声音 [英] Mixing sounds in ffmpeg

查看:113
本文介绍了在ffmpeg中混合声音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个波(.wav)样本,每个持续1秒。我需要混合它们,使得第二个波形文件在第一个文件之后0.5秒开始。我需要将混合波格式导出到一个名为output.wav的新的wave文件。如何使用ffmpeg来实现?

解决方案

Sox 将允许混合音频文件。您可以使用-p pad选项指定偏移量。

  sox -m sound1.wav| sox sound2.wav -p pad 0.5out.wav 

检查 Sox常见问题了解更多信息


I have 2 wave (.wav) samples of 1 second duration each. I need to mix them such that the second wave file starts at 0.5 seconds after the first one. I need to export the mixed wave format to a new wave file called output.wav. How can I achieve this using ffmpeg?

解决方案

Sox will allow to mix audio files. You can specify offsets using the -p pad option.

sox -m sound1.wav "|sox sound2.wav -p pad 0.5" out.wav

Check question 7 of the Sox FAQ for more info

这篇关于在ffmpeg中混合声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆