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

ExManCmd install a zxp file without specify the Premiere Pro CC's directory, any tips about primere's registry

$
0
0

As mentioned above, I'd like to find the directory of installation of primere. I'm not sure what's the registry entries that Premiere Pro cc will create.

Any Ideas?


Export frame

$
0
0

Hi all, is it possible to export a frame of the sequence using the SDK, implementing what a used can do using the Export Frame command?

Thank you in advance.

Screen Shot 2014-05-09 at 4.19.33 PM.png

 

Ale

Panel min width 132px?

$
0
0

Hi,

 

is there a reason why minimum panel width is 132px. The same is in After Effects, but not in Illustrator.

 

I'm trying to build UI with flex wrap buttons. At some point panel goes lower than 132px, but the readings got stuck at that number.132px.png

when rename the project item create by the PR plugin, no selector is triggered

$
0
0

I created a project item by a customized pr plugin. When I renamed the project item,  I no no response in my plugin, no selector is triggered.

Any suggestions?

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.


Downloading file with NodeJS in CEP extension

$
0
0

I'm trying to get file downloading with NodeJS working in my CEP extension for Premiere Pro CC 2015. I have the following script:

 

var http = require('http');
var fs = require('fs');
var file = fs.createWriteStream("file.jpg");
var request = http.get("http://i3.ytimg.com/vi/J---aiyznGQ/mqdefault.jpg", function(response) {    response.pipe(file);
});

 

The script works perfectly well if I run it on it's own. For example, if I put it in a file called test.js, and run node test.js in terminal, it successfully saves the image to the same directory the script is in.

 

When I include it in my CEP extension, however, nothing happens. The script executes without errors, but no file is downloaded anywhere. Even if I try:

try {     response.pipe(file);     alert("File downloaded");
} catch(e) {     alert(e);
}

 

The "File downloaded" alert pops up. So the lack-of-download doesn't seem to be from an error in the code, but perhaps in the way CEP works itself? I'm at a loss. Any suggestions?

 

Thanks!

Getting duration out of pproTicksIn/pproTicksOut

$
0
0

Hi there

 

I’m trying to get the duration of a clip from an exported finalcut pro xml out of premiere pro cc. Somehow it seems my following calculation is wrong. TICKS_PER_SECOND is 254,016,000,000 (Source Post).

 

TimeInSec = (pproTicksOut / TICKS_PER_SECOND) – (pproTicksIn / TICKS_PER_SECOND)

 

With example data attached that results in TimeInSec = 37.32. Adobe Premiere shows duration for that clip of “00:00:36:20” (920 Frames).

Is someone able to explain, how to calculate the same duration as premiere with the data given from an exported finalcut pro xml?

 

Thanks a lot

JW

 

Example ClipItem Node from exported xml:

<clipitem id="clipitem-13051" frameBlend="FALSE" premiereChannelType="stereo">

                <masterclipid>masterclip-4999</masterclipid>

                <name>Test_audio.wav</name>

                <enabled>TRUE</enabled>

                <duration>3750</duration>

                <rate>

                                <timebase>25</timebase>

                                <ntsc>FALSE</ntsc>

                </rate>

                <start>82</start>

                <end>-1</end>

                <in>0</in>

                <out>933</out>

                <pproTicksIn>0</pproTicksIn>

                <pproTicksOut>9479877120000</pproTicksOut>

                <file id="file-4999"/>

                <sourcetrack>

                                <mediatype>audio</mediatype>

                                <trackindex>1</trackindex>

                </sourcetrack>

                                <filter>

                                                <effect>

                                                                <name>Audio Levels</name>

                                                                <effectid>audiolevels</effectid>

                                                                <effectcategory>audiolevels</effectcategory>

                                                                <effecttype>audiolevels</effecttype>

                                                                <mediatype>audio</mediatype>

                                                                <parameter authoringApp="PremierePro">

                                                                                <parameterid>level</parameterid>

                                                                                <name>Level</name>

                                                                                <valuemin>0</valuemin>

                                                                                <valuemax>3.98109</valuemax>

                                                                                <value>0.530654</value>

                                                                </parameter>

                                                </effect>

                                </filter>

                <link>

                                <linkclipref>clipitem-13051</linkclipref>

                                <mediatype>audio</mediatype>

                                <trackindex>5</trackindex>

                                <clipindex>1</clipindex>

                                <groupindex>1</groupindex>

                </link>

                <link>

                                <linkclipref>clipitem-13063</linkclipref>

                                <mediatype>audio</mediatype>

                                <trackindex>6</trackindex>

                                <clipindex>1</clipindex>

                                <groupindex>1</groupindex>

                </link>

                <logginginfo>

                                <description></description>

                                <scene></scene>

                                <shottake></shottake>

                                <lognote></lognote>

                </logginginfo>

                <labels>

                                <label2>Caribbean</label2>

                </labels>

