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

TypeScript Enabled CEP Development

$
0
0

Modern Tools and ExtendScript

Earlier this week, Bruce Bullis integrated a pull request into the CEP Samples repository that included a new Sample called TypeScript. TypeScript is a language that "transpiles" into JavaScript and JavaScript-based languages (e.g. ExtendScript). It can also be configured in certain environments (e.g. Visual Studio Code) to provide normal JavaScript (and, it turns out, ExtendScript) development with helpful type checking and IntelliSense/autocompletion support. Here's an example:

TSExample.gif

Open the PProPanel-vscode folder in Visual Studio Code (or other TypeScript-aware IDEs?), open up the Premiere.jsx file, and simply begin typing. The environment is already set up to provide rich IntelliSense support.

 

Powered By TypeScript Declaration Files and JSDoc

The environment has to get information about the types from somewhere, right? The type information is identified by the TypeScript system in the following ways:

 

  • In the Panel JavaScript Environment:
  • In the App ExtendScript Environment:
    • Uses the TypeScript-provided ES5 type information (ES3 is coming - when available, it will be switched to use that!).
    • Uses custom Type Declaration files (included within the sample here) to help make the IDE aware of what types are available, as well as documentation!
    • Sources JSDoc comments for type information.

 

Beyond this, TypeScript is capable of type inference (set var x = 5; and the IDE will infer that x is a number). For more on how TypeScript does all of this, see this document.

 

Inline ExtendScript and PremierPro API Documentation

