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

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!


Javascript error that happens in Premiere but not in Chrome.

$
0
0

Hi,

 

I am working on a Premiere Pro panel and I basically want to upload a selected file from the current project to a remote server. Using a html input file tag and select a file works fine to upload a file. 

 

So my idea was to create a File object which i would then upload.  Something like :

upload() {

    var path = '/Users/me/my_file.mp3';

    // read all bytes from file likely using : window.cep.fs.readFile(path)

    var file = new File ([data], 'my_file.mp3');

     // call POST to start upload. That part is done and work.

}

 

As I am going step by step, my current code looks like :

upload() {

    var file = new File( ['my random content'] ,'random_name.txt');

     // call POST to start upload. That part is done and work.

}

 

It works works fine if run it in up to date Chrome (I also tried with an much older version (41.0.2272.89), which works too). Unfortunately, it crashes in Premiere and I have no clue why.

 

The crash happens on this line :

var file = new File(['my random content'], 'random_name.txt');

(a basic copy/paste in chrome console show that it works on regular chrome, and crash when paste in the remote debug console.)

 

with this error message :

Uncaught TypeError: File constructor cannot be called in nwdisabled frame.

message: "File constructor cannot be called in nwdisabled frame."

stack: (...)

get stack: function () { [native code] }

set stack: function () { [native code] }

__proto__: Error

VM110:2(anonymous function)

VM77:847InjectedScript._evaluateOn

VM77:780InjectedScript._evaluateAndWrap

VM77:646 InjectedScript.evaluate

 

Any explanation and suggestion to work around that issue would be greatly appreciated.

Can a custom HTML panel fill in Live Text Templates fields?

$
0
0

Is there any way a custom HTML panel fill in Live Text Templates fields?

Getting returned values from evalScript calls

$
0
0

I have a few functions that return bits of information from the JSX context to the panel JS so that they can be further processed there. One such function returns an array of times-in-seconds (Array<number>). I have verified with console.log that I do indeed get the results back. However, while I was expecting an Array<number> in the callback, the type of the value passed to the callback is string!

 

