Shotcut + GyroFlow

It was mentioned in their documentation that gyroflow is supported by Frei0r-1, spoke to Gyroflow and they mentioned it’s missing an additional UI plugin, I am not a coder but if anyone knows how I can do this, I would greatly appreciate as the update to 10 bit and gyroflow would make this a staple workflow for power users.

1 Like

Is this already implemented in kdenlive? I am very curious about how would this work, there’s a ton of settings/options in the full gyroflow app.

I very much like the idea of this working directly in shotcut.

1 Like

I see the idea was accepted, what’s the plan with this? Is the backend shipped in the beta and only needs the ui in qml?

From what I see on the github page the workflow is to do all the sync and maybe tweaks in the original Gyroflow app and save the project (this includes the gyro data), then load this file in the plugin + maybe expose the smoothness parameter so it should have quite a basic UI.

Accepted does not mean or guarantee anything. It simply qualifies it, mainly for myself for tracking and review. Our builds do not yet include the plugin. You have the right idea; the filter UI could also provide a way to launch Gyroflow with the project file and monitor the file for changes to reload. At the very least, one could make Shotcut QML files for the separately available plugin and attach them here or in a new topic in Resources.

Ok, I’ll try to make a qml and share it if/after I get it working.

Update: ok, the quick and dirty proof of concept with hardcoded strings seems to be working fine, I should have a working UI by tomorrow as there’s only 3 relevant parameters exposed via this plugin.

I don’t know how to open the original Gyroflow full app though, is this something the UI can do directly without extra backend code?

I made the UI but I have a big issue: if I trim 1 second from the start of the video in shotcut, the stabilization gets desynced by the 1 second amount. I had a look at kdenlive and splitting or trimming the clip there did not have the same problem so I assume there’s something I’m missing. Do you have any idea what could it be?

Another (very minor) issue is that updating the .gyroflow file (or even deleting it) doesn’t affect the filter at all (I suspect it’s caching everything on the backend). Adding the filter again reloads the file properly of course. Is there a quick way from QML to force destroy and recreate the filter?

image

gyroflow_v0.zip (2.3 KB)

1 Like

This is not unexpected. Video stabilization suffers from the same: once you change the in point, Shotcut invalidates the stabilization filter. There is specialize code to re-run incomplete stabilization jobs on export. That will not be possible with GyroFlow. Basically, the user will need to handle this somehow.

kdenlive and splitting or trimming the clip there did not have the same problem

I guess Kdenlive is structuring the MLT objects in a different way that is immune to this. We cannot just simply switch over to a different approach. It would be a huge impact.

updating the .gyroflow file (or even deleting it) doesn’t affect the filter at all

It needs to set a property such as refresh that the frei0r plugin reads when a frame is redrawn (happens automatically whenever a property is changed). This property needs to be added to the gyroflow frei0r plugin if it does not yet exist.

Is there a quick way from QML to force destroy and recreate the filter?

It should not need to recreate the filter per my advice above. See src/qml/filters/mask_glaxnimate/ui.qml for an example of a filter listener in the Shotcut.File component. onUrlChanged calls watch() and then whenever the file changes onFileChanged triggers, which sets the refresh property to signal the backend filter. The property prefix filter.producer. is specific to mask-based filters and not needed for this. This file change listener is only active as long as this filter UI is active.

This is quite a big issue as it invalidates 90% of the purpose of using the plugin directly in Shotcut instead of exporting an intermediate in Gyroflow directly. I’ll reach out to the frei0r gyroflow dev for some ideas.