[FFmpeg-user] Generating Multichannel Sine Wave Audio

Marton Balint cus at passwd.hu
Mon Dec 12 23:01:19 EET 2016


On Mon, 12 Dec 2016, Matthias, Thomas wrote:

> I see that there is a sine wave filter when using ‘-f lavfi –i “sine=frequency=1000:duration=60”, which is great!  However, what is the easiest/best way to get this into a multichannel format, say 5.1 or even 16 channels?  Ideally it would be nice to specify multiple frequencies for each channel, but if I want say 16 channels of the exact same sinewave in each, how would I do this?  Is there a way to “copy” the first channel into the remaining 15?  Do I need to specify an input for each channel and then use –map correctly?
>
> I’ve tried a few different things, but no success so far.
>

Probably easier to do this with aevalsrc, you can find examples here:

https://www.ffmpeg.org/ffmpeg-all.html#Examples-59

And yout command line should look something like:

ffmpeg -f lavfi -i 
"aevalsrc=16c:d=60:sin(440*2*PI*t)|sin(440*2*PI*t)|sin(440*2*PI*t)|sin(440*2*PI*t)|sin(440*2*PI*t)|sin(440*2*PI*t)|sin(440*2*PI*t)|sin(440*2*PI*t)|sin(440*2*PI*t)|sin(440*2*PI*t)|sin(440*2*PI*t)|sin(440*2*PI*t)|sin(440*2*PI*t)|sin(440*2*PI*t)|sin(440*2*PI*t)|sin(440*2*PI*t)" 
out.wav

Regards,
Marton


More information about the ffmpeg-user mailing list