[FFmpeg-user] toggle between two streams

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


Am 03.09.2021 um 20:01 schrieb Reino Wijnsma:
> On 2021-09-03T16:25:50+0200, Michael Koch <astroelectronic at t-online.de> wrote:
>> But if I write all in the FFmpeg command line, then it doesn't work:
>>
>> ffmpeg -loop 1 -i 1.png -loop 1 -i 2.png -lavfi sendcmd=c="0 [expr] streamselect map 'gte(mod(T,2),1)'",streamselect=map=0 -t 10 -y out.mp4
>>
>> Unable to parse graph description...
> ffmpeg -loop 1 -i 1.png -loop 1 -i 2.png -lavfi "sendcmd=c='0 [expr] streamselect map '\''gte(mod(T\,2)\,1)'\''',streamselect=map=0" -t 10 -y out.mp4

Thank you, this command line is working fine. But it's difficult to 
understand. A simple task (toggle between two streams) should have a 
simple solution.

Michael



More information about the ffmpeg-user mailing list