Search code examples
pangomlt

Adding text to videos using 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.

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?


Solution

  • 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.