Scripting - Adding effects

New Here ,
May 15, 2017 May 15, 2017

Copy link to clipboard

Copied

Using ExtendScript, I need to add a Lumetri Color effect to a clip and set the Input LUT to a specific file. I can see the ComponentCollection for the clip, and it looks like the effects are items in this collection. Is it possible to add new effects to a clip, and how do you set their parameters?

TOPICS
Premiere Pro SDK, SDK

Views

1.9K

Likes

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

Engaged , May 17, 2017 May 17, 2017
Agree with e.d.... manipulating the parameters of existing effects,  including Lumetri Color should be somewhat doable,  but am not sure if/how you can add the effect with the public API only? But in the QE DOM you can use the addVideoEffect method.Re: Javascript API for premiere pro

Likes

Translate

Translate
Engaged ,
May 16, 2017 May 16, 2017

Copy link to clipboard

Copied

Hi,

while there are some ways to GET effect data (not all have yet been implemented), I have doubts you can (easily) SET them...

If that were the case, I believe Bruce Bullis​ would have updated the Sample Panel.

Likes

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
Engaged ,
May 17, 2017 May 17, 2017

Copy link to clipboard

Copied

Also see this thread, your question seems very similar to me. Guess you'll have to do some trial-and-error.

Likes

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
Engaged ,
May 17, 2017 May 17, 2017

Copy link to clipboard

Copied

Agree with e.d.... manipulating the parameters of existing effects,  including Lumetri Color should be somewhat doable,  but am not sure if/how you can add the effect with the public API only? But in the QE DOM you can use the addVideoEffect method.

Re: Javascript API for premiere pro

Likes

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 ,
May 20, 2018 May 20, 2018

Copy link to clipboard

Copied

Any chance anyone can shed a little more light on how to use the addVideoEffect() method in the admittedly "officially unsupported and not recommended" QE DOM? I've tried passing an effect's displayName, matchName, and a component object as an argument to the method and I get a "Bad argument list" message for each of those. Might someone know what arguments that method expects?

Thanks,

David

Likes

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 ,
Jul 16, 2018 Jul 16, 2018

Copy link to clipboard

Copied

Joining to this request for addVideoEffect() args

Likes

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 ,
Jul 16, 2018 Jul 16, 2018

Copy link to clipboard

Copied

Found out. addVideoEffect(this.qe.project.getVideoEffectByName("Twirl"))

Likes

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 ,
Jul 24, 2018 Jul 24, 2018

Copy link to clipboard

Copied

Thanks, that's really helpful!

Likes

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
Enthusiast ,
Jul 25, 2018 Jul 25, 2018

Copy link to clipboard

Copied

dmytrok98627988  wrote

Found out. addVideoEffect(this.qe.project.getVideoEffectByName("Twirl"))

Was able get the object for qe.project.getVideoEffectByName("Twirl")

How to apply addVideoEffect() to either

a trackItem, e.g. app.project.activeSequence.videoTracks[0].clips[0];

or

a projectItem, e.g. app.project.rootItem.children[0];

Likes

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 ,
Jul 25, 2018 Jul 25, 2018

Copy link to clipboard

Copied

I found this to work.

var clip = qe.project.getActiveSequence().getVideoTrackAt(0).getItemAt(0); // First item, first track

clip.addVideoEffect(this.qe.project.getVideoEffectByName("Crop"));

Likes

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
Enthusiast ,
Jul 25, 2018 Jul 25, 2018

Copy link to clipboard

Copied

eliportell@hotmail.com  wrote

I found this to work.

var clip = qe.project.getActiveSequence().getVideoTrackAt(0).getItemAt(0); // First item, first track

clip.addVideoEffect(this.qe.project.getVideoEffectByName("Crop"));

Thanks eliportell@hotmail.com

Worked like a charm.  It was the getting of the track by mean of the "qe" project that made the difference.

Is the "this" on your second line a necessary object.   It worked for me without. What is "this" referring to?

Likes

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 ,
Jul 25, 2018 Jul 25, 2018

Copy link to clipboard

Copied

Premiopolis​ great point.

I was using the "this" because that is what was shared by dmytrok98627988​ and it worked, so I didn't question. Thanks to everyone's participation on this thread. Adding effects is a huge help.

Likes

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
Enthusiast ,
Jul 25, 2018 Jul 25, 2018

Copy link to clipboard

Copied

Are you able to programmatically set properties of the applied effect?  So far I haven't found a means to do so.

Likes

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 ,
Jul 25, 2018 Jul 25, 2018

Copy link to clipboard

Copied

This worked for me:

app.enableQE();

var clip = qe.project.getActiveSequence().getVideoTrackAt(0).getItemAt(0);

clip.addVideoEffect(qe.project.getVideoEffectByName("Crop"));

var clip = app.project.activeSequence.videoTracks[0].clips[0];

for (var a = 0;a<clip.components.numItems;a++){

    if( clip.components.displayName == "Crop"){

        clip.components.properties[0].setValue(30,1);

        clip.components.properties[1].setValue(20,1);

        clip.components.properties[2].setValue(12,1);

        clip.components.properties[3].setValue(10,1);

        clip.components.properties[5].setValue(25,1);

        }

    }

Referencing this effect documentation for property information. And here is a tutorial video as well.

Likes

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
Enthusiast ,
Jul 26, 2018 Jul 26, 2018

Copy link to clipboard

Copied

Eli Portell ​   ​Super helpful.  Thanks.

Likes

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 ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

LATEST

Looks good but instead of getActiveSequence how can work on any sequence with sequence number. 

Something like this - project.sequences[10]; 

But in QE it doesn't work. how to define Sequence 10 instead of active sequence? 

Likes

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
Participant ,
Oct 26, 2017 Oct 26, 2017

Copy link to clipboard

Copied

Hi ,

Did you get any update ? can we apply INPUT LUT to any clip?

Likes

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