ffmpeg drawtext support for Hindi fonts

丶灬走出姿态 提交于 2019-12-11 18:51:39

问题


We are trying to use ffmpeg drawtext to support hindi fonts. But the ordering of the data is not correct. The unicode for Hindi text is passed like this

1. पिता माता िस्रफ

But output renders as

Output of code

Have used the following code for generating the output

ffmpeg  -framerate 30 -t 10 -i /opt/test.png drawtext=text_shaping=1:fontcolor=white:fontsize=60:fontfile=/usr/share/xx.ttf:text='1. पिता माता िस्रफ':y='max(550,700-t*200)':x=40,format=yuv420p[v] /usr/share/nginx/html/hello_v.mp4

Had done harfbuzz support and --libfribidi is also enabled.

The problem is the text gets drawn from left to right. Also found there is a use_kerning flag in drawtext, will that help, if yes how to use it.


回答1:


Convert unicode to krutidev and then render using krutidev font. Check my answer here



来源:https://stackoverflow.com/questions/48298061/ffmpeg-drawtext-support-for-hindi-fonts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!