R: Re: Registering frei0r plugin.

Massimo Stella maxstar at tin.it
Sun Aug 15 15:19:29 BST 2021


Dear André,
The frei0r effects have to be added to  /usr/lib/frei0r-1
The xml UI has to be written as described at the link you told me: https://invent.kde.org/multimedia/kdenlive/-/tree/master/data/effects
and it has to be added to /usr/share/kdenlive/effects/

For the rest, I read what you are needing, and I can tell you that something similar already exists.
It's the frei0r.bgsubtractor which is now blacklisted - to show it again you have to edit the  blacklisted_effects.txt in the "data" folder of the Kdenlive source code.
Actually, this effect works pretty well, and it could be used for achieving your goal.
The issue is that it takes the “reference” frame automatically, and it refreshes in several situations (eg. if you change preview resolution it reloads the frame by taking the one you are on when you do the operation, or if you move the clip to another track, or you trim, cut, etc). It could be fixed if we can set the “reference” by using a frame in the clip through an absolute position .
I've reported this issue here https://invent.kde.org/multimedia/kdenlive/-/issues/350 but nobody has tried to fix it yet so far.
Maybe you can go forward with your effect and/or try to edit the frei0r.bgsubtractor too and make it finally work. This second option could be really great news.

Cheers.
Massimo.

----Messaggio originale----
Da: andre.em.caldas at gmail.com
Data: 15-ago-2021 13.58
A: "Massimo Stella"<maxstar at tin.it>
Cc: "kdenlive"<kdenlive at kde.org>
Ogg: Re: Registering frei0r plugin.

Dear Massimo,

First of all... by the way... if anyone wants to contribute, I would
be glad. I would probably publish it as GPL.


> can you explain in details what this mixer2 is supposed to do?

It compares track A and track B. Copies track B to output D and sets
D[alpha] to transparent whenever A and B are "equal".

I am a professor of mathematics. I have recorded some classes I edited
with Kdenlive. I know nothing about video editing. :-)
For example:
https://www.youtube.com/playlist?list=PLMG2ETzS-iy80kspoqaE2bgLWvZFf9i3u

I am recording a new set of lectures for a different subject. Now,
that I am a little savier, I want to be able to erase my background. I
have asked a question here
https://video.stackexchange.com/questions/34264/kind-of-chroma-key-using-a-key-frame
on how to do that, but I got like 7 views in a few days. So, I decided
to write a plugin. :-(

I realized it would be easy to implement a simple version of that but
that would not work very well due to already known issues with "chroma
keying". I got it working roughly some 8 hours ago. Shadows are the
biggest problem right now. But maybe I can fix it with better
illumination. It is not really usable, but much better than I
expected. I used "melt" to test it. I can share the resulting video if
you want.

Not a Kdenlive issue... but now I realize it would be better to write
an MLT plugin, so I could use a better color scheme, and also chain
some other processing. I can publish my code, if you want. The method
to determine if two pixels are the same needs to be improved. I have
thought of a dozen things that could be done, but I think it would
have to be an MLT plugin to do more advanced processing. I will also
need to "erase" the ink on the whiteboard.

Also, a different version of the plugin could be an "MLT filter"
instead of a "mixer2". It could compare to a specific keyframe,
instead of comparing to a track. But I would probably not be able to
do it with frei0r, and I am not really confident there is a GUI for
the "keyframe" value. So, by now, it is a "mixer2". I would be a nice
approach, and the image to be compared with could "evolve/adapt" for
the next keyframes.


> BTW: to add a frei0r plugin to Kdenlive, you have to add it to the
> frei0r plugin folder and create an xml ui file for it.

I have read a lot since I made this question. Following an advice I
got on MLT mailing list, I have added it to
~/.frei0r-1/lib/

I guess I need to provide an XML as described here:
https://invent.kde.org/multimedia/kdenlive/-/tree/master/data/effects

And I should probably put it in here:
~/.local/share/kdenlive/effects/


Cheers,
André Caldas.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdenlive/attachments/20210815/66598b70/attachment.htm>


More information about the kdenlive mailing list