2

Here is a new question on drawtext; actually, my drawtexts move from the left to right and from right to left, depending on the order ( 1,3,5... from left, 2,4,6 from right).

Each drawtext has a box; it would be nice to have each drawtext disappear with a fade out before other drawtext come in.

I see that there is the "fontcolor_exr", but I don't want to change the color of my text, I'd like to change the alpha, so I suppose I have to play with "alpha" props. Unfortunatly, I cannot figure out how to set an expression to add the alpha trasparency after x seconds to my drawtext. Any Idea?

I'm trying to use something like this:

alpha='if(gt(t,4),--- some expresson --- ,1)'"

so that after 4 seconds, the drawtext will disappear.

Thanks

SOLVED

I found this graceful solution; let the drawtext be enabled between 0 and 6 seconds; this command will fade out the text after 5 seconds:

alpha='if(lt(t,5)\,1\,if(lt(t\,6)\,(1-(t-5))/1\,0))'

The entire drawbox disappear at second 6. Hope it helps.

See you next time!

  • You have to use fontcolor_expr. See 2nd last example. – Gyan Feb 23 '18 at 14:05
  • I read that expression , fontcolor_expr=ff0000... but I really don't understand what does it do, and cause I don't understand it, I cannot apply it :( ... can you explain me quickly? tks! – GFCoder977 Feb 24 '18 at 5:56
  • and, sorry, are you sure that ALL drawtext ( with box and border ) will disappear? I read that it is used to change the confcolor dinamically, while I need to fade the entire drawtext ( text, box, etc ... ) .. – GFCoder977 Feb 24 '18 at 6:08
  • No, the box, shadow.. won't disappear. – Gyan Feb 24 '18 at 6:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.