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

New UI font in CC 2018

$
0
0

Which font is being used now? Same or different across macOS and Windows?


Applying a scale change through scripting

$
0
0

Hi,

 

I'm trying to get to grips with JavaScripting on Premiere Pro CC 12 and my first task is to apply a scale change to a series of videos which runs for the first second scaling from 100 to 200 and then for another second scaling from 200 to 300. It seems as though everything is being correctly set when debugging the script but in the project window the keys I've made are not showing up and the final scaling is applied from time 0 so the end effect is that it's full size from the outset.

 

what am I missing?

 

TIA

Richard

 

var proj = app.project;

var seq = proj.activeSequence;

 

var time = seq.getPlayerPosition();         // CTI = Current Time Indicator.

var time2 = seq.getPlayerPosition();

var time3 = seq.getPlayerPosition();

time2.seconds += 1;

time3.seconds += 2;

 

 

var videoTracks = seq.videoTracks;

for (var i = 0; i < videoTracks.numTracks; i++) {

var track = videoTracks[i];

for (var j = 0; j < track.clips.numItems; j++) {

var clip = track.clips[j];

 

if (clip.name == "Rectangle 720 576.png") {

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

var component = clip.components[k];

if (component.displayName == "Trajectoire") {       // Trajectory

 

for (var l = 0; l < component.properties.numItems; l++) {

var property = component.properties[l];

if (property.displayName == "Echelle") {        // Scale

if (!property.isTimeVarying()) {

property.setTimeVarying(true);

}

property.addKey(time);

property.addKey(time2);

property.addKey(time3);

var k = property.getKeys();

if (property.areKeyframesSupported() == true) {

var result = property.getValueAtKey(time);

property.setValueAtKey(time, 100, true);

property.setValueAtKey(time2, 200, true);

property.setValueAtKey(time3, 300, true);

}

}

}

 

}

}

 

}

}

}

Not able to import into premiere pro if the path contains any special character

$
0
0

Hi,

 

I am developing an extension for Adobe Premiere Pro.I make use of the xml to create the timeline in premiere pro. Once the xml is created it is written into a file and stored at a particular location.

 

I use the API "app.project.importFiles(Paths)" to import my xml into premiere pro. For that i make a call to the jsx file via evalScript with path as the argument where the api is invoked.

 

The problem is if the path contains any special character say ' it fails to import. Could you please tell me what kind of encoding is required for safely passing my path to jsx via evalScript

Examples of applying speed / duration to a sequence

$
0
0

Hello developers,

 

Is there a good examples of applying speed / duration with the frame blending option to a sequence in Premiere Pro? I want to test this via a plugin but the examples that come with the Pr SDK as well as the Ae SDK do not show how to do this. I know in Ae I would be working on a composition rather than a sequence, but I want to initially do this in Pr. Any help would be deeply appreciated. Also are there any good books on creating plugins for Pr? Have a great one.

setSpeed() - Bad argument list

$
0
0

Hi,

 

with the QE-Version of the SDK, I was not able to use the clip.setSpeed()-Function correctly.

 

My code sample looks like this:

 

app.enableQE();
var as = qe.project.getActiveSequence();
var track0 = as.getVideoTrackAt(0);
var clip = track0.getItemAt(0);
clip.setSpeed(...)

 

I did not find any correct argument list for this.

 

Beside this special case: Is there any way, I could gatter this data by myself? There are a lot undocumented functions with missing argument lists I would love to use...

 

Thank you!

 

Best,

Sebastian

Creating a Panel to control the Plugin (C++)

$
0
0

Is it possible to create an UI in the Panel and then call the plugin functionality written in c++?

Export frames or subclip between two markers

$
0
0

Hi!

 

I'm currently developing an extension using extendscript and i want to export frames or subclip between two markers.

I read the premiere scripting guide and didn't found any method that allows me to navigate the frames of a clip.

 

Is there any way that to get the next frame of a marker? Or the clip(s) between two markers?

Set duration of MOGRT

$
0
0

Hello guys,

 

I'm facing an issue by setting new duration of imported mogrt in a sequence in Premiere Pro 12.1.2 (Build 69). What I've done is: imported a mogrt to my project, created a sequence with some video/audio content, and added the mogrt to the sequence. Hier is how it looks:

Bildschirmfoto 2019-03-27 um 13.10.25.png

According to the documentation, there should be a setSpeed function on the trackItem. So, I've tried several ways to call this function:

1) app.project.sequences[0].videoTracks[1].clips[0].setSpeed(1.0, "00;00;10;00", false, false, true);

2) qe.project.getSequenceAt(0).getVideoTrackAt(1).getItemAt(0).setSpeed(1.0, "00;00;10;00", false, false, true);

None of these objects have setSpeed function.

 

I dug into the video track and noticed, that if I call qe.project.getSequenceAt(0).getVideoTrackAt(0) there are two items inside of it (one is type "clip" and the other type "empty"), while calling qe.project.getSequenceAt(0).getVideoTrackAt(1) there is only one item with type "empty". Is there anything I'm missing?

 

Post moved from Extensions / Add-ons Development to Premiere Pro SDK. [Moderator]


Highlight/select/search a sequence in project

$
0
0

Hi,

 

I'm building an extension for Premiere and got stuck at this point. So basically, upon clicking on a certain button in extension I need it's corresponding sequence to get highlighted in the project window.

 

Here's a scenario:

 

I have a project opened in Premiere that contains 3 sequences and I also have my extension opened. Within extension there are 3 buttons for those 3 sequences in the project, each button corresponding to each sequence - Button X corresponding to Sequence X, Button Y to Sequence Y and Button Z to Sequence Z... When I click on the Button X in the extension window, I want it's corresponding Sequence X to get highlighted/selected for me in the project window.

 

