MinimServer Forum

Full Version: Convolution Filtering
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

On Saturday I measured my room using Dirac and so know where I am having a couple of issues, at 27Hz and 37Hz, the former needing reducing, the latter a gain.

I thought I would try using Convolution to address these and came up with this statement:

convOut= -lavfi "equalizer=f=27:width_type=q:width=8:g=-1.46,equalizer=f=37:width_type=q:width=8:g=2.04"

Which appears to be working OK .....BUT, the FFMPEG help file mentions several times:
'Beware of clipping when using a positive gain', which I am at 37Hz.

How do I check for clipping, or is there a way to apply gain without going into clipping?

Thx.
Hi,

Looking at the helpfile there is a function to remove clipping, adeclip.

So I piped the output into adeclip: convOut= -lavfi "equalizer=f=27:width_type=q:width=8:g=-2,equalizer=f=37:width_type=q:width=8:g=2.04;adeclip=w=55:o=75:a=8:t=10:n=1000:m​=a"

BUT, it doesn't work, I get silence. Just in case I just made the second statement adeclip as initially I am using the default values.

Do I need to explicitely name the output from equalizer and the add this as an input to adeclip?

I am running ffmpeg version 4.2.2, and adeclip is listed as once of the filters.

Any help appreciated.
Can you try this with a comma before adeclip instead of a semicolon?
(12-07-2020 19:48)simoncn Wrote: [ -> ]Can you try this with a comma before adeclip instead of a semicolon?

Hi Simon,

I assumed this would then be applied to both the equaliser statements, where I only wanted to apply it to the second.

From the helpfile:
filter chain, list seperated by ","
filtergraph sequence of filterchains. seperated by ";"

M
To do this, you would need two filterchains:

equalizer=f=27:width_type=q:width=8:g=-2
equalizer=f=37:width_type=q:width=8:g=2.04,adeclip=w=55:o=75:a=8:t=10:n=1000

connected into a filtergraph:

convOut=-filter_complex "equalizer=f=27:width_type=q:width=8:g=-2[1];[1]equalizer=f=37:width_type=q:width=8:g=2.04,adeclip=w=55:o=75:a=8:t=10:n=1000"

I have removed the m=a option from adeclip as this is not accepted by my version of FFmpeg (4.3).

However, I don't see how this would be different from my suggestion of using a single filterchain. In both cases, the audio would pass through all three filters.
(13-07-2020 08:07)simoncn Wrote: [ -> ]To do this, you would need two filterchains:

equalizer=f=27:width_type=q:width=8:g=-2
equalizer=f=37:width_type=q:width=8:g=2.04,adeclip=w=55:o=75:a=8:t=10:n=1000

connected into a filtergraph:

convOut=-filter_complex "equalizer=f=27:width_type=q:width=8:g=-2[1];[1]equalizer=f=37:width_type=q:width=8:g=2.04,adeclip=w=55:o=75:a=8:t=10:n=1000"

I have removed the m=a option from adeclip as this is not accepted by my version of FFmpeg (4.3).

However, I don't see how this would be different from my suggestion of using a single filterchain. In both cases, the audio would pass through all three filters.

Thanks Simon
(10-07-2020 08:39)Mr Underhill Wrote: [ -> ]Hi,

On Saturday I measured my room using Dirac and so know where I am having a couple of issues, at 27Hz and 37Hz, the former needing reducing, the latter a gain.

I thought I would try using Convolution to address these and came up with this statement:

convOut= -lavfi "equalizer=f=27:width_type=q:width=8:g=-1.46,equalizer=f=37:width_type=q:width=8:g=2.04"

Which appears to be working OK .....BUT, the FFMPEG help file mentions several times:
'Beware of clipping when using a positive gain', which I am at 37Hz.

How do I check for clipping, or is there a way to apply gain without going into clipping?

Thx.

There is another suggestion that you can get the correct parameters for the equalizer and the convolution filter.
You can import the data measured by the microphone into the REW and acquire them accurately by automatically calculating the EQ of the REW.
*If you have a USB interface, you can directly import the data measured by the microphone into the REW.
https://www.roomeqwizard.com/
https://www.reddit.com/r/audiophile/wiki...correction

With REW, you can also get the parameters for the equalizer, but you can also export the filter as a WAV file.
See below for the syntax to convolution that WAV file.
https://minimstreamer.com/userguide.html...0filtering
https://forum.minimserver.com/showthread.php?tid=5109
Reference URL's