ffmpeg定制音频混合滤波器 [英] ffmpeg custom audio mixing filter
问题描述
我需要混合2个文件:A和B,结果是文件A的一部分和文件B的一部分。
详细地,我喜欢输出是文件A的上半部分和文件B的下部的总和。
我需要这样的东西:
pre>
ffmpeg -i A.flac -i B.flac -af全部从'A'复制到-25 dB,全部从-25dB复制到 - 从文件'B'并将这两个部分放在输出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] amixout.wav
阈值计算如下: 10(分贝值/ 20)的权力
如 -25 dB
将为 10 ^(-25/20)
= 10 ^ -1.25
= 0.056
I need to mix 2 files: A and B and the result is part of file A and part of File B.
In detail I like that the output is the sum of the upper part of the file A and the lower part of file B.
I need something like this:
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 is variable that I can adjust, I like to keep the volume of file 'A'.
In short I like to replace the soft background of file 'A' with file 'B'.
there is a way to do this ?
thank you !!!!
Use
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
The threshold value is calculated as follows: 10 to the power of (decibel value/20)
e.g. -25 dB
would be 10 ^ (-25/20)
= 10 ^ -1.25
= 0.056
这篇关于ffmpeg定制音频混合滤波器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!