We explore all kinds of technologies, starting from programming, electronics ending in the photography sector. A bit for everyone.

Tuesday, August 22, 2017

Reverse Engineering a Premiere Pro Plugin

This is a follow-up blog post for the Premiere Pro plugin development.


These days I have been studying the documentation and I have been looking into the example codes. First started looking into the FisheyeUnwrap code and learned a few things about setting up the plugins (Description, Slider Controls, Function Arrangement), but the main code consisted of a complicated mathematics that I'm not interested in. What I was looking for was pixel color manipulation and this FisheyeUnwrap plugin had none to do with it. So, I left it aside.

In this stage, the documentation really helped. I found a table that explains all of the example plugins in the SDK (Page 40 in the Adobe AE SDK). Here, I uncovered that the "Skeleton" plugin in the Templates folder is the best startup plugin for pixel color manipulation.

The next thing I did is copied the Skeleton folder and rename it into my desired plugin name, but that wouldn't change the plugin name. As said in the documentation, you need to replace "Skeleton" to "YourPluginName" and "SKELETON" to "YOUR_PLUGIN_NAME" in every single file in the solution. Don't forget to change the file names too. The best thing to do that is to use either a text editor or the Visual Studio itself. Just go to Edit > Find and Replace > Replace in Files.

The best thing to do now, is try to build it and test the basic in-build functionality of the "Skeleton" plugin in Premiere. The plugin should be called by your plugin name and after the build, the Premiere should recognise it without problems.

The next thing is to finally take a look into the code. The coding style is very annoying for me and one thing that I did on same of the functions is this:


"MySimpleGainFunc16" and "MySimpleGainFunc8" are the main pixel color manipulation functions. In other examples, they are named as "FilterFunc". The 16 and the 8 represent the amount of color information in bits. If you take a look in the Effects folder of the SDK, there is a SDK_Noise plugin. In the SDK_Noise plugin, there are more of these functions - 32bit one, than there is a YUV rendering function and some other non-interesting function (at least, for me)...

I will leave you here, wondering around the functions... Try to find how the inputs affect the color manipulation and try to modify something around. Be careful though... I have still no idea what would happen is there is an error :)

I succeeded in modifying the plugin and got a pretty close result to what I was expecting. It is not difficult at all, just it takes a little bit of time.

Probably I'll do some YouTube series, going through a simple plugin development... Because writing it here, step by step, is pretty exhausting... But still, I'll write here about some the plugins, but more in a short form...

Share:

0 comments:

Post a Comment

Contributors

Powered by Blogger.