I am trying to create a simple overlay graphic where the overlay moves and screen and changes speed according to time. So I tried a simple
ffmpeg -i input.mp4 -vcodec qtrle -i overlay.mov -filter_complex '[0:0][1:0]overlay=x=if(t<2\,t*3\,t*5)[out]' -map '[out]' -y output.mp4
and got an error code of :
[Parsed_overlay_0 @ 0000003f4e1e2ea0] [Eval @ 0000003f4c0fe5b0] Missing ')' or too many args in 'if(t<2,t*3,t*5)'
[Parsed_overlay_0 @ 0000003f4e1e2ea0] Error when evaluating the expression 'if(t<2,t*3,t*5)' for x
[Parsed_overlay_0 @ 0000003f4e1e2ea0] Failed to configure input pad on Parsed_overlay_0
Error configuring complex filters.
if I remove the "if" part and just leave a formula it works :
I tried playing with escaping of the different characters but it doesn't look like its a parsing error. Any ideas of how to use this correctly? The ffmpeg documentation has a sample for doing font color expression with a logical value here , but any attempt at
doesn't really work as well
Thanks in advance