[FFmpeg-devel] [PATCH v2] drawtext: add fontcolor_expr
Stefano Sabatini
stefasab at gmail.com
Fri Jul 4 13:14:28 CEST 2014
On date Thursday 2014-07-03 21:37:07 +0300, Andrey Utkin encoded:
> 2014-07-03 20:59 GMT+03:00 Stefano Sabatini <stefasab at gmail.com>:
> > On date Thursday 2014-07-03 16:36:12 +0300, Andrey Utkin encoded:
> >> + at item fontcolor_expr
> >> +String which is expanded the same way as @var{text} to obtain dynamic
> >> + at var{fontcolor} value. By default this option has empty value and is not
> >> +processed.
> >
> > It's not very clear the interaction with fontcolor.
>
> When fontcolor_expr is set, it overrides fontcolor option.
> I can add this phrase into doc.
>
> > Alternatively, what about something like fontcolor_r/g/b/a_expr with
> > RGBA values expressed as floats in the 0-1 range?
> >
> > This should be easier on the user and probably more robust.
>
> I'm not absolutely convinced about that, although if i haven't already
> done that, maybe i could agree and do it this way.
> Currently fontcolor_expr evaluates to the same value that "fontcolor"
> gets, and adding per-component options would actually add complexity.
> Also if later we add same functions for box, border and shadow, that
> will be a big number of these options.
> Also the way it is implemented now, fontcolor_expr can evaluate not
> only to something like "ff0000ff", but also to something like
> "red at 1.0", which fontcolor also percepts. With this second form, you
> just want to use expr() and not eif() for dynamic opacity.
I agree on this point. I wonder if we could extend the format to
support something like: @R1.0 at G0.1@B0.5 at A0.9 or even COLOR at B0.0.
--
FFmpeg = Fiendish and Funny Mega Philosofic Easy Geek
More information about the ffmpeg-devel
mailing list