找遍了办法,有的说字体文件,有的说用绝对路径,都试了,都没用,最后突发奇想是不是cmd的问题,换git bash。。。好了。
例子:
Cmd / powershell都不行:
C:\Code\Git\ffmpeg\ffmpeg -i title.mp4 -vf drawtext=fontcolor=red:fontsize=40:fontfile=simsunb.ttf:line_spacing=7:text='中文测试':x=50:y=50:alpha=0.9:enable='lte(t\,5)' -y titleOutput.mp4
GitBash:
/c/Code/Git/ffmpeg/ffmpeg -i title.mp4 -vf drawtext=fontcolor=red:fontsize=40:fontfile=simsunb.ttf:line_spacing=7:text='中文测试':x=50:y=50:alpha=0.9:enable='lte(t\,5)' -y titleOutput.mp4
坑爹啊!记录一下,兴许能帮到有缘人。