Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use multi colors in drawtext FFmpeg

How can i use multi colors in drawtext ffmpeg. for example text='NATIONAL PARK' , now i want 'NATIONAL' in blue and 'PARK' in red.

How can i do that in FFmpeg.

like image 872
RSMEENA Avatar asked Oct 19 '25 20:10

RSMEENA


1 Answers

try this :


ffmpeg -hide_banner -i inp.jpg \
    -vf "drawtext=text='BLUE':fontcolor=blue:fontsize=20:x=10:y=10:,  drawtext=text='RED':fontcolor=red:fontsize=20:x=10+60+10:y=10:" \
    -y out.jpg

;-)

like image 103
user12656282 Avatar answered Oct 22 '25 15:10

user12656282



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!