Quantcast
Channel: Adobe Community : Popular Discussions - Premiere Pro SDK
Viewing all 53010 articles
Browse latest View live

C++ plug-in – problem rendering audio waveforms for a growing clip

$
0
0

Hi,


I’m writing a C++ plug-in for Premiere Pro CC.


I’ve based the plug-in on the example project SDK_Custom_Import, which is provided with the plug-in SDK.


In my plug-in, I’ve set the flags:


importInfo->canProvidePeakAudio = kPrTrue;

importInfo->avoidAudioConform = kPrTrue;


and


fileInfo8->accessModes |= kRandomAccessImport


This allows me to manually render the waveforms on-demand via the imGetPeakAudio case-statement.


In Premiere’s setting: Edit > Preferences > Media > Automatically refresh growing files. I have set the minimum refresh rate of 10 seconds.


I would like to import a growing, 20 minute clip with uncompressed audio at 48KHz. In my importer, I’m adding a 20 minute clip to the timeline, and back-filling video and audio as the clip grows (i.e. I’ve created a static length clip which is being slowly populated).


I can hear the audio as it is added, and I can render the waveforms correctly. My only problem is that the waveforms are not being updated/redrawn on the timeline. I was hoping that by setting the growing file refresh to 10 seconds (Edit > Preferences > Media > Automatically refresh growing files), that the timeline would automatically redraw every 10 seconds.


If I manually resize the timeline at 10 second intervals to coincide with the growing file refresh, it forces the latest audio waveforms to be redrawn, which renders the latest audio waveform growth.


Is there any code flag, or menu setting, to schedule an automatic timeline redraw at the 10 second growing file refresh interval?


Or can I amend my plug-in to force a timeline redraw at regular intervals?


Any help you can provide is much appreciated.


Many thanks, Andy.

 

