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

How to add effects to clips in Premiere with CEP/ExtendScript?

New Here ,
Apr 02, 2019 Apr 02, 2019

Copy link to clipboard

Copied

I'm fairly new to CEP and ExtendScript, though a long-time old-school plug-in developer.

Looking at the APIs (http://ppro.aenhancers.com/), I don't see how to add an effect to a clip in Premiere Pro -- how would I do that?

And/or: how can I change the params of the built-in effects, e.g. motion position & scale via the API?

TOPICS
SDK

Views

2.0K

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

Community Expert , Apr 04, 2019 Apr 04, 2019

I think adding an effect is only possible through the undocumented QE Dom, but not seeing the method. bbb_999 would know.

But modifying the params of an effect is totally doable with components

( e.g. app.project.activeSequence.videoTracks[0].clips[0].components[0].properties[0] )

Votes

Translate

Translate
Community Expert ,
Apr 04, 2019 Apr 04, 2019

Copy link to clipboard

Copied

I think adding an effect is only possible through the undocumented QE Dom, but not seeing the method. bbb_999 would know.

But modifying the params of an effect is totally doable with components

( e.g. app.project.activeSequence.videoTracks[0].clips[0].components[0].properties[0] )

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
Explorer ,
Apr 04, 2019 Apr 04, 2019

Copy link to clipboard

Copied

Like justintaylor said you can try use app.project.activeSequence.videoTracks[0].clips[0].components[0].properties[0] with setValue(). I was playing around with this yesterday but it seemed quite slow at times. I was trying to set the Blend Mode to Screen. It seemed to change the UI but not change the view/look in the program monitor for a few seconds. Opacity and scale seemed to work. Position seems to only accept values between 0 (left and top edges) and 1 (right and bottom edges).
Components[0] - Opacity   
Properties[0] - Opacity   
Properties[1] - Blend Mode (Title/Label?)   
Properties[2] -  Blend Mode (Value)   
Components[1] - Motion   
Properties[0] - Position [x,y]   
Properties[1] - Scale   
Properties[2] -  Scale Width   
Properties[3] -   
Properties[4] - Rotation   
Properties[5] - Anchor Point   
Properties[6] - Anti Flicker Filter

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 Expert ,
Apr 04, 2019 Apr 04, 2019

Copy link to clipboard

Copied

Haven't tried in a while, but yea I do recall the Effect Panel UI not updating correctly until you clicked away and clicked back. It was sure tricky discovering how to set some of those properties. Only thing I remember not being able to set was enabling/disabling effects.

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
Adobe Employee ,
Apr 05, 2019 Apr 05, 2019

Copy link to clipboard

Copied

Justin's right, it's a QE DOM thing for the moment.

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 ,
Mar 12, 2022 Mar 12, 2022

Copy link to clipboard

Copied

LATEST

Since I had the same question and the time to figure it out, here are the broad steps and important methods. Watch out: transitions often don't stick to the clip and need to be placed and moved with care. QE dom is not ideal and they can start 'floating' around the timeline if you do a lot of editing afterwards... but still:

 

To get started qe.project.reflect.methods will show you some tools you maybe didn't know you had.

To find out what your effect should be named in the script you can run qe.project.getVideoEffectList and qe.project.getVideoTransitionList  and study this list in console.. Same for audioeffects.

 

When you found your desired effect, remember the name verbatim for use in the script.

To add it to a sequence you will first have to get the sequence using QE Dom. You get a QE sequence object using qe.project.getSequenceAt( i ).  Where i is a number. There can be gaps between the numbers if you deleted and added sequences, so watch out while iterating.There is no nodeId there, so you can only search by sequence name I believe.

 

When you have the correct QEdom sequence, you can get the video/audio track with getVideoTrackAt( i ) and finally your clip on that track with getItemAt( i )

On that QE-trackitem you can finally put your effect using addVideoEffect().   The first argument is the effect itself, you can now use qe.project.getVideoEffectByName() to enter it correctly. The second argument, in case of a transition, will put the transition either at the start (0) or at the end (1).. ,  the third argument's function is unknown to me, be putting another 1 seems to work.. maybe another 1 is needed (I am writing from memory). It should kinda look like this:

 

<<QE trackitem>>  .addVideoEffect(qe.project.getVideoEffectByName("crossfade"),1,1).

 

Good luck poineering!

Luuk

 

 

 

 

 

 

 

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