[FFmpeg-user] Frequency response of an ffmpeg equalizer filter
nicolas2020 at nv76.info
Fri Jun 26 21:31:16 EEST 2020
Le 26/06/2020 à 19:11, Michael Koch a écrit :
> Am 26.06.2020 um 19:00 schrieb Nicolas VAMBAIRGUE:
>> Le 26/06/2020 à 18:15, Paul B Mahol a écrit :
>>> On 6/26/20, Nicolas VAMBAIRGUE <nicolas2020 at nv76.info> wrote:
>>>> I'm starting to use the ffmpeg filters, using the documentation. It
>>>> seems working but, I don't find the way to get the frequency
>>>> response of
>>>> a filter. For example, let's say I'm applying this filter :
>>>> in the following command :
>>>> ffmpeg -re -i /home/dr_click/live.wav -acodec pcm_s16be -ar 44100
>>>> -ac 2
>>>> -f rtp -af
>>>> It works, I'm hearing a distorted sound. And what I'd like to know,
>>>> such a filter, is the db gain for the 2000 Hz signal or for the 150Hz
>>>> signal or any other frequency with a query like : give me your
>>>> and I'll tell you which gain is applied at this frequency with the
>>>> defined filter.
>>> Yes, with anequalizer filter.
>> => Ok, so let's say I'm using this command with an anequaliwer
>> =>_ffmpeg -re -i /home/dr_click/live.wav -af "anequalizer=c0
>> f=200 w=100 g=-10 t=0|c1 f=200 w=100 g=-10 t=0 curves=true" -acodec
>> pcm_s16be -ar 44100 -ac 2 -f rtp rtp://127.0.0.1:1234
>> => How do I get the frequency graph of such a filter ? Is it
>> mandatory to get a video stream (and how to get / display it) ? Can't
>> I get command with the frequency as input and the gain as output ? Of
>> course, such a command would means I need to query the db output for
>> each interesting frequency.
> Make a test file with 2kHz sine:
> ffmpeg -f lavfi -i sine=2000 -t 5 -y test.wav
> Analyze the volume of this file:
> ffmpeg -i test.wav -af volumedetect -y out1.wav
> The volume is written to the log file.
> Then apply your filter and analyze the output again.
=> Thank you again for your answer Michael but, I think I
probably didn't expressed my question with the right words. Let's forget
the file in and the file out to focus only on the filter :
"anequalizer=c0 f=200 w=100 g=-10 t=0|c1 f=200 w=100 g=-10 t=0"
=> What I want to know, before applying any input signal is the
result of this mathematical function : f(frequency) = gain. For example,
this filter is centered on 200 Hz with a bandwith of 100Hz and a gain of
-10 db. So, all the 200Hz frequencies will be attenuated by -10 db. But
what for the 250Hz frequencies in the signal ? Still -10 db ? Or -9 ? Or
-7.5 ? Same question for the 350 Hz frequencies in the signal.
=> The result given like a mathematical function, a cloud of
dots, an image or anything else that could help me to draw such a graph
=> I wish my question is more clear now.
=> And thank you again for your answers and your help :-)
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user