• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
2

SCRIPTING for Premiere Pro

Engaged ,
Oct 04, 2016 Oct 04, 2016

Copy link to clipboard

Copied

So there are plenty of tutorials for scripting in Adobe After Effects and lots of documentation.  But, as I understand, this isn't the situation for Adobe Premiere Pro.  I presume scripting is possible considering:

69447b12e961459f9058620ab6164927.png

But I have absolutely no idea how to get started.

The end goal is to create a script that will look throughout all of my imported project files (for the current open Premiere Pro project) and then use the "replace footage" command to swap every file that meets a certain file name criteria with other files in a specified directory that meet the same criteria.  So, for example, if I have:

DSTCNarration(1.1).flac

DSTCNarration(1.2).flac

DSTCBattle(BLURRED).mxf

SlowYellowMotion(BACK).mxf

DSTC(PREV).psd

imported into my project, then, when the script is run, it should prompt the user for a new file directory, which I would then enter manually, and then the script should automatically replace the five files above with five different files in the new specified directory by searching for files names based on certain file name criteria:

ARBITRARYNarration(1.1).flac

ARBITRARYNarration(1.2).flac

ARBITRARY(BLURRED).mxf

ARBITRARY(BACK).mxf

ARBITRARY(PREV).psd

And then if there are two files that meet the criteria or there isn't a file that meets the criteria, it could just return an error while still carrying out whatever other replacements that it can.

A script like this could save me tons of time.  Rather than having to use "replace footage" for every clip individually and constantly navigating back to the same folder, it could all be done in one go for all of the files (as long as my new files are named appropriately).

So, is this even possible?  Is scripting in Premiere Pro this advanced even possible?  If so, how should I go about figuring out how to get a script to do this?  Would creating a plugin be more suitable for something like this?  Can any of you write a script that would do this?

TOPICS
SDK

Views

19.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Oct 05, 2016 Oct 05, 2016

Hi, scripting in Premiere is possible.

Therefore you would have to use Adobe´s Panel APIs. You basically create an HTML5 file with some buttons that trigger some scripting.

Once you have the HTML Panel with some buttons running, you start to communicate with Premiere using ExtendScript (which is the actual API to Premiere). ExtendScript is very similar to JavaScript. I´ve put a sample Panel together for you which should get you pretty far:

GitHub - ThomasSzabo/Minimalistic-Adobe-Premiere-Pro-Panel: This Premiere extension is a minimum in order to run a Panel…

...

Votes

Translate

Translate
Community Beginner ,
Nov 23, 2016 Nov 23, 2016

Copy link to clipboard

Copied

So ! I've done a first version of what I wanted to do but....Even if my code don't crash, if my button is there and if Extendscript don't find any mistakes, I must have made one anywhere cause when I hit the button....nothing happens. Can I have your opinion ?

Here's my Script.

--------------------------------------------------------------------------

$._VERSIONUP_={

   

        VersionUp : function() {

           

            var SelectedItems = app.project.SelectedItems;

           

            for (i=0; i <= SelectedItems-1; i++)

           

            {

                currentItem = SelectedItems;

                var lastIndex = currentItem.MediaPath.lastIndexOf("_");

                var extension = currentItem.MediaPath.substr(lastIndex + 1);

                var UpItem = File.(currentItem.MediaPath.slice(0,(lastIndex+1))+(escape(extension)+1) + ".mov");

               

                if (currentItem &&

                    currentItem.canChangeMediaPath() &&

                    UpItem.exists)

                    {                       

                        currentItem.changeMediaPath(UpItem);

                        currentItem.name = UpItem.name;

                        }

                else {

                    alert("No Version above" + currentItem.name);

                    }

                }

            }   

}                      

-------------------------------------------------------------------------

Maybe I've made some beginner's mistake...Has I said, I'm pretty new to the coding stuff...              

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 25, 2016 Nov 25, 2016

Copy link to clipboard

Copied

All done !

Finally !

Thanks to Thomas Szabo for his useful tips !

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 13, 2021 Jan 13, 2021

Copy link to clipboard

Copied

LATEST

A great resource is the Automator Plus Premiere Pro extension. It allows you to assign any extendscript you write or find online to a keyboard shortcut and run it directly from within Premiere Pro. This means that you do not need to create your own panel, just copy / paste your extendscipt directly inside Premiere Pro.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines