[FFmpeg-user] How can I use a certain font and fontsize when using drawtext with the parameter textfile?

LaHu lahu8 at yahoo.de
Sun May 29 06:09:25 CEST 2016


Hi,

The command looks like this:

ffmpeg.exe -i desk2.avi -vf 
drawtext=enable='between(t,0,5)':fontfile='C\:\\Windows\\Fonts\\arial.ttf':box=1:boxcolor=black:fontcolor=white:x=(w-tw)/2:y=h-th:textfile=sampletext.txt 
result.mp4

It works except that font and fontsize stay the same, no matter what 
parameters I enter.

When I use text instead of textfile then it works as expected.
How can I select another font and fontsize when overlaying text from a file?

Can I store text to a variable and refer then to that variable instead 
of using text="abc" or textfile=sampletext.txt?

Thanks for helping,
LaHu



More information about the ffmpeg-user mailing list