0

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.

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

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.

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?

seawolf
  • 2,147
  • 3
  • 20
  • 37

2 Answers2

1

You do not have working gtk2 or qt modules. More than likely this is because you compiled it yourself and did not install the corresponding -dev or -devel packages. See this page on the web site about (somewhat dated) dependencies for running the build scripts. You can also install Shotcut and use the melt that comes with it by running Shotcut.app/melt (NOT bin/melt).

MLT can use either the pango or qtext producer to respond to a +....txt input. FFmpeg-based avformat producer is attempted for all inputs as a last resort. When no producer accepts the input, melt just reports the message you saw. It indeed failed to load the input you specified; it does not need to clarify whether it thinks your input is a file name, URL, or markup.

The pango markup format document can be easily located using any web search engine. However, it does not let you adjust the size and position; the producer simply produces text. You need to use other MLT filters such as watermark or affine to control size and position. The size attribute of the text simply controls the size of the textual image created before being placed into a compositing/transformation rectangle.

Dan Dennedy
  • 446
  • 4
  • 6
  • I am on OSX and installed it with Homebrew... I will look into how to install the necessary dependencies there and mark this answer after I see what happens. Thanks! – seawolf Oct 10 '15 at 18:26
  • So does the Pango producer generate an image? I am using watermarks for other elements in the video anyway, so once I understand what Pango is producing I'll be able to make that work. – seawolf Oct 10 '15 at 18:27
  • I maintain the MacPorts port for mlt; I do not know about Homebrew. Maybe it depends on what you have installed prior to installing mlt.Yes, the pango producer produces an image in memory, but it does not place the image at a specific size and position on a canvas. It is much like creating an image of text yourself using a tool where there is no padding around the text. Now, you can view that in MLT full size, but if you want to overlay and position it, you must add filters or transitions. – Dan Dennedy Oct 11 '15 at 19:05
  • Can you send an example command-line or EDL that shows using the combination of Pango and Dynamic Text? Since I don't know how to construct a working example, I don't know if I have the right parts installed. – seawolf Oct 12 '15 at 17:15
1

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.

Brian
  • 1,200
  • 6
  • 8
  • Switching to DynamicText fixed the problem, though I'm not quite sure why watermark wasn't working as expected. – seawolf Nov 18 '15 at 00:58