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

Sunday, August 20, 2017

Exploring Premiere Pro Plugin Development

Today I decided to check out the Adobe Premiere Pro CC Plugin Development. Here I will just lay out the things that I uncovered during my research and share few tips that you may not have knowed. First of all, every Premiere Pro plugin is programmed in C++ - a language that I'm familiar with. That was nice.

Than I uncovered this SDK (Software Development Kit): https://console.adobe.io/downloads/pr
which I need to look in more deeply.

I put that aside and here's a tip: If you want to learn to program things like plugins that have their own classes and function, the documentation would definitely help you, but you will learn them even faster by looking into examples on GitHub. So that's exactly what I did - I searched on GitHub and here are some nice examples:

https://github.com/apanteleev/FisheyeUnwarp
https://github.com/ThomasSzabo/Minimalistic-Adobe-Premiere-Pro-Panel

Exploring the FisheyeUnwrap, I can see that there is an already .aex file which represents the released and working version of the plugin and there is also just one .cpp file - that I'm pretty sure is the code. Which is awesome! I really like the .README file which apanteleev supplied. It is very nicely and concretely explained.

My concern now is whether or not I can get the SDK to compile my .cpp file and return a .aex file.
What apanteleev mentioned in his .README file is that he used an Adobe After Effects SDK and he provided the link. He said that his plugin should work with either the AE or PP which is kind of weird. I did some further research on this question and It turns out that you can make a CPU Plugin to work with both AE and PP, but if you want to implement a GPU processing, that will just work for the particular product.

I followed the steps that apanteleev wrote:

How to build

  1. Download the After Effects CC SDK for Windows here: http://www.adobe.com/devnet/aftereffects.html
  2. Unpack the SDK into some local folder
  3. Set the AE_PLUGIN_BUILD_DIR environment variable to point to the Adobe plug-ins folder (see above)
  4. Copy the files of this plug-in into Examples\Effect sub-folder of the SDK
  5. Open Win\FisheyeUnwarp.sln solution with Visual Studio 2015 (or downgrade it if necessary)
  6. Build the solution for x64-Release or x64-Debug
  7. Launch After Effects or Premiere Pro. You can launch them from Visual Studio with a debugger attached, for that go to Project properties / Debugging dialog and set Command to the AE / PP executable.

So what I did:
1. Downloaded the SDK
2. Unpacked it in Documents
3. Went to the Environment Variables and set on just like this:

4. Copied his plug-in folder into the Documents/SDK/Examplse/Effects sub-folder
5. Than I opened the Win/FisheyeUnwarp.sln solution with Visual Express 2012 (it should work with other versions too).
6. Now... I went to build the solution and it popped an error:
MSB8020... Ok... I went on stackoverflow and here is a solution that I found: You would need to right-click the project in your solution explorer, go to Properties and change the Platform Toolset to v110. After trying to build the solution again.... An error: MSB4030... Again I went to stackoverflow and here is what I found: Again the same thing - right-click the project in the solution explorer, than go to Properties, than in the Configuration Properties go to Linker, than Debugging and change the Generate Debug Info to true (not Debug).

And.... Success!!! The solution was built without any errors! As I went into the MediaCore folder I saw a .aex file already there. I than started the AE and... whala! There is a plugin now called FisheyeUnwrap! And not just that... The plugin works!

So.. What does this mean? This means that with changing the code in the .cpp file, we CAN create our own plugin for AE and PP! I'm very happy that I managed to build the plugin and that there were no serious errors of sorts. Just to mention that we didn't use the Premiere Pro SDK, but the After Effects CC 2017 SDK. Now the next step is REVERSE ENGINEERING the plugin and learning how the code works and how we can change it to our own needs. But I think for today It's enough, I'll do another follow-up blog post on reverse engineering the plugin. For now, you can follow me on YouTube: Mitko Nikov, Twitter: @mitkonikov. AND AS ALWAYS... EXPLORE DEEPER!


Share:

0 comments:

Post a Comment

Contributors

Powered by Blogger.