I’m thinking of basic stuff like a special filter that can be added either the timeline (Output) or a single track (thus affecting that track instead of entire timeline) and has a limited set of options to choose from and a big “APPLY” button that runs this script with a progress-bar so the user doesn’t interact with the UI while it’s working.
Something like:
FOR
[every clip in track] or [all clips between start_time and end_time] CONDITION
[clip property is X] or [filter X is present] or [filter x has value y] DO
[add new filter with preset] or [change something in properties] or [change something in filter (if present)].
Practical examples that I find myself manually doing every now and then:
apply Crop:source to all clips with 4x3 ratio in a 16x9 timeline
apply Fisheye with a certain Preset to all clips with 4x3 ratio (this makes them linear and 16x9 and loses very little useful areas)
apply 30x to all clips in a track
check the Pitch Compensation option for all sped up videos.
change the text size for all text:simple filters that use [Verdana, Bold, 20]
disable all text:simple filters (or more specific, filters that use [Verdana, Bold, 20])
(I know this one doesn’t fit the pattern but it’s a common request:) add a marker every X seconds
These are all things that I do every now and then and it’s just a lot of manual work that could be automated without being extremely complicated.
There’s obviously a lot of room to grow here and get really complex but a basic version (a subset of what I’ve mentioned) would be a great start and maybe the community would suggest other useful scenarios.
Hello Daniel, i have more or less the same practical need. For me, instead being able to make skripts, i’d rather be able to select multiple clips and change all of them at once. Like Properties/Speed or paste a filter to all of them. Your suggestion is more powerful than mine, but they result maybe in the same problem: How behave all those changed clips and how to deal with possible conficts (item-wise and/or on the timeline)
I agree there are possible side effects but I think if the actions are applied sequentially and the UI is fully blocked for the user then 99% of the bugs are avoided.
This could be also another condition for the FOR part of the “script” I proposed, instead of all timeline do the actions only on the selected clips.
I’ve updated the title to be clear that I don’t want an API that accepts actual scripting files, just an in-app method of applying a limited set of actions in a conditional way to multiple clips.
In fact, whenever I need to delete or paste filters in bulk, I rely on the keyboard as much as possible. I use Ctrl+Right to jump to the next clip on the track; the mouse pointer remains positioned within the filter section—either over the “Paste” icon or the “Minus” button, depending on the task—and requires just a single click. This is comparatively easy on a ThinkPad, thanks to its dedicated mouse buttons; with an external mouse, however, you have to click carefully to ensure the cursor stays put. Admittedly, this is merely a workaround—and yes, it clearly highlights just how much I wish I could modify multiple clips simultaneously. I follow a similar process for Properties / Length: I jump to the next clip using Ctrl+Right, click into the length field (keeping the mouse stationary), type in the correct value, hit Enter, and repeat.
Btw, this particular one has been implemented for a few versions now: select your clips then right click on one of them and Apply copied filters. It will paste the filter there OR if that filter already exists it will overwrite it with the copied one (I’m not sure if this is for all filters or just some).
I also use Ctrl+arrows when needing to change properties or filters in a batch.
There is already a scripting capability (see the installed share/shotcut/qml folder) that I plan to expand and document. Perhaps the easiest way to tinker now is to create a custom filter. All of the global singletons you see being used in various views are available. But there is no hot reloading when you change a script; you need to restart. The QML is primarily declarative UI plus JavaScript, but you can have a super small QML with a button that triggers JavaScript in a separate file.
Maybe there needs to be some additional functions written either in C++ or JavaScript utility file to make things easier as expressed by the original post. Probably the next thing to expose to scripting is all of the actions you see in Help > Actions and Shortcuts.
And probably there needs to be a way to put scripts into a folder within the app data directory with a UI to list them, select one, show its UI, edit internally or externally, reload, and run.