</clipitem>

<transitionitem>

                <start>990</start>

                <end>1015</end>

                <alignment>center</alignment>

                <cutPointTicks>121927680000</cutPointTicks>

                <rate>

                                <timebase>25</timebase>

                                <ntsc>FALSE</ntsc>

                </rate>

                <effect>

                                <name>Cross Fade (+3dB)</name>

                                <effectid>KGAudioTransCrossFade3dB</effectid>

                                <effecttype>transition</effecttype>

                                <mediatype>audio</mediatype>

                                <wipecode>0</wipecode>

                                <wipeaccuracy>100</wipeaccuracy>

                                <startratio>0</startratio>

                                <endratio>1</endratio>

                                <reverse>FALSE</reverse>

                </effect>

</transitionitem>

 

<!-- Further clipitems -->

Premiere Pro & ExtendScript

$
0
0

Notice the following section of code:

 

for (i = 0; i <= app.project.rootItem.children.numItems; i++)

    {

        if (app.project.rootItem.children[i].getMediaPath().indexOf('(PREV)') > -1)

    {

        var BCVpath = "D:\4) Videos\Dummy(PREV).psd"

        app.project.rootItem.children[i].changeMediaPath(BCVpath);

    }

    }

 

What I intend for this to do is search through all of the currently imported files in the current project and, once a file containing the text "(PREV)" is found, replace that file with another one at a specified, absolute, hard-coded directory.  However, the script has two problems:

 

  1. Upon running the code from ExtendScript, I receive this error in Premiere Pro.  I have only one file containing the text "(PREV)" imported into my project.
    7f4cbfddb9614afbbf1d7831ac970e3e.png
  2. Which is then followed by an error that only appears within ExtendScript (after clicking OK on the dialogue box):
    8dc0d140d4b547bbb540bbe9e7ad7b33.png

I do not understand how to create an absolute file path reference for use with the .changeMediaPath()

I also cannot figure out why ExtendScript gives me the undefined is not an object error AFTER it has already "successfully" executed the entire script.  Can somebody please offer some insight as to what I need to fix since there is so little documentation for Premiere Pro and ExtendScript?


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!

Change media Start/End with xmp

$
0
0

I was wondering if it possible to change the media start/end point of an offline clip with xmp.  The goal would be to decompose the clips, using the video In/Out to set the media start/end.  I thought the code below would work but only the tape name is changed.  Any help would be appreciated. 

 

Screen Shot 2018-02-18 at 9.17.31 AM.png

Including Multiple JSX Scripts

$
0
0

I've encountered three methods:

  1. //@include path/to/file-to-include.jsx
  2. #include path/to/file-to-include.jsx
  3. $.evalFile("path/to/file-to-include.jsx");

 

Some questions:

  1. Is having multiple <ScriptPath> elements in the manifest file supported?
  2. What is the recommended way to include multiple JSX scripts?
  3. Where can I learn more about the ExtendScript environment - features beyond the standard ECMAScript implementation (e.g. this include stuff)?

export frame from premiere pro

$
0
0

Hey,

I'm trying to export a frame from a sequence, based on a code i found in the examples,

 

app.enableQE();

var activeSequence= qe.project.getActiveSequence(); // note: make sure a sequence is active in PPro UI

 

