Running melt from the command line in windows batch file

Windows 10, Kdenlive 24.08.1 (fresh install)
I’ve been trying to use the generate script feature to allow me to run some rendering jobs overnight and I’m hitting one major issue, when the current render finishes it seems to pause waiting for keyboard input before exiting the process (to allow the script to run the next command).

I’ve made two example projects that are just a title clip with text and then a noise motion filter to make stuff appear in the video randomly. I’ve made them 5 minutes in duration each.

From each project I’ve gone Project > Render and then click the Generate script button, for which I confirm the name and then click OK.

I create a batch file with the following commands:

"C:\Program Files\kdenlive\bin\melt.exe" "C:\Users\username\Videos\kdenlive-renderqueue\test1-1.mlt"
"C:\Program Files\kdenlive\bin\melt.exe" "C:\Users\username\Videos\kdenlive-renderqueue\test2-1.mlt"

I then open a command prompt and execute the batch file.

This first screenshot shows the command is running and you can see the CPU is active (please ignore I’ve selected the GPU in Task Manager).

One thing to note here is that the "Current Position initially refreshes constantly and then at some point stops. However the job is running ok as the CPU usage continues to be constant. When I press enter on the keyboard it does update the position number as per the next screenshot.

After a few minutes the screen updates with a warning message about timestamps, I believe these can be ignored. You can see that the CPU has now dropped down and indeed the video exists and when I watch it everything is OK.

This is where it seems to hang here until I press enter and then the batch file executes the next command and so it goes on.

I will note here that “Current position” does not appear but CPU usage indicates rendering is happening. Next screenshot shows the updated number after pressing enter.

Are there some flags for melt that prevent it from waiting at the end for input?

Also is there a flag for melt that allows constant screen updates with the current position?

Thanks

I think this is a discussion better suited for an MLT forum. See the MLT Documentation

No problems, I’ll investigate there. When I get an answer I’ll post it here for reference when future me goes looking :grin:

Turned out to be an easily solution after reading the command line documentation. The -progress option (obviously) displayed the progress and it also didn’t pause at the end of execution.

1 Like