Re: [FFmpeg-user] Frequency response of an ffmpeg equalizer filter
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 wrote: Hello, 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 : equalizer=f=7000:t=q:w=2:g=2,equalizer=f=1000:t=q:w=1:g=3,equalizer=f=80:t=q:w=2:g=-30 in the following command : ffmpeg -re -i /home/dr_click/live.wav -acodec pcm_s16be -ar 44100 -ac 2 -f rtp -af "equalizer=f=7000:t=q:w=2:g=2,equalizer=f=1000:t=q:w=1:g=3,equalizer=f=80:t=q:w=2:g=-30" rtp://127.0.0.1:1234 It works, I'm hearing a distorted sound. And what I'd like to know, with 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 frequency 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. Michael => 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 : https://s1.qwant.com/thumbr/0x380/0/5/cfb0ceac6e3b4fdd73923eaaf68e76c58991b4de8ac088f4dfad665d5b8c34/parametric.png?u=https%3A%2F%2Fcdn.tutsplus.com%2Faudio%2Fuploads%2Flegacy%2Fqt_040_eq%2Fparametric.png=0=1=0=1 => I wish my question is more clear now. => And thank you again for your answers and your help :-) ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Frequency response of an ffmpeg equalizer filter
Le 26/06/2020 à 18:15, Paul B Mahol a écrit : On 6/26/20, Nicolas VAMBAIRGUE wrote: Hello, 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 : equalizer=f=7000:t=q:w=2:g=2,equalizer=f=1000:t=q:w=1:g=3,equalizer=f=80:t=q:w=2:g=-30 in the following command : ffmpeg -re -i /home/dr_click/live.wav -acodec pcm_s16be -ar 44100 -ac 2 -f rtp -af "equalizer=f=7000:t=q:w=2:g=2,equalizer=f=1000:t=q:w=1:g=3,equalizer=f=80:t=q:w=2:g=-30" rtp://127.0.0.1:1234 It works, I'm hearing a distorted sound. And what I'd like to know, with 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 frequency 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. Thank you for your help, Nicolas ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Frequency response of an ffmpeg equalizer filter
Hello, 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 : equalizer=f=7000:t=q:w=2:g=2,equalizer=f=1000:t=q:w=1:g=3,equalizer=f=80:t=q:w=2:g=-30 in the following command : ffmpeg -re -i /home/dr_click/live.wav -acodec pcm_s16be -ar 44100 -ac 2 -f rtp -af "equalizer=f=7000:t=q:w=2:g=2,equalizer=f=1000:t=q:w=1:g=3,equalizer=f=80:t=q:w=2:g=-30" rtp://127.0.0.1:1234 It works, I'm hearing a distorted sound. And what I'd like to know, with 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 frequency and I'll tell you which gain is applied at this frequency with the defined filter. Thank you for your help, Nicolas ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Streaming wav sound with FFMPEG
Le 17/06/2020 à 16:32, Carl Eugen Hoyos a écrit : Am 17.06.2020 um 11:37 schrieb Nicolas VAMBAIRGUE : - [rtp @ 0x7f7d8040] Protocol 'rtp' not on whitelist 'file,crypto'! And if I finally tried : ffmpeg -protocol_whitelist file,http,rtp,tcp -i http://199.180.75.118:80 -acodec pcm_s16le -ar 44100 -ac 2 -f rtp -sdp_file /home/dr_click/audio.sdp rtp://127.0.1.1:1234 But I get the same "whitelist" error. (Command line including) complete, uncut console output missing. I consider it very unlikely that the same error is shown... Carl Eugen > Yes, sorry, let me post you what I got exactly. So, with the above command «server side» : > ffmpeg -protocol_whitelist file,http,rtp,tcp -i http://199.180.75.118:80 -acodec pcm_s16le -ar 44100 -ac 2 -f rtp -sdp_file /home/dr_click/audio.sdp rtp://127.0.1.1:1234 > > I type the following command «client side» to try to read the stream : > ffplay /home/dr_click/audio.sdp > > And then, I get this error : > [rtp @ 0x7f7778008040] Protocol 'rtp' not on whitelist 'file,crypto'! /home/dr_click/audio.sdp: Invalid data found when processing input nan: 0.000 fd= 0 aq=0KB vq=0KB sq=0B f=0/0 > Dr_Click ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Streaming wav sound with FFMPEG
Hello, I'm using the ffmpeg library to decode / encode audio in Java, using the Process objets. The aim is to decode the datas of an external source with ffmpeg, and then to stream the decoded (wav) datas locally to catch them in my Java code. After I processed them in Java, I'll send them back to ffmpeg to generate a coded stream (mp3, opus, ogg...) or to create a file. As Java sounds only allow wav audio datas, I made a first try with this command line : ffmpeg -i http://199.180.75.118:80 -acodec pcm_s16le -ar 44100 -ac 2 "/home/dr_click/montest.wav" It works. But, my goal is to get the frames on the fly and not a file. I thought about using a pipe but it seems it will work only with Linux and not with Windows (and no idea for MacOS) To stream locally a wav file and to catch it with Java into a AudioInputStream, I wrote this command : ffmpeg -re -i http://199.180.75.118:80 -acodec pcm_s16le -ar 44100 -ac 2 -f rtp rtp://127.0.0.1:1234 It seems to work on the server side. But, when I enter the below command line to act like the client side : ffplay rtp://127.0.0.1:1234 It doesn't work at all. I got this error : - [rtp @ 0x7f29c8000b80] Unable to receive RTP payload type 97 without an SDP file describing it So I tried the couple : ffmpeg -i http://199.180.75.118:80 -acodec pcm_s16le -ar 44100 -ac 2 -f rtp -sdp_file /home/dr_click/audio.sdp rtp://127.0.1.1:1234 and ffplay /home/dr_click/audio.sdp I got the following error : - [rtp @ 0x7f7d8040] Protocol 'rtp' not on whitelist 'file,crypto'! if And if I finally tried : fmpeg -protocol_whitelist file,http,rtp,tcp -i http://199.180.75.118:80 -acodec pcm_s16le -ar 44100 -ac 2 -f rtp -sdp_file /home/dr_click/audio.sdp rtp://127.0.1.1:1234 But I get the same "whitelist" error. Which point do I miss to stream locally some wav datas and then catching them in the JAVA AudioInputStream ? Thank you for all your replies. Regards, Nicolas ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".