The declaration files included in the sample are currently incomplete, but bbb_999 has indicated interest in helping to fill in the blanks. These files are an improvement over the current documentation in that they can be [more] easily read on the web (don't need to be downloaded and opened in a browser) and also power in-line documentation and suggestions (as in the above gif)!

 

Writing in TypeScript

As configured, the sample does not actually assume that you will be writing in TypeScript and transpiling to JavaScript, but that you are simply writing JavaScript/ExtendScript. If you wish to use this feature, you will have to configure your IDE to do so (Visual Studio Code, Webstorm, Sublime Text, etc.).

 

Writing in NEW JavaScript

It should also be noted that TypeScript can transpile from new JavaScript to old JavaScript. This may not seem all that interesting except that you could use the latest ES6 features to write code for both your panel JavaScriptor your app ExtendScript. These would be transpiled into platform-compatible versions: target: "es5" for panel and target: "es3" for ExtendScript!

 

As with TypeScript, this use-case would require setting up the TypeScript compiler.

 

Debugging In Visual Studio Code

This sample also contains configuration settings to allow debugging of the panel (HTML) environment directly in Visual Studio Code, rather than through a Chrome browser. See:

vscode-debugging.png

 

Questions? Comments? Ask/post away!


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

How to calculate timecode in second

$
0
0

Hi All,

 

I am using markers#createMarker function to create marker on clip. It expects timecode value in second. Can anyone explain how to convert the timecode in second?

E.g. I want to create a marker at "00:00:02:07" and clip's FPS is "14" then what would be the correct timecode value in seconds?

 

 

Premiere Pro version: 11.0.2
Extension Type: Panel

 

Thanks & Regards,
Meet Tank

Adding opening slates to sequences

$
0
0

Hello,

 

I have built HTML panels for Adobe products before, specifically for Photoshop and InDesign so I have experience using the ESTK property explorer and passing message between node.js and the extendscript engine.

 

I manage a team that does some fairly repetitive work. We produce educational videos that are between 5 and 10 minutes long and sometimes there are 80 or more of them per month. Each one requires and opening slate, a fade in, and lower thirds to be imported at the same time.

 

I see this as a couple of steps and I'm not really sure I can do most of this using extendscript:

1. Iterate through the 80 sequences in the project (I can currently do this though it doesn't appear in the UI, I can see that extendscript is iterating)

2. Add a clip at the beginning of each sequence. This clip is our opening slate.

3. Shift the video in the sequence back by about 7 seconds, the length of our opening slate.

4. Add a fade effect to the video that I've shifted back.

5. Import a lower thirds clip onto the timeline at the appropriate time as well.

 

 

Is it possible to do steps 2-5? I don't see much around manipulating the video and timing of specifically selected sequences. If you can point me in the direction of where to look for timeline/effect manipulation in extendscript that would be very helpful. I suspect it isn't possible, but I thought I'd ask.

 

Thanks in advance for your help.

 

Graham

Need help with getting started plugin development!

$
0
0

Hello adobe community, I have an idea for a plugin that deals with clip transitions and I'm just getting into sdk stuff with no idea what to do. For starters, I've installed Microsoft Virtual Studio, but don't know where to go from there. I don't understand how to set up the example SDKCross-Dissolve plugin and how to implement the example into the actual Premiere Pro application. Also what purpose are environmental variables used? How do I get the API for Premiere Pro? Lastly, is it possible to code your own tool (like the select tool or slicer tool)? I know these are a lot of questions, but like I said this is my first time so any help is greatly appreciated!

How to get source clip times?

$
0
0

How to get source clip times, for sequence markers or player position or clip start and end points?

 

If I make a sub sequence and change start time, I lose original sequence time values.

 

so I need original clip times. Is there a way to get this?

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?

Extension blocking any keyboard input?

$
0
0

having a serious issue with a Adobe CEP extension I am building. Everything works, any sort of input (dropdown, drag and drop..etc) is fine. Except for text input. I would provide code, but I don't think has anything to do with the code at all. By text input, I just mean any text box you have. If you click on it, it focuses on the input but if you type anything you get that weird error sound. Another reason I don't believe this has to do with code is because no matter what state the extension is in, no matter what you type you get that error sound.

 

Any insight into this at all?


Navigating through multiple timelines.

$
0
0

Is it possible to manipulate the active panels through plugins or shortcuts? I'm trying to find/create a way to help editors go through multiple timelines with ease. Maybe a shortcut key that allows them to go back to the previous opened timeline.

 

I'm looking for a way to make this possible, can anyone point me to the right direction?

Sample plugins(SDK_CrossDissolve and Vignette) is not working without CUDA installed on MAC

$
0
0

Hi, everyone!.

 

I checked sample plugins for gpu acceleration on MAC. (SDK_CrossDissolve and Vignett)

On Premiere Pro CC( or higher version) It is working correctly if CUDA are installed. but it is not working without CUDA.

 

What is the reason? (I think it is very basic question because I am beginner on plugin.... )

 

Looking forward to hearing back.

 

Regards,

Igor.

[track].insertClip() & [track].overwriteClip() -- Quirks & Questions

$
0
0

Referencing insertClip and overwriteClip methods from CEP ExtendScript examples

 

Quirk:

It doesn't seem to matter whether you choose the target sequence's videoTracks or audioTracks.  Executing insertClip/overwriteClip always carries all picture and sound tracks from source clip to sequence.  The timeline track activators play no role.  For the purposes of a rough auto-assembly this is not a problem, even welcome.  Nonetheless..

Question:

Is there a way to be more articulate about an ExtendScript-driven auto-edit: i.e. a way to choose which source tracks are included / excluded?

 

 

Quirk:

It does matter which track layer is chosen.  Choosing videoTracks[0] or audioTracks[0] means a source clip with 1 picture track and 2 sound tracks will route to V1 and A1 / A2 on the record side.  Choosing videoTracks[1]/audioTracks[1] means Source V1/A1/A2 will route to Sequence V2/A2/A3

Question:

Is there a way to more definitively route source tracks to sequence tracks?

 

 

Quirk:

Editing to a Sequence time code of type string (https://github.com/Adobe-CEP/Samples/blob/master/PProPanel/jsx/PPRO/Premiere.jsx#L1433) does not seem to work as suggested in the CEP example.  The string is interpreted as 0 seconds.  Editing to a Sequence time code of type number (seconds) works as expected.

Question:

What happens if you edit to a sequence time that does not mesh with the frame rate of the sequence?  example instead of...

aSequence.videoTracks[0].insertClip(aProjectItem,8+(5/23.976));

          (i.e. A Project Item added to a sequence at 8 seconds and 5 frames in a 23.976 sequence)

you do the following

aSequence.videoTracks[0].insertClip(aProjectItem,8+(5/24));

          (i.e A Project Item added to a sequence at 8 seconds and not-exactly 5 frames of a 23.976 sequence.)

Is PPro automatically rounding the slight offset to the nearest accurate frame, or are you introducing a sub-frame offset of sound, and/or are you creating a technical problem that will haunt you at some point later in the post-production process?

Custom User Preferences

$
0
0

Hello friends.

 

 

I am trying to find documentation on how to save Custom User Preferences in PPro.

I usually create Scripts for AE and it can save Custom Settings for storing variables, or any type of string that can be used after the first script installation, using the function:

 

 

app.settings.saveSetting (sectionName, keyName, value)

 

 

Is there any function of the PPro SDK that allows something like this?

 

 

Regards,

 

 

Rubens Nobre

Adobe Premiere Scripting Guide

$
0
0

Hello, I have to write some scripts for Premiere. It will import, cut and set rendering. I can do it in after effects, because there is Adobe After Effects Scripting Guide for CS6.pdf , but I cant find anything similar for Premiere But scripting in premiere is possible. I can find some commands in Data Browser in ExtendScript Toolkit editor, but I dont know how can I use it. (Import, edit etc.) Is for Premiere any scripting manual ? If not, why? Scripting in Premiere is not official supported? Thanks.

Check if sequence is Empty at getPlayerPosition() ????

$
0
0

Hello my friends.

 

I'm trying to import a .mogrt into the sequence, but sometimes the track already has a video, and I do not want to overwrite it.

is there any method to check if the track is empty in getPlayerPosition () so I can create a new function that will create a new track above to import the new mogrt and not overwrite the previously imported video?

 

I do not know if i was clear.

I'm counting on your help.

 

Regards

 

 

Rubens Nobre

Duplicate clip

$
0
0

Hello,

 

I don't know how to duplicate clip in one sequence (of 2) which composed of several videotrack.

 

I have this script :

 

var first = app.project.rootItem.children[0];

first.setStartTime(20);

first.setInPoint(30);

first.setOutPoint(45);

var seq = app.project.activeSequence;

var vTrack1 = seq.videoTracks[1];

vTrack1.insertClip(first, '00;00;08;00');

 

 

This code will duplicate the clip 1 (children[0]) of the sequence 0 (rootTtem) on the sequence 1.

 

However, I would like to duplicate the clip 1 of the sequence 1 on the sequence 1.

 

I do not think I can use rootItem. I tried everything and do not know what to do

 

Do you know anything about that to destress me ?

 

Thank you


Automating actions without panels

$
0
0

For Premiere Pro CC 2019 I need to automate actions. I cannot use panels or other things that require clicking buttons. At first I thought can use extend script but it seems this is not possible that easily. In Photoshop, I can open a script directly with photoshop using the Script Utility from Apple and execute the apple script to open the extendscript through

osascript -e <script content>

But in Premiere it seems there is no way to do that. If I take the same approach, Premiere tells me that it cannot open js files.

 

How can I automate actions in Premiere so that I can exercise them from the command line?

Visual Studio Code failed to debug the Premiere

$
0
0

As mentioned, when I try to use visual studio code to debug the Premiere, a error box jumped out, "(#15) Cannot execute script in target engine 'main'!

 

My luanch.json is :

{

 

   "version": "0.2.0",

   "configurations": [

  {

   "type": "extendscript-debug",

   "request": "launch",

   "name": "Custom Debug",

   "program": "${workspaceFolder}/jsx/PPRO/Premiere.jsx",

   "stopOnEntry": false

  }

  ]

}

 

I also try to fix the bt.timeout in 002BTBackend.jsx, but it turns out to be the bt.timeout = 604800; // a week

 

So, is a problem about ExtendScript Debugger extension in vs code or a premiere problem?

Is there a call available for capture?

$
0
0

Dipping my toes back into PP scripting...

 

I want to leave PP capturing a timelapse from the SDI input - so 1 frame every minute.

 

I also work in tight turnaround and would like to be able to speed up how I capture clips via baseband.

 

Questions arising:

 

a. Is there a way to bind a script to a keyboard shortcut?

 

b. Is there a call to the capture interface?

 

Thanks for any help

Werid error with ExtendScript

$
0
0

I made a call to JSX like this:

In the JS,

 

csInterface.evalScript("$._PPP_.getProjectOut('" + 'Param in' + "')", function(e) {

 

                alert(e);

    });

 

 

In the JSX(Premiere.jsx):

 

getProjectOut:function(msg) {

 

    

         return msg+' Pr Out';

},

 

When the evalScript is executed,  alert shows: EvalScript error

 

Anything wrong with the jsx or js?bbb_999

How to get parent projectItem (bin) of a projectItem (sequence)?

$
0
0

I'm trying to clone() a sequence into the same bin as the original sequence.

 

When using clone() it places the copy of the sequence in the root of the project.

 

Is there a way to get the parent projectItem (bin) from the sequence projectItem to use in moveBin()?

 

I've tried to use the treePath of the sequence to get the name of the bin and then use the searchForBinWithName() function.

This did work, but in projects where there are multiple nested bins with the same name it won't be reliable.

 

Thanks : )

Viewing all 53010 articles
Browse latest View live


Latest Images

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