Is it possible to get objects in the callbacks or will everything simply be coerced to a string? If the latter, is there a suggested way to convert and then reconvert the data? (I looked but didn't see a JSON utility object/class in the JSX context to assist with this...)

help - Finding a syntax error in a jsx file - just getting a dialog

$
0
0

I

I'm starting to debug my first Premiere Pro Panel

 

When my panel opens up (and also after I refresh it) I get a dialog box saying Exception:SyntaxError: Expected: ;

- so - I've got a syntax error in one of my ExtendScript  jsx (application) files - but how can I see where it is ?

I'm using both the chrome remote debug, andthe extendscripto toolkit but it's happening from within the call to CSInterface.prototype.evalScript, and neith of these tools picks up a problem of any sort

 

I tried to load the file into a normal chrome browser -  but it did not complain about any problem at all

 

Thanks

Yonatan

Premiere Pro event list?

$
0
0

In the PProPanel sample (github.com/Adobe-CEP/Samples/blob/master/PProPanel/ext.js) there are sample event hooks for "com.adobe.csxs.events.PProPanelRenderEvent" and "com.adobe.csxs.events.WorkspaceChanged" events but these aren't listed in http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/cs-extension-builder/ pdfs/CC_Extension_SDK.pdf  or anywhere else that I've seen.

 

Are there Premiere Pro events for post-export functions, eg. Final Cut Pro XML or EDL export?

 

Where can I find a list of supported event types fired by Premiere Pro? Alternatively is it possible to have a "wildcard" event handler which is called for all application event types?

 

 

Question about node.js implementation in .jsx file.

$
0
0

Hello ,

I have a question regarding node.js implementation in a Premiere Pro panel.

I use classic file structure as i have a html file and a jsx file for scripting that is invoked with evalScript.

It seems that node.js does not work in the jsx file as when I try to use require I get an error that require is not a function,

but if I use it in html file in <script></script>  it works fine.

Does anyone know why this happens and how how to fix this?

 

Also I had an idea to have all script in the html file but It appears that I can't access any Premiere functions as I get an error "app is undefined" (again, this works fine in the jsx file).

 

Best Regards,

Klemen

"onProjectChanged" event

$
0
0

Hello guys,

 

I've noticed in the last commit of GitHub - Adobe-CEP/Samples: Code samples for CEP extensions new event called "onProjectChanged" with a commented out line at Samples/Premiere.jsx at master · Adobe-CEP/Samples · GitHub . I've decided to test this new (?) functionality (I'm using Adobe Premiere Pro CC Version 12.1.1) and removed the slashes. I've expected, that this event will be triggered by any kind of project manipulation, however it wasn't triggered at all: I've tried changing sequences, adding another video to the project, renaming sequences etc. Is there anything I'm doing or understanding wrong?

 

Regards

 

Ilya


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

Fix for ExtendScript Toolkit error

JSON Undefined error in Premiere pro 13.0.2

$
0
0

Hi All,

 

In some system we are getting JSON is undefined message in the extendscript functions.

In two machines running in the same version premiere pro 13.0.2(Build 38) one is having this issue and the other system works fine.

We have faced this problem several times, but its not consistent and not happening in all system.

 

Thanks and Regards,

Anoop NR

Scripting changes coming to Adobe video applications

Scripting - Dive into nested sequences

$
0
0

Hi guys, i have a problem with scripting.

 

I want to check some property of the clips in my active sequence and the relative nested sequences.

I know how i can loop trought the clips and property in the active sequence, but i don't know how to enter in the nested sequence and make some check and operations.

I don't know the right syntax, can you help me?

 

Thank you

Scripting - Dive into nested sequences

$
0
0

Hi guys, i have a problem with scripting.

 

I want to check some property of the clips in my active sequence and the relative nested sequences.

I know how i can loop trought the clips and property in the active sequence, but i don't know how to enter in the nested sequence and make some check and operations.

I don't know the right syntax, can you help me?

 

Thank you

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


Understanding the interaction between ext.js, index.html, and Premiere.jsx

$
0
0

Hello, I am a game developer with minimal Javascript experience. I find myself needing to create panels for Adobe Premiere Pro and am having some difficulty in understanding how these script communicate. I have managed to create a new panel using the manifest.xml file and Frankenstein's Monster together home HTML in the index to show up as a hello world button and graph.

 

However, when I click the button I get that  "$._PPP_.helloWorld is not a function." I have also managed to get the "Undefined is not a object" message when I remove the PProPanel from the extensions file path (My panel is called Test and largely is just PProPanel copy and pasted). I changed the name of the function block in PremiereTest.jsx and once again got the Undefined error message. If I could get the basic explanation of how these scripts interact and call on each other I would be in a much better position.

 

It seems like Manifest is setting the Index and PProPanel (Which I have no idea what this does either). ext.js is calling Premiere.jsx (I think this is where my problem is occurring, I'm losing the connection between these in my renaming). Any help for a newby at this would be much appreciated. Thanks.

Copy files on hard drive throught script code

$
0
0

Hi guys,

 

i have an array populated with media that i would like to copy in another folders on hard drive. Is possible throught scripting to copy files on disk?

 

Thank you

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!

Dummy importer

$
0
0

Hi folks,

 

I'm trying to write a dummy importer that would essentially only put a file pointer in the project for reference and archival purposes, like FCP XML translations results text file which gets imported into the project.

 

I thought that perhaps setting hasVideo and hasAudio as false would do the job, but I keep getting the "Importer returned generic error" in Premiere and "file cannot be imported - this file is damaged or unsupported".

 

Currently the entry function looks like this:

     switch (selector)     {          case imInit:               result =     SDKInit(stdParms,                                         reinterpret_cast(param1));               break;          case imGetInfo8:               result =     SDKGetInfo8(stdParms,                                              reinterpret_cast(param1),                                              reinterpret_cast(param2));               break;          case imGetIndFormat:               result =     SDKGetIndFormat(stdParms,                                                   reinterpret_cast(param1),                                                  reinterpret_cast(param2));               break;          case imGetIndPixelFormat:               result = imUnsupported;               break;          // Importers that support the Premiere Pro 2.0 API must return malSupports8 for this selector          case imGetSupports8:               result = malSupports8;               break;     }     return result;
}

 

And only these 3 selectors are supported:

imInit

imGetFormat

imGetIndFormat

 

imInit and imGetIndFormat work fine, because the importer is added to the list, and attempts to open the file. And the imGetFormat looks like this:

 

          prMALError                         result                    = malNoError;     SDKFileInfo8->hasAudio               = kPrFalse;     SDKFileInfo8->hasVideo               = kPrFalse;     return result;

 

Obviously I'm missing something, can anyone help me?

export all segments of a sequence as different files in one click

$
0
0

Hello!

 

I need to export all segments of a sequence as different files in one click.

 

Here is what I want to accomplish in more details:

I have a sequence with a single long video file in it. First, the sequence is cut to pieces by an editor. Then, each piece is given a name manually. We can assume that no transitions or any kind of effects are applied to segments.

 

And I would like to run a script( or plug-in) and export all of the segments as separate files to the specified directory with the given names.

 

I checked out the forum and found out that  something similar has already been discussed, but the solution went to private messages:

    - export based on in/out points in the time line using scripting

 

Could anyone provide some references or the steps to solve the problem?

 

Or if one can share an example or sample code it would be really cool!

 

More specifically:

Do I have to use scripting or SDK to accomplish the task?

How to retrieve all segments of a sequence with in and out frames?

Can I sequentially render them?

Can I specify a preset to use for rendering?

Viewing all 53010 articles
Browse latest View live


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