Here's a minimal MLT file that writes some text to the video output:
<?xml version="1.0"?>
<mlt>
<profile width="320" height="240"/>
<multitrack>
<playlist>
<producer in="0" out="0">
<property name="mlt_service">color</property>
</producer>
</playlist>
</multitrack>
<filter in="0" out="0">
<property name="mlt_service">dynamictext</property>
<property name="argument">Hello world!</property>
<property name="fgcolour">white</property>
</filter>
</mlt>
It creates just a single frame, but if I save the above as "text.mlt", I can check the output by extracting the frame with ffmpeg, and opening that with my image viewer (I'm using eog, so replace that with your own viewer if you run this code):
melt text.mlt -consumer avformat:text.mp4 acodec=aac vcodec=libx264 &&
ffmpeg -y -loglevel quiet -i text.mp4 -vframes 1 text.png &&
eog text.png
Here's the result:
In the documented list of MLT filter plugins, two other text-rendering filters are listed: "text" and "qtext", but if I replace "dynamictext" with either "text" or "qtext" in the mlt file above, no text appears. Is this a bug or expected behavior? If it's expected behavior, could someone please explain what's happening?
I'm on Ubuntu 18.04.4 LTS, using melt 6.6.0, downloaded from the official Ubuntu package repository. Here's my uname -a
output:
Linux laptop 4.15.0-99-lowlatency #100-Ubuntu SMP PREEMPT Wed Apr 22 21:10:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Thanks!