Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frei0r plugin for kdenlive #24

Closed
reneg49 opened this issue Apr 28, 2018 · 12 comments
Closed

frei0r plugin for kdenlive #24

reneg49 opened this issue Apr 28, 2018 · 12 comments

Comments

@reneg49
Copy link

reneg49 commented Apr 28, 2018

This may not be the right place to ask for help, but I can't get any response on the frei0r mailinglist...

I wrote a C++ frei0r plugin that uses 4 parameters (LEFT,TOP,RIGHT,BOTTOM) to delimit a cropping rectangle for further processing. I can modify and draw the outline of the rectangle over the input frame as I modify the sliders (defined in a proper .xml file).

I would like to add (for example...) a SIZE parameter that, when modified, would adjust the other parameters to reflect the change proportionnaly. This means that I have to be able to change values of parameters from inside the plugin and have the application (kdenlive) react to the changes and update the effect GUI accordingly.

Is this at all possible? None of the other frei0r plugins (C or C++) seem to need/use/enable this feature.

Anybody know how to do this? (the get_param_value/set_param_value functions seem to be of no use for this purpose).

@ddennedy
Copy link
Collaborator

I do not know anything about the mailing list. It is out of my control. I have not seen this question come up on it. In any case, Kdenlive uses MLT for its frei0r interface, and MLT only uses f0r_get_param_value() to read the default value for a parameter. From then on, it only sets value and does not try support what you are trying to do. In most cases, it is out of scope for an image processing plugin to define a region unless that is its sole purpose because there are other plugins that already do this (define masks via alpha channel), and you should combine effects instead of making some uberffect.

@reneg49
Copy link
Author

reneg49 commented Apr 28, 2018

I see that some "transitions" provide the kind of behavior i'm looking for, but they are implemented as "true" MLT plugins that interact with the main app... pity... thanks for the info!

@reneg49
Copy link
Author

reneg49 commented Apr 29, 2018 via email

@ddennedy
Copy link
Collaborator

I see. Good explanation. I am thinking about a modification I can make to facilitate this such that reading a MLT property can invoke the f0r_get_param_value() function. I think lack of that is a shortcoming in the MLT binding to frei0r. Be patient, however, as I am busy this week preparing a new release of Shotcut. I will attempt this after that.

@reneg49
Copy link
Author

reneg49 commented Apr 30, 2018 via email

@reneg49
Copy link
Author

reneg49 commented May 31, 2018 via email

@ddennedy
Copy link
Collaborator

I started working on this, but I am running into problems with various things including MLT properties animation/keyframes. I can make it work OK (not perfect) only if the MLT property is not using animation. The place where this hooks in does not have certain information such as time position, and it is not necessary to be requesting the image of a frame, which has this info, in order to read MLT properties.

I am not going to add support for this in MLT. You can make your effect a MLT service/plugin.
I am closing this since it is not a frei0r issue. If you make a corresponding MLT issue, then I will not volunteer to work on it. IOW, it will remain open until someone submits an approved pull request.

@reneg49
Copy link
Author

reneg49 commented May 31, 2018 via email

@reneg49
Copy link
Author

reneg49 commented Jul 19, 2018 via email

@ddennedy
Copy link
Collaborator

All MLT service properties are available to read by the application. There is no need to "send" or "return". It is up to the application to read them as-needed. The application might need to be modified to read them as-needed or periodically. There is also a way in MLT for an application to receive a signal when a property is changed. However, I would not be surprised if Kdenlive does not use that. I think this is a new use case, which is interesting. I do not work on Kdenlive but rather Shotcut. If you submit your new service as a pull request on the mlt.git then I will take a look at it further in the context of Shotcut. Then, we will have more information to relay to the Kdenlive team.

@reneg49
Copy link
Author

reneg49 commented Jul 19, 2018 via email

@reneg49
Copy link
Author

reneg49 commented Jul 19, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants