使用MLT Framework向视频添加文本 [英] Adding text to videos using MLT Framework

查看:386
本文介绍了使用MLT Framework向视频添加文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MLT Framework渲染视频,但无法使用代码中包含的演示成功添加文本.

I am rendering a video using MLT Framework and am not able to successfully add text using the demos that are included in the code.

执行mlt_my_name_is演示时,出现以下错误:

When I execute the mlt_my_name_is demo, I receive the following errors:

./mlt_my_name_is 
Failed to load "+My name is Inigo Montoya.txt"
Failed to load "+Prepare to die!.txt"
Failed to load "+You killed my father.txt"
Failed to load "+My name is Inigo Montoya.txt"
Failed to load "+Prepare to die!.txt"
Failed to load "+You killed my father.txt"
+-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
|1=-10| |2= -5| |3= -2| |4= -1| |5=  0| |6=  1| |7=  2| |8=  5| |9= 10|
+-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
+---------------------------------------------------------------------+
|               H = back 1 minute,  L = forward 1 minute              |
|                 h = previous frame,  l = next frame                 |
|           g = start of clip, j = next clip, k = previous clip       |
|                0 = restart, q = quit, space = play                  |
+---------------------------------------------------------------------+
Current Position:         49

特别是,文档指出,当对.txt文件的引用以+开头时,应直接解释文本,但看来该工具正在尝试加载不存在的文件.

In particular, the documentation states that when a reference to a .txt file starts with + the text should be interpreted directly, but it appears the tool is trying to load a non-existant file instead.

其次,我找不到有关文本放置和格式设置的扩展文档. ProducerPango 的文档引用了

Secondly, I am unable to find extended documentation about placement and formatting of text. The documentation for ProducerPango references a document at https://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html, but this URL returns a 404. Can anyone point me to updated documentation for the Pango producer or to a different producer that serves the same purpose?

推荐答案

除了Dan的注释,我建议对文本使用"dynamictext"过滤器,而不要对"watermark"过滤器使用. dynamictext具有相同的功能,但是不需要在文本上加上"+"前缀和".txt"后缀.使用dynamictext时,仍然需要pango和qtext.

In addition to Dan's comments, I recommend using the "dynamictext" filter for text rather than the "watermark" filter. dynamictext has the same features, but does not require the "+" prefix and ".txt" suffix on the text. pango and qtext are still required when using dynamictext.

这篇关于使用MLT Framework向视频添加文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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