Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ok, so using the overlay filter, one can change the x/y location of a video over time by using the "t" variable. For example, overlay=x='if(gte(t,2), -w+(t-2)*20, NAN)':y=0 can be used to start sliding an overlayed element from the top left to top right, after 2 seconds has passed.

What I want to do is to use a similar principle for scaling elements. I would like to be able to change the scale of a video over time by using an expression (like, scale=w=iw*t, or something along that line).

Is this possible?

when I run that expression through -filter_complex, I get

Error when evaluating the expression 'iw*t'.

Maybe the expression for out_w:'iw*t' or for out_h:'-1' is self-referencing.

I'm feeling like there's a fair chance I'm going to need to patch FFMpeg if I want to get this functionality, but I thought I would ask first, to see if anyone would be in the know about this kind of thing!

Does anyone know how such a task might be accomplished?

Thanks for the help!

share|improve this question
Sounds more like a syntax error right now but I haven't used that feature before so unfortunately I can't really help here. – Professor Sparkles Jul 10 '14 at 19:51
As far as I can tell, my syntax remains clean and functional until I introduce the "t" variable. Beyond that, it just seems to get mad at me and throw errors, no matter what I try :P – theophilus777 Jul 11 '14 at 21:52
So everything works until you add *t ? – Professor Sparkles Jul 12 '14 at 10:57
*t, +t, anything having to do with "t". In any other time-adaptable features in libavfilter, you make it dynamic like that by adding a "t" to the expression. With this, introducing the "t" just causes errors, all the time. So, I'm wondering if there's a back door I'm missing, or if the feature just doesn't exist :P – theophilus777 Jul 12 '14 at 16:53
t is not a defined thing when it comes to overlay filter. – Volodya Jul 17 '14 at 16:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.