I am batch generating 100s of videos and wonder if there’s a way to control shotcut from the command line or python script / API etc?
Ideally i want to do simple cuts and cross fades between two videos, basic effects.
I’ve been using ffmpeg but it’s quite limited in what can be done.
It would be possible but you’d have to specify more details of exactly what you want. “Hacking” the .mlt files might not well supported at the moment and you might get ignored.
Whilst the .mlt format is technically xml, it isn’t that easy to work with at the moment although it is possible to do some rudimentary tasks with the python library bs4 if you know what you are doing.
What are you thinking you want to do? drop all the videos in a directory then add them together using a predefined transition ?
while Slideshow Generator sounds promising, that looks like some kind of GUI?
I’m looking for an automated way to do all this from scripts on a server. eg a user uploads some photos and we send them back a cool animation/video with no human editing. Quite comfortable with various programmatic ways to do things, but looking for a tool I can invoke with params that will handle rendering such animations.
Shotcut uses the MLT Framework under the hood. MLT includes a command line player called Melt. Shotcut actually uses Melt to export files. If you right click on an export job, you can see the MLT command line.
Melt works in two ways. You can either pass it an MLT file, or you can give it various command line options to implement tracks, splits, filters, etc.
If you want to do some scripting, I would recommend to write a script that authors MLT XML files and then pass those files to Melt to render them.
Not sure how to accomplish something you want in XML? Make a simple project in Shotcut and then inspect the XML to learn how it works.
MLT has SWIG bindings for Python and many other languages. There is very little documentation and no support. So it would be a self-taught learning process. In some cases, you have to inspect the underlying C code to understand how the API works.