I’ve been exploring use of the project (.mlt) file to control behavior in Shotcut. I’ve had some limited success but I’m wondering if more is possible.
I’ve just been manipulating filenames so far but this has already saved me quite a bit of time. Example: I’ve been using a PNG file as background for text, same graphic but updating with different text via text filter when needed. I might pull this “template” graphic into the project a dozen times or so.
If I want to modify the graphic itself, rather than tediously go in to the GUI and manually lift and replace, I just search / replace the filenames in the .mlt file. Works great! Saves a lot of time.
But now I’m wondering – I’d like to use more of the text filter backgrounds throughout the project, using the “split track, apply filter” method shown in a tutorial here. Doing a lot of these will also be tedious – is there any way to modify the .mlt file directly to accomplish this? Obviously I’m working with copies of the files so no worries there. But I would need to:
a. Split the track, new in / out points
b. Apply the text filter (preset maybe, or apply positioning)
c. Enter modified text
This might be overly ambitious but if it could be done it would make inserting & modifying text throughout the file more practical, assuming the process itself could be streamlined, automated etc. to some extent.
If this isn’t possible or practical but there are other uses of the project file, I would certainly love to hear about them. I’m always looking for ways to get these machines of ours to do more of the grunt work.
Thanks!
Yes, absolutely this is possible. There are businesses with developers that hand author XML and generate it with code. However, it is not for the impatient or intolerant, and sorry but I do not have much time to hold your hand as you learn it. Just do some trial and error, and use the MLT site docs to learn more.
OK, thank you for the encouragement and suggestion. I will experiment and look for info out there on the web. I’ve begun looking around on www.mltframework.org, may install the multimedia framework when I get a chance.
I’ll post any progress I make from time to time; maybe others will want to experiment along these lines as well. I can see how it could really speed up certain kinds of projects.
Thanks again.
If all you need is to use it and not write custom programs, then Shotcut already includes the framework because it uses it. MLT is the engine of Shotcut. Every copy of Shotcut includes the melt command line tool (and its cousin “qmelt” that is sometimes needed) that can be used to author and process compositions. Shotcut runs that utility as a background child for nearly every job you see go into the Jobs panel. An original motivation to create Shotcut was to give people on all platforms a way to preview, prototype, and learn MLT XML.
I will check that out, thanks! At this point I’m kind of thrashing about, but ultimately I hope to be able to modify the xml file and control shotcut output as I posted originally. I’m thinking this might be a way to become familiar with the syntax, plus I’ll look over the “demo” files included with the source from github.
I have no idea whether I’d have any use for the separate installation, given my somewhat limited objectives. But I’ll start by exploring the command line tools as you suggest. Looking at those demo scripts I wonder if I can modify others, then convert to xml and use the xml to control Shotcut. I’ve just discovered the mlt-xml.txt file in the source, looks like it will point me farther along. Definitely an adventure!