[FFmpeg-user] toggle between two streams

Reino Wijnsma rwijnsma at xs4all.nl
Fri Sep 3 21:01:45 EEST 2021


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

> ffmpeg -f lavfi -i color=yellow -vf drawtext='text="1":fontcolor=red:fontsize=100:x=140:y=80' -frames 1 -y 1.png

No need to quote the "text"-parameter, but quoting the entire filter-chain instead I would consider good practice.

ffmpeg -f lavfi -i color=yellow -vf "drawtext=text='1':fontcolor=red:fontsize=100:x=140:y=80" -frames 1 -y 1.png

-- 
Reino



More information about the ffmpeg-user mailing list