esposito
esposito

Reputation: 1

ffmpeg sidechaingate more example

I' like to see how work the new filter 'sidechaingate' but I haven't found any example on ffmpeg documentation.

I don't sure if this can useful in my case.

I need to do this:

if the signal 'A' have a very low volume compared to signal 'B' apply the gate on signal A (or simply switch to signal 'B' that is the best solution in my case)

To be honest the ideal is:

if the volume of signal 'A' is less than -45 dB (for example) switch to signal 'B'

Is possible do it in some way ?

thank you !!

Upvotes: 0

Views: 1030

Answers (1)

Gyan
Gyan

Reputation: 93261

Use

ffmpeg -i a.wav -i b.wav -filter_complex
        "[0]agate=range=0:threshold=0.0056:ratio=9000:makeup=2[a];
         [1][0]sidechaincompress=threshold=0.0056: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. -45 dB would be 10 ^ (-45/20) = 10 ^ -2.25 = 0.0056

Upvotes: 1

Related Questions