Skip to main content
nehrus86783659
Participant
May 16, 2017
Answered

Javascript API for premiere pro

  • May 16, 2017
  • 2 replies
  • 12145 views

Where i can find the javascript API link for Premiere pro. I want to change the Lumetri color parameters like Exposure, Contrast, HIghlights, Shadows, Whites, Blacks and Saturation etc programmatically.

Thanks,

Nehru

This topic has been closed for replies.
Correct answer sberic

The four best resources I'm aware of for exploring the Premiere Pro ExtendScript API follow:

  1. The ExtendScript Toolkit's Object Model Viewer - A built-in documentation browser that displays some of the available application APIs. Unfortunately, it's a bit out of date and does not contain any documentation for Components.
  2. The PProPanel api_doc.html page - This is the only resource I'm aware of that provides actual documentation for some of the Premiere Pro ExtendScript APIs. Unfortunately, it is an html page and is best viewed by cloning the repository locally and opening the page in a browser.
  3. The PProPanel Premiere.jsx script - Bruce Bullis​ has consistently directed users to reference this sample code for insight into the Premiere Pro API. Advancements have been made (see #2 above), but, sadly, the most common suggestion is to reference this document.
  4. The Property Explorer Addon - A free utility provided by a community member that allows you to investigate APIs (properties and methods) at runtime from within the running application (e.g. Premiere Pro). As this utility uses a combination of ExtendScript Reflection and basic JavaScript property enumerationat runtime, it is capable of revealing APIs that are not documented in any of the aforementioned resources. Note that it may require special installation.

I hope this is helpful for future developers similarly struggling to find their bearing in this development environment!

2 replies

sberic
sbericCorrect answer
Legend
May 17, 2017

The four best resources I'm aware of for exploring the Premiere Pro ExtendScript API follow:

  1. The ExtendScript Toolkit's Object Model Viewer - A built-in documentation browser that displays some of the available application APIs. Unfortunately, it's a bit out of date and does not contain any documentation for Components.
  2. The PProPanel api_doc.html page - This is the only resource I'm aware of that provides actual documentation for some of the Premiere Pro ExtendScript APIs. Unfortunately, it is an html page and is best viewed by cloning the repository locally and opening the page in a browser.
  3. The PProPanel Premiere.jsx script - Bruce Bullis​ has consistently directed users to reference this sample code for insight into the Premiere Pro API. Advancements have been made (see #2 above), but, sadly, the most common suggestion is to reference this document.
  4. The Property Explorer Addon - A free utility provided by a community member that allows you to investigate APIs (properties and methods) at runtime from within the running application (e.g. Premiere Pro). As this utility uses a combination of ExtendScript Reflection and basic JavaScript property enumerationat runtime, it is capable of revealing APIs that are not documented in any of the aforementioned resources. Note that it may require special installation.

I hope this is helpful for future developers similarly struggling to find their bearing in this development environment!

Bruce Bullis
Legend
May 17, 2017

One new, additional resource = Bryson Michael has put together an online API reference! http://www.brysonmichael.com/premiereapi-home

sberic
Legend
May 17, 2017

Bruce Bullis wrote

One new, additional resource = Bryson Michael has put together an online API reference! http://www.brysonmichael.com/premiereapi-home

Where did Bryson get the documentation? Some APIs listed there are undocumented in the resources I previously mentioned while others that are documented (e.g. in api_doc.html) don't have any descriptive content.

andymees@aje
Legend
May 17, 2017

Hey Nehru,

As has been explained, there is no "JavaScript API" there is an ExtendScript API for interacting programmatically with Premiere, and the functionality for getting and setting keyframe values within Effect components is demonstrated in the PProPanel sample

Javascript API to change Premiere Pro Lumetri color

Basically, you have to navigate through the active sequence to select the target clip, within the clip to select the target component (eg Lumetri Effect), and within the component to select the target property (eg Exposure etc)

so a particular property (eg Exposure, Contrast, Highlights ect) would be referenced using something like:

myEffectProperty = app.project.activeSequence.videoTracks.clips.components.properties

where 'i' is the target track's index number (within the sequence)

where 'j' is the target clip's index number (within the track)

where 'k' is the component (effect) index number (within the clip)

where 'l' is the property index number (within the effect)

A quick scan of a targetted clip (using code derived directly from the PProPanel sample) reveals the following parameters (properties) for a Lumetri Color effect.

var clipComponents = clip.components;

if (clipComponents){

      for (var cc = 0; cc < clipComponents.numItems; ++cc) {

            $.writeln('component ' + cc + ' = ' + clipComponents[cc].matchName + ' : ' + clipComponents[cc].displayName);

            var componentProperties = clipComponents[cc].properties;

            for (var cp = 0; cp < componentProperties.numItems; ++cp){

                  $.writeln('param ' + cp + ' = ' + componentProperties[cp].displayName);

            }

      }

}

component 2 = AE.ADBE Lumetri : Lumetri Color

param 0 = Blob

param 1 = 

param 2 = Basic Correction

param 3 = 

param 4 = 

param 5 = 

param 6 = Input LUT

param 7 = HDR White

param 8 = White Balance

param 9 = WB Selector

param 10 = Temperature

param 11 = Tint

param 12 =

param 13 = Tone

param 14 = Exposure

param 15 = Contrast

param 16 = Highlights

param 17 = Shadows

param 18 = Whites

param 19 = Blacks

param 20 = HDR Specular

param 21 = 

param 22 = 

param 23 =

param 24 = Saturation

param 25 =

param 26 = Creative

param 27 = 

param 28 = 

param 29 = 

param 30 = Look

param 31 = Intensity

param 32 = Adjustments

param 33 = Faded Film

param 34 = Sharpen

param 35 = Vibrance

param 36 = Saturation

param 37 =

param 38 = Tint Balance

param 39 =

param 40 =

param 41 = Curves

param 42 = 

param 43 = RGB Curves

param 44 = HDR Range

param 45 = 

param 46 =

param 47 = Hue Saturation Curves

param 48 = 

param 49 =

param 50 =

param 51 = Color Wheels

param 52 = 

param 53 = HDR White

param 54 = 

param 55 =

param 56 = HSL Secondary

param 57 = 

param 58 = Key

param 59 = Set color

param 60 = Add color

param 61 = Remove color

param 62 = 

param 63 = 

param 64 = 

param 65 = 

param 66 = 

param 67 = 

param 68 = 

param 69 = Refine

param 70 = Denoise

param 71 = Blur

param 72 = Blur

param 73 = Correction

param 74 = 

param 75 = 

param 76 = Temperature

param 77 = Tint

param 78 = Contrast

param 79 = Sharpen

param 80 = Saturation

param 81 = Saturation

param 82 =

param 83 = Vignette

param 84 = 

param 85 = Amount

param 86 = Midpoint

param 87 = Roundness

param 88 = Feather

param 89 =

param 90 = SpeedGrade Custom

param 91 = Custom Layer

param 92 = unused

param 93 = unused

param 94 = 

param 95 =

param 96 =

param 97 = Embedded LUTs

Cheers

Andy