[FFmpeg-user] drawtext with dynamic fontcolor

chandra sheker kchandu5200 at gmail.com
Thu Sep 24 19:16:49 CEST 2015


Hi Michael,

you can use this command.

ffmpeg -i temp.mp4
-filter_complex "[0:v]drawtext=fontfile=arial.ttf: text='TEST':
fontcolor=#000000 at 0.40: fontsize=200"
-codec:v mpeg4 out.mp4
​The transparency 40% (fontcolor=#000000 at 0.40)​

​Chandu​


*Thanks,*

*Chandra sheker.k,*

On Thu, Sep 24, 2015 at 10:19 PM, Michael Koch <astroelectronic at t-online.de>
wrote:

> Hello all,
>
> I'm new to this list and have a question about drawtext with dynamic
> fontcolor.
>
> The first example doesn't contain dynamic fontcolor and is working as
> expected.
> It superimposes some text over the video with black color and 25%
> transparency:
>
> ffmpeg -i temp.mp4 ^
> -vf drawtext='fontfile=arial.ttf:text="TEST":fontcolor_expr=0x000000 at 0x40:fontsize=200'
> ^
> -codec:v mpeg4 out.mp4
>
> Now I replace
>   fontcolor_expr=0x000000 at 0x40
> by
>   fontcolor_expr=0x000000 at 0x%%{e:40}
>
> Please note that the "%" character is escaped because I'm starting ffmpeg
> from a windows batch file.
> Of course the constant doesn't make much sense -- I will replace it later
> by a more complicated expression.
> But the constant 40 is a valid expression, isn't it?
> The problem is that obviously the syntax isn't accepted by ffmpeg. What's
> wrong with it?
> Can you please give me an example for dynamic fontcolor with correct
> syntax?
>
> Thanks,
> Michael
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list