I need to draw a box that grows in size horizontally over a video (scaling its width as time goes by)
Since drawbox does not support the 't' (as in time) variable, I'm at a loss here. I've seen some solutions using overlay, but they are fixed width and are rather used to move the box around.
What's the workaround here?
EDIT This is where I got trying to use drawbox and scale:
ffmpeg -y -i c81e728d9d4c2f636f067f89cc14862c.mp4\ -filter_complex "\ [0:v]drawbox=0:0:20:20,scale=eval=frame:w='if(gte(t*20,600),600,t*20)':h=20[vb]; [0:v][vb]overlay=x=80:y=350" a.mp4
With this I get an error of:
[Parsed_scale_1 @ 0x5596b5c61e40] Error when evaluating the expression 'if(gte(t*20,600),600,t*20)'. Maybe the expression for out_w:'if(gte(t*20,600),600,t*20)' or for out_h:'20' is self-referencing.
Now, if I set the width to a fixed value, it runs, but then there's the problem that the overlay contains the whole video itself as it is the input of the drawbox filter. I'm not sure how to draw the box and scale it separately from the source video.