简体   繁体   中英

ffmpeg: drawtest cannot find font for the family Sans

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?

提供字体文件的完整路径: fontfile='C\\:\\\\Windows\\\\fonts\\\\Arial.ttf'

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 )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM