Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Convolution Filtering
10-07-2020, 08:39 (This post was last modified: 10-07-2020 08:41 by Mr Underhill.)
Post: #1
Convolution Filtering
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.
Find all posts by this user
Quote this message in a reply
12-07-2020, 17:31
Post: #2
RE: Convolution Filtering
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.
Find all posts by this user
Quote this message in a reply
12-07-2020, 19:48
Post: #3
RE: Convolution Filtering
Can you try this with a comma before adeclip instead of a semicolon?
Find all posts by this user
Quote this message in a reply
12-07-2020, 22:50
Post: #4
RE: Convolution Filtering
(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
Find all posts by this user
Quote this message in a reply
13-07-2020, 08:07 (This post was last modified: 13-07-2020 08:25 by simoncn.)
Post: #5
RE: Convolution Filtering
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.
Find all posts by this user
Quote this message in a reply
13-07-2020, 08:37
Post: #6
RE: Convolution Filtering
(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
Find all posts by this user
Quote this message in a reply
21-07-2020, 05:11
Post: #7
RE: Convolution Filtering
(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
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)