I want to write an API for py plugins--Good or Bad Idea?

Post any suggestions for new features in Openshot here.

Moderators: Andy, Cenwen, beats

I want to write an API for py plugins--Good or Bad Idea?

Postby BesideTheVoid » Sun Nov 13, 2016 8:06 pm

I would like to help OpenShot to be able to write plugins (and I would like to write plugins) such as frame-painting plugins, and another category of plugins that generate or use motion estimation data (such as anti-shake or motion matching plugins--they could even both get the data from the same motion estimation plugin else show error on screen if motion estimation info is not available for the frame of the footage file)--and possibly other categories of plugins which would also use persistent data in some way. Both categories of plugins would be highly dependent on footage staying the same, so py (or however programmed) plugins may need to be required to have a get_context_list function that could return ["footage","clip","track","master"] (but that would return only ["media"] in this case). There definitely would need to be a warning but not necessarily block the person if they want to risk frame painting on a clip such as after a color adjustment effect. There would also need to be a get_content_list function that would return something like ["video"] or ["audio"] or ["image"] or ["video","image"]. The py file should be able to get and set info somehow such as:
Code: Select all
openshot.plugin_context.media.content_string #returning ["video"] or ["audio"] or ["image"]
openshot.plugin_context.media.path #returning full path of clip, such as to store motion estimation data to the same folder
#also store persistent data in memory (of arbitrary name and type):
if openshot.plugin_context.my_variable_1 is not None:
    openshot.plugin_context.my_variable_1 = QImage() #pretend I wrote something legit after the equal sign
#where plugin_context is the instance of the plugin as applied to a specific media object
#it may also need to get the frame number and rate or timecode (at least global time, but possibly also time relative to clip), such as for beat matching, or so it can have an option to reset a cumulative effect such as motion blur

Regarding uses of such an API not highly dependent on unchanging sources, but that might also require a python API or other API, named outputs and inputs (that can be piped together) would be great--such as a plugin that detects and outputs "bass" from audio track, then that (0 to 1) value can be used as an input for a brightness (or other) video plugin selectable from drop-down (possibly node interface if anyone wants to program that).

I recommend against writing a plugin API that requires binary plugins, since that is a big pain for developers (such as, if I go on another computer, I have to make sure my IDE is setup properly there and possibly deal with version issues related to Qt or other libraries). Also, I know that libopenshot is accessible from Python and that I would be able to write my own video editing program, but that is not really interesting to me. I'd rather stick with OpenShot since it already has a great interface). I don't currently know the coding of OpenShot in depth, nor future plans--so that's why I ask, is writing a Python API for OpenShot a good idea to accomplish these goals?
Last edited by BesideTheVoid on Sun Nov 20, 2016 6:10 am, edited 3 times in total.
BesideTheVoid
New member
 
Posts: 4
Joined: Tue Sep 20, 2016 7:21 pm

Re: I want to write an API for py plugins--Good or Bad Idea?

Postby XXLRay » Thu Nov 17, 2016 8:13 pm

You may easier reach somebody from the team at https://github.com/OpenShot/openshot-qt/issues

Not that it may be favourable to use blender's motion tracking capabilities.
XXLRay
OpenShot Veteran
 
Posts: 1070
Joined: Fri Jul 06, 2012 4:10 pm

Re: I want to write an API for py plugins--Good or Bad Idea?

Postby BesideTheVoid » Sun Nov 20, 2016 6:04 am

BesideTheVoid
New member
 
Posts: 4
Joined: Tue Sep 20, 2016 7:21 pm


Return to Feature requests

Who is online

Users browsing this forum: No registered users