[FFmpeg-user] toggle between two streams

Michael Koch astroelectronic at t-online.de
Fri Sep 3 15:21:40 EEST 2021

I have two video streams and want to toggle between them in 1 second 
intervals. I did try this command:

ffmpeg -i in1.mp4 -i in2.mp4 -lavfi streamselect=map='mod(t,2)' -t 30 

This doesn't work because streamselect doesn't accept expressions.
Who has an idea for a workaround?


More information about the ffmpeg-user mailing list