<p>I am the author of the original Calf plugin, I had no idea it was being used in FFmpeg, great!  The original plugin used to have a sidechain input to use as the level detection, but I am assuming the ported version just uses the input signal as this level.</p>

<p>The main parameter is the threshold, it sets the level below which gating begins to occur.  Having 0 knee makes it a very sharp transition from signal to no signal, as well as the attack and release times.  I have not actually used the FFmpeg ported version of this plugin before, but I assume it would be similar.  It has quite a number of controls which probably makes it unsuitable to use without the usual GUI that shows the current level and the gating curve.  One way to test it would be to install calf-plugins and play with the Calf Gate until you get a feel for the parameters, and then apply the same to FFmpeg.  Sorry I cannot be more helpful because I did not write this port and I don't really understand the FFmpeg code.</p>

<p>PS: Thanks for alerting me about my malicious javascript, I think my blog was attacked recently, I have been cleaning it up.</p>

CC BY-SA 3.0
2015-11-28T05:37:47.620Z
Perhaps if someone wants to port the DSP from [ZamGate](http://github.com/zamaudio/zam-plugins) instead, it is an easier to use plugin.
Damien Zammit
CC BY-SA 3.0
2015-11-28T06:11:16.740Z
Thanks for the reply, Damien but I think the key issue is understanding the values that the agate filter requires. Usually, in many apps. you supply values in dB, just like the screenshot in your blog, but that doesn't seem to be the case here. If you can look at the source code file at https://ffmpeg.org/doxygen/trunk/af__agate_8c_source.html and translate the allowed ranges, that would help a lot. Thanks.
Gyan
CC BY-SA 3.0
2015-11-28T05:32:44.827Z
2015-11-28T05:32:44.827Z
Damien Zammit
<p>The Audio Gate filter (<code>agate</code>) is a new filter for <code>ffmpeg</code> included since 2015-09-22.</p>

<p>I have read the <a href="https://ffmpeg.org/ffmpeg-all.html#agate" rel="nofollow">documentation</a>, but since there are no examples included, I'm trying to figure out what settings to use to reduce unwanted parts that are under a certain dB in the audio signal.</p>

<p>Does anyone have a command example and explanation for the settings?</p>

CC BY-SA 3.0
2015-11-24T07:25:14.497Z
The documentation is indeed spartan. The filter seems to be ported from the OSS Calf Audio Plugins.This is the blog of the original author: http://www.zamaudio.com/?p=112. Perhaps contact him via email. I'll also tinker around in the meantime. The accepted ranges for the various parameters are available in the source file at https://ffmpeg.org/doxygen/trunk/af__agate_8c_source.html
Gyan
CC BY-SA 3.0
2015-11-27T10:36:34.567Z
NOTICE: Avast Web Shield gave me an infection warning when clicking the above link to zamaudio.com. The threat was blocked as being: **JS:Injection-A [Trj]**. Just FYI.
P A N
CC BY-SA 3.0
2015-11-28T18:59:40.337Z
agate docs have [recently been slightly expanded](http://git.videolan.org/?p=ffmpeg.git;a=commit;h=13696c378989252da2706f357b330240a46ea7f3).
llogan
<ffmpeg>
How does the agate filter in FFmpeg work?
P A N
# How does the agate filter in FFmpeg work?

(Asked by: username_0 on 2015-11-23)

The Audio Gate filter (`agate`) is a new filter for `ffmpeg` included since 2015-09-22.

I have read the [documentation](https://ffmpeg.org/ffmpeg-all.html#agate), but since there are no examples included, I'm trying to figure out what settings to use to reduce unwanted parts that are under a certain dB in the audio signal.

Does anyone have a command example and explanation for the settings?

**Tags:** ffmpeg

> **Comments:**
> **username_1**: The documentation is indeed spartan. The filter seems to be ported from the OSS Calf Audio Plugins.This is the blog of the original author: http://www.zamaudio.com/?p=112. Perhaps contact him via email. I'll also tinker around in the meantime. The accepted ranges for the various parameters are available in the source file at https://ffmpeg.org/doxygen/trunk/af__agate_8c_source.html  
> **username_0**: NOTICE: Avast Web Shield gave me an infection warning when clicking the above link to zamaudio.com. The threat was blocked as being: **JS:Injection-A [Trj]**. Just FYI.  
> **username_2**: agate docs have [recently been slightly expanded](http://git.videolan.org/?p=ffmpeg.git;a=commit;h=13696c378989252da2706f357b330240a46ea7f3).  

---

## 1 answers

### Answer by username_3 on 2015-11-28. Score: 5

I am the author of the original Calf plugin, I had no idea it was being used in FFmpeg, great! The original plugin used to have a sidechain input to use as the level detection, but I am assuming the ported version just uses the input signal as this level.

The main parameter is the threshold, it sets the level below which gating begins to occur. Having 0 knee makes it a very sharp transition from signal to no signal, as well as the attack and release times. I have not actually used the FFmpeg ported version of this plugin before, but I assume it would be similar. It has quite a number of controls which probably makes it unsuitable to use without the usual GUI that shows the current level and the gating curve. One way to test it would be to install calf-plugins and play with the Calf Gate until you get a feel for the parameters, and then apply the same to FFmpeg. Sorry I cannot be more helpful because I did not write this port and I don't really understand the FFmpeg code.

PS: Thanks for alerting me about my malicious javascript, I think my blog was attacked recently, I have been cleaning it up.

> **Comments:**
> **username_3**: Perhaps if someone wants to port the DSP from [ZamGate](http://github.com/zamaudio/zam-plugins) instead, it is an easier to use plugin.  
> **username_1**: Thanks for the reply, Damien but I think the key issue is understanding the values that the agate filter requires. Usually, in many apps. you supply values in dB, just like the screenshot in your blog, but that doesn't seem to be the case here. If you can look at the source code file at https://ffmpeg.org/doxygen/trunk/af__agate_8c_source.html and translate the allowed ranges, that would help a lot. Thanks.  

---