If the Sequence X is located within a bin that's inside a bin, let's say Bin A1.1 is inside Bin A1 and there lies the Sequence X - I want those bins to get expanded upon clicking on the Button X so that I can see highlighted Sequence X in the project window - see example.

 

And that's pretty much it, I hope I explained my goal clearly.

 

So how would you do this? Can you throw me a few lines of code for this or a documentation or an idea of how to approach this? Anything would help really.

 

Thank you in advance!

SCRIPTING for Premiere Pro

$
0
0

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?

Created Subclips are drifting over time

$
0
0

Hello,

 

I have a script I am using to generate shot names for clips based on edit points throughout a 22 minute timeline. The script finds every cut in a long video track and then makes a subclip that length with the appropriate name, so I can essentially drag all the subclips into a new track above and the shots are all in order and properly named, and for the most part it works great. However, as it goes down the timeline the edits / subclip ins and outs will drift by a frame here and there. I am guessing this is perhaps the slight difference between 23.976 and 23.98 over a 22 minute sequence? I am not sure where the discrepancy is coming from, but I am finding the in and out points by "clip.start.seconds" and "clip.end.seconds".

 

Any ideas why its going wrong or how to make it more accurate?

 

Thanks!

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

Premiere Pro Scripting Guide - Omission Error

$
0
0

Hi All,

 

I am reviewing documentation for project.importFiles and I noticed that the Parameters field on page 17 of the current Premiere Pro Scripting Guide is not accurate. It seems to be the parameters field from the previous method in the list, openSequence().

 

I noticed this error in the documentation while troubleshooting "Bad arguement importFiles", my arguements are a file path string, true, false, and a ProjectItem which is the bin.

 

Please let me know if you can provide accurate documentation or any assistance with this issue.


Thanks,

 

 

John Pooley

Workspace Directory for Windows and Mac OS

$
0
0

So I have saved a custom workspace and have been wondering where does the software save them on your machine?

 

So far lots of the adobe applications stick with a type of standard location but some of them tend to drift away from those standards.

 

I would like to know where these files are saved on Windows and on Mac if you know.

 

Many Thanks,

 

Daniel

 

PS: For bonus points could you also tell me where it saves them for AfterEffects?

Convert timecodes to seconds

$
0
0

Is there a method to convert timecode(hh:mm:ss:ff) to seconds ?

 

I'm trying to create a marker using markers.CreateMarker() method but for some reasons the supplied value in seconds doesn't match input timecodes.

For e.g. I have a timecode 00:03:00:00 on a 29.97fps(Non-drop frame). In order to convert it into seconds,

 

var a = time.split(':');

var seconds = ((Number(a[0])* 3600) + (Number(a[1]) * 60) + Number(a[2]));

var milliseconds = (Number(a[3])/ fps);   // fps is 29.97

var result = seconds + parseFloat(milliseconds,5); 

 

Result here is 180 seconds. Premiere shows this timecode as :

 

Non-Drop frame

In: 00:02:59:24 , which is 5 frames behind.

 

Drop frames gives me slightly better results

In: 00:02:59:28, which is 2 frames behind.


Please suggest.



Get Selected Item(s) in Project Panel

$
0
0

Going through the examples and documentation, I couldn't find a function or value to tell if a folder or footage item is selected or access that item in the Project Panel of Premiere Pro. Closest thing I found was .select() which only selects the item you have coded. Has anyone had any success with this? Thanks!

Importing Markers

$
0
0

I'm currently trying to import markers in a Premiere plugin.

I'm using a Premiere Import plugin and an After Effects Effect plugin.

The AEGP_MarkerSuite2 offers a NewMarker API, but it seems that it's not available in Premiere.

The PrSDKMarkerSuite available in Premiere doesn't look to offer any way to create markers.

 

What's the most straight forward way to import a bunch of markers into Premiere from a plugin?

 

Thanks

Execute a system command in windows environment as administrator

$
0
0

Hi All,

 

Is there a way to execute system commands using the C:/windows/system32/cmd.exe from panels?

We tried the CEP HTML test Extension-> Create Process options, but cannot figure out how it is working

When we try to run the commands under set StdErr Handler but that is always creating ".exe Argument1" folder in the document folder.

 

How can we execute system commands in windows environment?

How can we run certain commands/ programme  as a specific user?

 

Thanks and Regards,

Anoop NR

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

how to get started with premiere scripting?

$
0
0

Hi. I'm an experienced web developer who's working on a project which requires some scripting in Premiere Pro.

 

My needs aren't highly complicated, and at first I thought "well this looks fine" seeing the CEP samples on github. Never have I have ever seen such bad bad horrible job of creating an API since trying to work with Microsoft's Outlook. There seems to be no manual or proper documentation for Premiere, furthermore, most (if not all? I didn't check) of the links on the github page are dead. Worse, some of the links are supposed to point at a file within that project - upon finding that file (in a different place) it turns out that even the intended lines the link points to are out of date.The official ESTK install links on Adobe's website are dead too, I only finally got it through the Creative Cloud - after enabling "show older apps" of course, which hasn't been a whole lot of help because it's debugging system is so ridiculously out of date. Oh also, some of the examples on github don't even run *as is*. There's no proper guide or quick-start tool, there's not even something like a REPL system that'll allow you to mess around and learn through that.

 

I need to run some really simple operations. I'm not asking for help with figuring out how to do them - I can do that on my own, provided I have some system that allows me to actually understand and learn without banging my head against the wall. Frankly, this is embarrassing and unprofessional from a company this big, and I don't understand it, but maybe someone on this community can point me in the right direction? I just need a way to start messing with this so I can actually learn how to use it.

Viewing all 53010 articles
Browse latest View live