[Here is the list of all Adobe forums... https://forums.adobe.com/welcome]

[Moved... you need to ask programming questions in the programming forum... Mod]


Not able to change the start and end values of track item

$
0
0

I am developing an extension for Premiere Pro.I need to import .mogrt into sequence and am able to do that using the API importMoGRT provided by Premiere Pro.

 

API

var newTrackItem = activeSeq.importMGT( mogrtToImport.fsName, targetTime.ticks, vidTrackOffset, audTrackOffset);

 

In the API i am able to change the targetTime.ticks which sets the starting time of the track item.But where do i set the end time/duration of the trackitem

 

Alternate option

 

I tried to use the attributes of the trackitem namely start, end, inPoint, outPoint (In the API documentation it is given as read/write attribute).But i am not able to change any of these attributes.

 

How do i set the start, end, duration of the trackitem?

"insertClip and importMGT" can specify the clip duration?

$
0
0

*Sorry, i am poor at English because I am a Japanese.

 

Hi, everyone

 

I want to insert Image and MGT in a certain section.

By changing "start" and "end" after insertion, the duration could be changed.

In this method, the clip overwritten by the insertion disappears.

So , i want to insert with specify the clip  duration.

 

Could you tell me if you know anythings.

 

 

QE API trackItem.moveToTrack() and trackItem.move()

$
0
0

Hello. What arguments does this functions accept? And if there any way to check arguments for QE functions?

Is there a way add custom properties to Timeline clips?

$
0
0

Is there a way add custom properties to Timeline clips?

 

So something along the lines of...

 

(function(){  var ThisTimelineClip=app.project.activeSequence.videoTracks[0].clips[0];  ThisTimelineClip.MyCustomComment="Test";  ShowProperties(ThisClip);
})();

function ShowProperties(ThisObj){
  for(var ThisProp in ThisObj){    $.writeln(ThisProp+": "+ThisObj[ThisProp]);  }
}

 

Currently this Returns:

  duration: [object Time]

  start: [object Time]

  end: [object Time]

  inPoint: [object Time]

  outPoint: [object Time]

  type: 1

  mediaType: Video

  projectItem: [object ProjectItem]

  name: NameOfTimelineClip.mxf

  components: [object ComponentCollection]

 

but not

  MyCustomComment: Test

move or copy a clip to another sequence

$
0
0

hi, is it possible to move a clip from a sequence to another sequence with the script? if not can you add this feature in backlog ? also it will be so useful if you add a possibility (refer to PPRO sample panel in github) to drag and drop project items.

 

thanks!

apply an effect on a clip with script

$
0
0

Hi,

tried to apply an effect to a clip, I could get the list of effects with QE object, but I couldn't find a function such as applyEffect for premiere pro. do you have any idea on how to apply an effect on a clip with the script?

 

Best Regards,

Daniel

Can't set Key Color property in component using Windows

$
0
0

Hi, I'm trying to set the Key Color property via script and for some reason it doesn't seem to work on my Windows PC however it runs fine on a Mac. On Windows I get "Bad argument setValue()" any ideas on what's going wrong here?

 

The project is identical on both platforms and the clips on the sequence have the correct components for the script to run. Tested in Premiere Pro version 13 and 12

 

Thanks!

 

copyKeyColour:function () {

 

        referenceClip = app.project.activeSequence.videoTracks[0].clips[1]

        clipToApplyToapp.project.activeSequence.videoTracks[0].clips[0];


        varreferenceClipComponents = referenceClip.components;

        varresultValue;


        for (varj = 0; j< referenceClipComponents.numItems; j++) {

            if (referenceClipComponents[j].displayName == "Ultra Key") {

                for (vark = 0; k< referenceClipComponents[j].properties.numItems; k++) {

                    if (referenceClipComponents[j].properties[k].displayName == "Key Color") {

                        resultValue = referenceClipComponents[j].properties[k].getValue();

                    }

                }

            }

        }

     

        varapplyClipComponents = clipToApplyTo.components;


        for (varj = 0; j< applyClipComponents.numItems; j++) {

            if (applyClipComponents[j].displayName == "Ultra Key") {

                for (vark = 0; k< applyClipComponents[j].properties.numItems; k++) {

                    if (applyClipComponents[j].properties[k].displayName == "Key Color") {

                        applyClipComponents[j].properties[k].setValue(resultValue);

                    }

                }

            }

        }

    },


Get info for clip loaded in source monitor using ExtendScript

$
0
0

Hello,

 

So, the short version: I was wondering if there's a way to get information about the clip currently loaded in the source monitor using ExtendScript. Specifically, I'd be interested in the name, starting timecode, and in/out points. I don't see anything obvious in the Data Browser in ExtendScript Toolkit, but I thought I would ask.

 

The long version of what I'm trying to do: I have a clip in the source monitor that I know is in the active sequence. I'd like to take the in/out points of the source clip and set those as in/out points in the sequence. This is sort of a hack to get around the fact that you can't associate speech analysis with a multicam clip so I'm cutting with one of the audio clips in the multicam clip and then I'm trying to translate those edit points to the multicam sequence. I have a way to do it with an AppleScript macro, but I'd like to find a more robust (and cross-platform) solution.

 

Thanks!

export sequence as media file

$
0
0

HI,

I want to export sequence as media file i have tried something but that did not generate any output file and even not giving any error message

 

   // app.project.activeSequence.exportAsMediaDirect( "D:\\amit.avi","D:\\output_preset.epr",app.encoder.ENCODE_IN_TO_OUT);

   //app.project.activeSequence.exportAsMediaDirect( "D:\\amit.avi","D:\\output_preset.epr",app.encoder.ENCODE_ENTIRE);

//app.project.activeSequence.exportAsMediaDirect( "D:\\amit.avi","D:\\output_preset.epr",app.encoder.ENCODE_WORKAREA);

Adjust audio levels of a clip with ExtendScript

$
0
0

Hey folks, I'm just starting out trying to learn some scripting and so I'm not entirely sure what's even possible yet, but one thing I'm trying to figure out is if it's possible to select multiple clips in a bin, then run a script and set all of their audio levels to a pre-defined value. Browsing around, I can't really find any attributes related to this, but like I said, I'm just starting to learn.

 

Thanks! 

RegisterKeyEventsInterest Intermittently Not Working?

$
0
0

Last week my panel was properly responding to keyboard input. I would click into it and could get listener callbacks when hitting certain keys for which I'd registered interest with CEP.

 

Today I started up Premiere (it had actually been up for quite a while, including while the computer slept, but I've shut it off and turned it on again) and found that the CEP panel would not respond to any of the keyboard events. Pressing just about any key while the panel is focused results in a "boop" sound effect (I'm on a mac) and no response from the panel.

 

As an example, I'm "registering interest" using:

 

cs.registerKeyEventsInterest('[{"keyCode": 0x0F}]');  // 0x0F is "r" for the mac.

 

And then adding an event listener with:

 

document.body.addEventListener('keydown', handleKeyEvent, false);

 

Has anyone else encountered this? What could suddenly cause Premiere Pro to stop properly passing keyboard events on to the panel?

Looking to Activate Custom Panels via Keyboard Shortcut + Keyboard Listeners when Panel is Active

$
0
0

This may well a couple of feature requests, but looking forward to getting some feedback...

 

In the interest of building more robust and flexible custom HTML panels, we were looking for ways to achieve the following:

1 - Activate and give focus to a custom panel via keyboard shortcut.

2 - Once activated and in focus that custom panel's key listeners (keystroke, keyup, keydown) can be coded to either take precedent over PPro's keyboard shortcuts or not.

 

The goal is to get the above two to work in concert so as to create workflows that would allow 100% keyboard driven functionalities, along the lines of:

- Call the Custom Panel via PPro shortcut

- Run the Panel's function (or suite of functionalities) via keystrokes

- Release control back to PPro and Return to regular PPro kb by exiting Panel focus

Imagine rapid fire: keystroke to activate, use, and release.

 

So far we've been unable to do this.

Reasons:

A - Haven't found a way or workaround to assign the ability to open & give focus to a custom panel via keyboard shortcut

B - Haven't found a way to make custom panel key listeners reliably detect keystrokes even when they are in focus..

 

So far we've tried by way of the CSInterface binding listed here:

https://forums.adobe.com/thread/2250292

and via standard HTML5/JS bindings

document.body.addEventListener / document.addEventListener.

 

Occasionally they work, but not reliably.

 

We're on Mac OS

Is possible to retrieve the current OS path for a given Project Item by means other than XMP Data?

$
0
0

I'm aware you can retrieve it via XMP's URI "Column.Intrinsic.FilePath".

 

Was looking for a function to partner with...

 

SomeProjectItem.changeMediaPath(OsPath);

 

...that would be something along the lines of

 

SomeProjectItem.getMediaPath();

Extendscript: How to check string ends with

$
0
0

Hello All,

 

How to check a string ends with a particular string in extendscript? Where can I find the string api?

 

Premiere Pro Version: 12.0.0
Extension Type: Panel

 

Thanks & Regards,
Meet Tank


Refreshing Image Sequences in Premiere

$
0
0

So the only consistent way I've found to update an image sequence through scripting is to replace it's path with it's current path since refreshMedia() doesn't look for new or missing frames :

 

projectItem.changeMediaPath(projectItem.getMediaPath());

 

 

The drawback to this method, is that it resets all the interpret settings, most importantly frame rate. I tried to set the FPS in metadata (Column.Intrinsic.MediaTimebase) to the original frame rate after the update, but this hasn't worked, and from other discussions I don't think it's possible this way.

 

Only fix for this is to make sure "Indeterminate Media Timebase" is set to the desired frame rate in Preferences, but I'm looking for a more solid solution. Can anyone recommend a better solution?

Motion Graphics Templates API is not working

$
0
0

Hi, everyone

 

I tried new API(Premiere Pro 12.1 API improvements ) .

But Motion Graphics Templates API is not working.

My Premiere Pro version is 12.1.1(Build 10) and windows10 OS(Japan).

 

Could you tell me if you know anythings.

 

var activeSeq = app.project.activeSequence;
if (activeSeq) {    var filterString = "";    if (Folder.fs === 'Windows'){        filterString = "Motion Graphics Templates:*.mogrt";    }    var mogrtToImport = File.openDialog ( "Choose MoGRT", // title                                                filterString, // filter available files?                                                 false); // allow multiple?    if (mogrtToImport){        var targetTime = activeSeq.getPlayerPosition();        var vidTrackOffset  = 2;        var audTrackOffset = 1;        var newTrackItem = activeSeq.importMGT( mogrtToImport.fsName,                                                     targetTime.ticks,                                                     vidTrackOffset,                                                    audTrackOffset);        if (newTrackItem){            //var moComp = newTrackItem.getMGTComponent();  //this function return Undefined            var moComp = newTrackItem.components[2]; // Simple Web Caption.mogrt            if (moComp){                var params = moComp.properties;                var srcTextParam = params.getParamForDisplayName("Source Text");                if (srcTextParam){                    var val = srcTextParam.getValue();                    srcTextParam.setValue("New value set by PProPanel!");                }            }        }    } else {        app.setSDKEventMessage('Unable to import ' + mogrtToImport.fsName + '.', 'error');      }
} 

 

thanks

Can I Enable Dynamic Link after importing After Effects comp?

$
0
0

I am developing a POC for a HTML panel that controls After Effects from within Premiere Pro. It is made for editors and people who are somewhat familiar with PPro but not with AE.

 

I wrote some code that imports an AE comp into PPro, that must have the possibility to be altered after importing. I know this works with comps that are manually imported with "dynamic link".

I am able to control the AE items from within PPro using BridgeTalk, so making these changes is not the problem.

 

I found this function "app.project.importAEComps(pathOfContainingProject, arrayOfCompNames)" that imports an AE comp, (from PPro2018 onward) but this imported item is not dynamically linked to AE. I need to do a manual operation, such as "edit original". I'd love to do this from within the automation.

 

Without dynamic link, the changes made in AE are not visible in PPro, not even after saving the AE project and re-importing the comp. There seems to be some caching involved. I need to restart PPro entirely for the changes to become visible..

 

importAEcomp = function(pathName, compName)
{ //This function runs in the PPro jsx environment     var prj = app.project;     prj.importAEComps(pathName, [compName]);     var impItem = undefined;     for(var t=0;t<prj.rootItem.children.numItems;t++) {          var projItem = prj.rootItem.children[t];          if(projItem) {               var index = projItem.name.indexOf('/'); //Use the comp name part                if(index>0) { //Search the item with our comp name                    if(projItem.name.substr(0,index)===compName) {                         impItem = projItem; //Found!                         break;                    }               }           }     }     if(impItem) {       // impItem.refreshMedia(); //Does this activate the dynamic link? Nope!          var seq = app.project.activeSequence;          var vItems = seq.videoTracks.numTracks;          if(vItems>1) { //We need at least 2 video tracks. Add our comp to the topmost video layer               var vTrack = seq.videoTracks[vItems-1];               if(vTrack) {                    vTrack.insertClip(impItem,0); //Add the item to topmost layer               }          }     }
}

 

Chris

Need Guidance for Panel (HTML) - Plugin (C++) development

$
0
0

Hi, I barely new into this platform I would likely receive any assistance possible. Let me start.

 

Right now I wanted to create a plugin to apply some effect to certain frames when the user loads a movie into premiere pro. As far as I could researched AE plugin should fit more to achieve this. But I wanted to start with Premiere Pro as a first approach.

 

The matter is that I succeeded compiling the SDK Premiere Pro plugin examples, also I succeeded compiling a separate extension panel made with HTML and java script just a super senseless panel with hello world and a button.

 

I Want to be able to react to some panel changes into the plugin in C++ but I don't know how or where to start, I couldn't find any information about it, some InDesing and Illustrator samples code but I don't know if those would work into Premiere Pro, I need guidance, if there would be some document or explanation about how to achieve that. I have no advanced experience with JavaScript, but I'm experienced with C++.

 

 

I would kindly appreciate if someone could give me some starting point or a little example about how to react to panel actions into C++ plugin side. In my research I could find that plugins have selectors that could represent some kind of behavior (Reactions?), but I'm not hundred percent sure, so if it is how could I make the connection between JavaScript and those selectors in the plugin C++ side.

Thanks for reading hope you can help me out. Any starting point to achieve this goal will be appreciate.

AE fails to load PRM plugin

$
0
0

I build an Exporter plugin for Premiere as a dot PRM file.  Zal Lam says I need to put it into C:\Program Files\Adobe\Common\Plug-ins\CS5.5\MediaCore folder so the render will be seen in the queue and access MediaCore libraries. 

 

After Effects is trying to load my Premiere Exporter plug-in and giving a failed to load warning. 

 

How do I make my Premiere plug-in only be seen by Premiere and not also by After Effects?

Viewing all 53010 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>