if (activeSequence) {

var time= activeSequence.CTI.timecode; // CTI = Current Time Indicator.

var outputPath= new File("~/Desktop");

var outputFileName= outputPath.fsName + $._PPP_.getSep() + time + '_' + activeSequence.name;

 

activeSequence.exportFramePNG(time, outputFileName);

} else {

alert("No active sequence.");

}

 

And it doesn't do anything. It doesn't throw any errors either, i played around a bit and it's clear that the function exportFramePNG exists, and that the parameters are ok, but nothing happens.

 

when I do

$.writeln(activeSequence.exportFramePNG(time, outputFileName));

it returns false.

 

What's wrong, what can I do?

 

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);

myFile.Copy() has any size limitation?

$
0
0

Hi,

i'm using this function to copy some file(on hard drive), but i noticed files that are big (6GB+) are not fully copied but truncated. Other files that are about 4,5 GB are copied without issue. The drive is NTFS formatted.

 

Thanks!

Loop through opened projects

$
0
0

projects

 

app.projects

Description

An Array referencing all open projects.

Type

Array (of Project objects); read-only.

  • I open 2 projects
  • I execute in my code
    app.projects.length;>>> undefined
    typeof app.projects;>>> [object ProjectCollection]
    Array.IsArray(app.projects);>>> false

 

I had to stringify the object to find out that there was a numProjects property I could use.

 

Is there anywhere a reliable documentation ?

 

(please don't tell me to look at all examples, you are professionnals)

 

Message was edited by: paul charmoille format


HTML5 Panel passing JSON data to javascript

$
0
0

Hi Bruce,

 

I will soon be working on an HTML5 panel that will be receiving some JSON data through a URL call.

Is there a way to pass this JSON data to the javascript portion of the panel, so I can access all the objects?

 

thanks,

Kelly

How to enable NodeJs for HTML5 Panels

$
0
0

Hi All,

We are trying to implement downloading assets from url, in our Premiere pro Panel.

From the premiere pro sdk forum we came to know that by using NodeJs we can implement this feature(Downloading file with NodeJS in CEP extension )

Also we have gone through the github sample Nodejs.html (Samples/Nodejs.html at db6086245ee6b64466710056f60ca324fce12880 · Adobe-CEP/Samples · GitHub )

 

Here is the code and Panel screenshots:

function isNodeJSEnabled() {

  if (typeof(require) !== 'undefined') {

  $('#result').val("Node.js is enabled");

  } else {

  $('#result').val("Node.js is disabled");

  }

  }

Nodejs.PNG

 

But when we run the code from our panel, we are getting the message  "Node.js is disabled".

We have added the following values in manifest file

<CEFCommandLine>

  <Parameter>--enable-nodejs</Parameter>

  </CEFCommandLine>

Downloading file with NodeJS in CEP extensionBut still we get the same result. "Node.js is disabled"

We are testing the panel in Windows 7,Adobe Premiere pro CC 2015.2 (9.2.0(41))

 

What are the steps we need to take care in-order to enable NodeJs in our panel?

 

Thanks and Regards,

Anoop NR

Usage of CEFCommandLine parameters

$
0
0

Hi All,

 

Can someone explain use of below two CEF command line parameters in manifest.xml?


(1) --allow-file-access

(2) --allow-file-access-from-files

 

Premiere Pro version: 11.1.0

Extension Type: Panel

 

 

Thanks & Regards,
Meet Tank

Open additional window when opening multiple projects from extendScript.

$
0
0

I'm running app.openDocument(premiere_project_path) to open a project. That is working well. But if I already have project open it will close that and open the new project in it's place. Is there a way to open projects in a new window if another premiere instance is already running?

linkMedia with script in premiere pro

$
0
0

hi,

I'm trying to link a offline media with scripting, I already found its command:

 

 

app.enableQE();

var item = qe.project.getItemAt(1);

item.linkMedia("D:/for test/Motion Graphics Template Media/0901609e-5331-6b73-38f5-873fd6a1d553/Blur_IN OUT_Animation 01-Arial-Black.aegraphic");

 

in the console, it returns true, but nothing happens in the premiere pro.

 

any idea?

 

thanks

Viewing all 53010 articles
Browse latest View live


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