How can we specify style in drawtext filter. Example, draw 'Hello' in a regular font, but it should be bold, in italics and underlined. Is this possible?
Maybe this answer is late, but, from the FFMPEG documentation: http://ffmpeg.org/ffmpeg-all.html
Use fontconfig to set the font. Note that the colons need to be escaped.
drawtext='fontfile=Linux Libertine O-40\:style=Semibold:text=FFmpeg'
You have to configure the fontconfig file of course, set up your desired fonts (be careful to have all the styles that you need) in the fonts location and then run the drawtext with the font family name followed by ':style='.
Example:
-vf "drawtext='fontfile=DejaVuSans\:style=ExtraLight:text=FFmpeg'"
This worked for me in the console and as a php shell exec command. You can use whatever font style, as long as (for the style and font family that you chose), there's a font file in the font directory that follows this rule: FontFamilyName-StyleName . I really hope that this helps!