ffmpeg drawtext对印地语字体的支持 [英] ffmpeg drawtext support for Hindi fonts

查看:318
本文介绍了ffmpeg drawtext对印地语字体的支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试使用ffmpeg drawtext支持印地文字体.但是数据的顺序不正确. 印地语文本的unicode这样传递

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. पिता माता िस्रफ

但是输出呈现为

代码输出

使用以下代码生成输出

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

完成harfbuzz support--libfribidi也已启用.

问题是文本是从左到右绘制的.还发现在drawtext中有一个use_kerning标志,如果有的话,如何使用它会有所帮助.

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.

推荐答案

将unicode转换为krutidev,然后使用krutidev字体进行渲染.在此处

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

这篇关于ffmpeg drawtext对印地语字体的支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