Am 30.12.2018 um 13:20 schrieb Paul B Mahol:
On 12/30/18, Michael Koch <astroelectro...@t-online.de> wrote:
Am 28.12.2018 um 11:46 schrieb Paul B Mahol:
One can now use afftfilt to shift frequencies around in frequency domain.
It should be easier than using amultiply filter.
c:\ffmpeg\ffmpeg -f dshow -channels 2 -i audio="Mikrofon (Realtek High
Definiti" -af
volume=30,afftfilt='real=real(b+300,ch)':'imag=imag(b+300,ch)' -f nut -
| c:\\ffmpeg\ffplay -

I've just tested this and it works fine. There is no error message when
(b+300) becomes larger than the available number of bins. How does
afftfilt handle this case?
Does real(too_large_number,ch) return zero?
No, it clips and return value in max bin.
If you want explicit zero you will need to change your expression.

yes, zero is better than using the value in the max bin. Here is the (Windows) batch file for live ultrasonic conversion:

set "SR=44100"   :: Sample Rate
set "F=4000"     :: Subtracted Frequency
set "VOL=30"     :: Volume Factor
set /a "N=4096*%F%/%SR%"   :: N = 4096 * F / SR

c:\ffmpeg\ffmpeg -f dshow -channels 2 -i audio="Mikrofon (Realtek High Definiti" -af volume=%VOL%,afftfilt='real=if(lt(b+%N%,nb),real(b+%N%,ch),0)':'imag=if(lt(b+%N%,nb),imag(b+%N%,ch),0)' -f nut - | c:\ffmpeg\ffplay -

Michael
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to