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

ffmpeg at osk.ch ffmpeg at osk.ch
Thu May 14 19:06:57 EEST 2020


On Thu, May 14, 2020 at 08:38:14AM +0200, Michael Koch wrote:
> 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
> 
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> 

Thanks Michael!

Regards,
Chris


More information about the ffmpeg-user mailing list