[FFmpeg-user] Drawtext multicolor

Gianluca F. ferrantelli at gmail.com
Thu Apr 5 11:39:35 EEST 2018

Hi all,

I know that probably, there is no solution to my problem, but the answers
on dedicated forums are old and , who knows,  it may happens that something
has changed during the time!

I need to draw multiple vertical and horizontal lines , and I'd like to use
different colors for some words in lines.

Actually, each row is a single drawtext filter, and to align all texts
vertically, I have had to extract the "th" of each row, to properly set the
vertical position; a semi-nightmare.

To draw words with different colors, on each line, I should draw multiple
drawtexts horizontally, but the vertical alignment of drawtexts of each
line, probably will be a FULL nightmare, because obviusly, each texts will
have different heights! And cause each line has a boxborder, also 1 pixel
of difference will be evident. Also, there is the problem of horizontal
alignment ...

A very ( apparently ) simple task made ( almost ) impossible, but I see so
many text on Internet video, with different words color, that I wander how
do they do that.

I know that there is fontcolor_exp, but I know that it does not accept
something like "chart position", only the "t" time.

Is there a solution to draw a text with multicolor using a single drawtext?

Thanks in Advance

More information about the ffmpeg-user mailing list