gpt4 book ai didi

ffmpeg 自定义音频混合过滤器

转载 作者:行者123 更新时间:2023-12-04 23:27:10 33 4
gpt4 key购买 nike

我需要混合 2 个文件:A 和 B,结果是文件 A 的一部分和文件 B 的一部分。

详细地说,我喜欢输出是文件 A 的上部和文件 B 的下部的总和。

我需要这样的东西:

ffmpeg -i A.flac -i B.flac -af "copy all from 0 to -25 dB from 'A', copy all from -25dB to -infinite from file 'B' and put these 2 parts on the output" output.flac

-25dB 是我可以调整的变量,我喜欢保持文件“A”的音量。

简而言之,我喜欢用文件“B”替换文件“A”的软背景。

有办法做到这一点吗?

谢谢你 !!!!

最佳答案

利用

ffmpeg -i a.wav -i b.wav -filter_complex
"[0]agate=range=0:threshold=0.056:ratio=9000:makeup=2[a];
[1]acompressor=threshold=0.056:ratio=20:makeup=2[b];
[a][b]amix" out.wav

阈值计算如下: 10 to the power of (decibel value/20)
例如 -25 dB将是 10 ^ (-25/20) = 10 ^ -1.25 = 0.056

关于ffmpeg 自定义音频混合过滤器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40827264/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com