ffmpeg: drawtest cannot find font for the family Sans

0

I have an avi video and I want to display frame number in the video.

Frame rate = 40fps

I'm using this script:

ffmpeg -i maxSSIM_realTime_C_L_560x448.avi -vf "drawtext=fontfile=Arial.ttf: text=%{n}: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000099"   -qscale 0 -y maxSSIM_real_time.avi

But I get [Parsed_drawtext_0 @ 0000000000732d00] Cannot find a valid font for the family Sans.

Where can I find fonts in windows 7?

video
fonts
ffmpeg
asked on Stack Overflow Nov 6, 2017 by zinon

2 Answers

2

Provide the full path to the font file: fontfile='C\:\\Windows\\fonts\\Arial.ttf'

answered on Stack Overflow Nov 6, 2017 by Gyan • edited Nov 6, 2017 by Jolta
0

The fonts on android device are stored at "/system/fonts/Roboto-Regular.ttf". So the command looks like this. This is working for me on android device.

val subtitlecommand = arrayOf( "-y", "-i", videoPath, "-vf", "drawtext=fontfile=/system/fonts/Roboto-Regular.ttf:text='Super User':x=(w-text_w)/2:y=(h-text_h)/2:fontsize=24:fontcolor=white", "-c:a", "copy", appDir )

answered on Stack Overflow Jan 19, 2021 by VIVEK CHOUDHARY

User contributions licensed under CC BY-SA 3.0