[FFmpeg-user] Q: How to generate sound file with different frequencies for left/right (alternating)

Michael Koch astroelectronic at t-online.de
Thu May 14 09:38:14 EEST 2020


Am 13.05.2020 um 22:06 schrieb ffmpeg at osk.ch:
> Hello
>
> I would like to generate a sound file with two frequencies, sinus, one per channel
> (left, right) alternating between them. For example: left 0.5 sec 5kHz, then right 0.5 sec 8kHz and so on.
> I've spent hours reading ffmpeg docs but am overwhelmed by its power and complexity.

ffmpeg -f lavfi -i sine=5000 -f lavfi -i sine=8000 -filter_complex 
"[0]volume='lt(mod(t,1.0),0.5)':eval=frame[a];[1]volume='gte(mod(t,1.0),0.5)':eval=frame[b];[a][b]join=inputs=2:channel_layout=stereo" 
-t 10 -y out.wav

Michael



More information about the ffmpeg-user mailing list