[FFmpeg-user] Multiply audio samples

Michael Koch astroelectronic at t-online.de
Mon Sep 17 00:00:20 EEST 2018

Am 16.09.2018 um 22:25 schrieb Paul B Mahol:
> On 9/16/18, Michael Koch <astroelectronic at t-online.de> wrote:
>>> Filter inputs will be auto-converted from any non-float formats to
>>> float or double one. Float/double formats are in [-1 .. +1] interval.
>> Thank you very much for the amultiply filter, it works great!
>> Here is an example for an ultrasonic converter which downconverts the
>> 15kHz - 25kHz band to the 0 - 10kHz band.
>> First make an input file for testing. This is a 2 second 19kHz tone
>> followed by 2 seconds silence:
>> c://ffmpeg/ffmpeg -f lavfi -i
>> "sine=frequency=19000:sample_rate=48000:duration=2" -af apad -t 4
>> ultrasonic.wav
>> Then use the downconverter:
>> c://ffmpeg/ffmpeg -i ultrasonic.wav -f lavfi -i
>> "sine=frequency=15000:sample_rate=48000" -filter_complex
>> "[0]highpass=f=15000,highpass=f=15000,highpass=f=15000,highpass=f=15000[sound];[1]volume=8[sine];[sound][sine]amultiply[mixed];[mixed]lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000"
>> out.wav
> Nice, it might be better to use aevalsrc, because it have multichannel output.

you are right, in my example the 15kHz sine source was only mono, and so 
the conversion did only work for one channel. I did change




and now it works for both channels.


More information about the ffmpeg-user mailing list