[FFmpeg-user] Multiply audio samples
Paul B Mahol
onemda at gmail.com
Wed Sep 12 11:12:19 EEST 2018
On 9/12/18, Michael Koch <astroelectronic at t-online.de> wrote:
> Am 12.09.2018 um 09:55 schrieb Paul B Mahol:
>> Hi,
>>
>> On 9/12/18, Michael Koch <astroelectronic at t-online.de> wrote:
>>> Is it possible to multiply audio samples from two sources?
>>> I'd like to downconvert the 15kHz to 25kHz range to the 0 to 10kHz
>>> range. First apply a strong 15kHz highpass filter, then multiply the
>>> signal with a 15kHz sine wave (which produces sum and difference
>>> signals), then apply a 10kHz lowpass filter.
>> There is no yet amultiply audio filter, but I could write it.
>>
>> Am I correct that for it you need two audio streams as input and one
>> audio stream as output?
>
> yes, two inputs and one output. I think it would be best if it works
> independant of bit depth. First normalize the input signals to -1...+1
> range, then multiply them so that the result is also in the -1...+1
> range, then normalize back to 16bit or 24bit range.
It will internally work with floating-point numbers only (32bits or 64bits).
Normalization is done with other filters.
Meanwhile you can use sox multiply effect.
Note that sox internally operates with 32bit integers.
More information about the ffmpeg-user
mailing list