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

Node JS error: "require is not defined"

$
0
0

I'm not sure when it stopped being an available function, but at one point I was able to run Node JS "require" command in the browser context.

So the following...

require("child_process");

...used to work, but now returns an error: "Uncaught ReferenceError: require is not defined"

 

The manifest.xml does include the two lines (Per David Barranca's HTML Panel Tips #19: CC2015.1 (CEP6.1) Node.js Fixes | Photoshop, etc. )

<Parameter>--enable-nodejs</Parameter><Parameter>--mixed-context</Parameter>

 

Did something change?  Any ideas why it would have stopped working?


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?

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

Automate Title Creation

$
0
0

Hi all,

Is it possible to develop an import plugin to generate titles and populate them with text?  If so, where can I find a bit of information on how to begin with this?

 

The goal will be to parse an excel sheet and generate titles.

 

Thank you!

Change frame rate of a Sequence

$
0
0

Hello again!

 

Would like to know: is it possible to change frame rate of a Sequence via scripting?

I need to set a custom number of frames. If I understand it correctly the choice is limited by the timedisplay table from the guide (100 TIMEDISPLAY_24Timecode, 101 TIMEDISPLAY_25Timecode, etc). But may be i need a 100 fps or 120?

 

Thank you!

cannot get CSInterface to open extension server invisibly alongside panel

$
0
0

I'm trying to start a nodejs server alongside my panel. According to the tutorial on https://medium.com/adobetech/how-to-build-a-node-js-server-in-a-panel-ba1d63ea67e2 I should be able to accomplish this via using an invisible html page that loads the nodejs server.

 

I've tried this, but I can't get it to load, and I don't get a lot of feedback on this, so I'm thinking it fails on the actual loading of the extension with CSInterface.

 

manifest.xml: contains both the main extension as well as the server extension. Nodejs and mixed content enabled on both

 

 

<?xml version="1.0" encoding="UTF-8"?>

 

<ExtensionManifestVersion="9.0"ExtensionBundleId="com.Limecraft.Panel"ExtensionBundleVersion="1.0.0"

        ExtensionBundleName="LimecraftPanel"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <ExtensionList>

        <ExtensionId="com.LimecraftPanel.extension"Version="1.0"/>

        <ExtensionId="com.LimecraftPanel.server"Version="1.0"/>

    </ExtensionList>

    <ExecutionEnvironment>

        <HostList>

            <HostName="PPRO"Version="13.0"/>       

        </HostList>

        <LocaleList>

            <LocaleCode="All"/>

        </LocaleList>

        <RequiredRuntimeList>

            <RequiredRuntimeName="CSXS"Version="9.0"/>

        </RequiredRuntimeList>

    </ExecutionEnvironment>

    <DispatchInfoList>

        <ExtensionId="com.LimecraftPanel.extension">

            <DispatchInfo>

                <Resources>

                    <MainPath>./client/html/index.html</MainPath>

                    <ScriptPath>./jsx/index.jsx</ScriptPath>

                    <CEFCommandLine>

                        <Parameter>--allow-file-access</Parameter>

                        <Parameter>--allow-file-access-from-files</Parameter>

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

                        <Parameter>--mixed-context</Parameter>

                    </CEFCommandLine>

                </Resources>

                <Lifecycle>

                    <AutoVisible>true</AutoVisible>

                </Lifecycle>

                <UI>

                    <Type>Panel</Type>

                    <Menu>Limecraft Flow</Menu>

                    <Geometry>

                        <Size>

                            <Height>600</Height>

                            <Width>600</Width>

                        </Size> 

                    </Geometry>

                </UI>

            </DispatchInfo>

        </Extension>

        <ExtensionId="com.LimecraftPanel.server">

            <DispatchInfo>

                <Resources>

                    <MainPath>./client/html/localServer.html</MainPath>

                    <CEFCommandLine>

                        <Parameter>--allow-file-access</Parameter>

                        <Parameter>--allow-file-access-from-files</Parameter>

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

                        <Parameter>--mixed-context</Parameter>

                    </CEFCommandLine>

                </Resources>

                <Lifecycle>

                    <AutoVisible>false</AutoVisible>

                </Lifecycle>

                <UI>

                    <Type>Custom</Type>

                    <Icons/>

                </UI>

            </DispatchInfo>

        </Extension>

    </DispatchInfoList>

</ExtensionManifest>

 

 

 

index.html: The main page of the app. This one works as normal. It loads the CSInterface.js & jquery, and should open the server extension as written in the manifest, but I'm pretty sure it's this step that doesn't work. Not getting any feedback whatsoever here.

<!doctypehtml>

 

<html>

<head>

    <metacharset="utf-8">

    <title>Limecraft Flow - Login</title>

 

    <scriptsrc="../../lib/CSInterface.js"></script>

    <!-- <script src="./js/app.js"></script>-->

    <scriptsrc="../../lib/jquery-1.9.1.js"></script>

    <script>

        //Open server extension

        console.log("opening server extension")

console.log(__dirname + '\\client\\html\\testnode.js');

        varcsInterface = newCSInterface();

        csInterface.requestOpenExtension("com.LimecraftPanel.server");

    </script>

 

 

 

 

localServer.html : Should get loaded via the CSInterface script, but no logs get triggered, and most likely doesn't get loaded at all.

<!DOCTYPEhtml>

 

<html>

<head>

   <metacharset="utf-8">

   <!-- <script src="testnode.js"></script> --><!-- Tried loading it like this, but also no feedback, so pretty sure this file doesn't get loaded. -->

   <script>

   /*As you can see in the <MainPath> tag of the manifest.xml above, when a CEP method is called in your JavaScript file,

  another HTML markup will be loaded from ./client/localServer.html.

  Note that we addedlocalServer.html` when we updated the directory structure.

  You might wonder why you have to write another HTML file for the server extension.

  The purpose of this HTML file is to start your server and stay hidden.*/

 

   /* This script uses cep_node to start the Node.js server located at '/server/main.js' */

   console.log("=============================");

   console.log("SETTING UP LOCAL SERVER");

   varlocalServer = cep_node.require(__dirname + '\\client\\html\\testnode.js')();

   </script>

   <title>node server app</title>

</head>

<body>

</body>

</html>

 

testnode.js : The testcode for the server, this one works both via terminal command as well as via loading it directly via <script> tag in the main app, meaning it most likely just doesn't get loaded along with the LocalServer.html

consthttp = require('http');

 

 

consthostname = '127.0.0.1';

constport = 3000;

 

constserver = http.createServer((req, res) => {

res.statusCode = 200;

res.setHeader('Content-Type', 'text/plain');

res.end('Hello World\n');

});

 

server.listen(port, hostname, () => {

console.log(`Server running at http://${hostname}:${port}/`);

});

 

 

the localserver doesn't get loaded via any means,leading me to believe that this is some problem with CSInterface or a fault in my manifest.xml code, but I see nothing I'm doing wrong here. Am I missing something?

Apple Metal 2 support for developing plugins?

$
0
0

So after Apple discontinued support for Nvidia drivers and seemed to stopped focusing on OpenCL too, I'd like to run Deep Learning inference through CoreML with Metal GPU acceleration for a MacOS Premiere Pro (and After Effects) plugin I will be developing soon.

 

But after reading the docs I haven't read anything about Metal, though the option in the project settings is there.

 

Will it take some time before plugin developers can utilize Metal?

 

I will just work with CoreML so I don't really need a lot of examples or documentation I suppose..

 

Thanks!

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


Custom overlays and modifying Safe Margins?

$
0
0

Hi folks,


I had a quick question and haven't been able to find proper information when researching... but would creating custom overlays and modifying the safe margin be theoretically possible within the SDK? If so what approach would be taken to do so?

 

If there is documentation on creating things such as this, and I've missed it, I apologize for wasting your time - however pointing me in the right direction would be much appreciated!

 

Thanks in advance.

Lock / Unlock audio or video track

$
0
0

I was surprised after searching the forum that this question hasn't already come up.

 

I checked the sample and reflections but could not find any methods that would allow me to lock or unlock specific tracks, much like the setMute() / isMuted() code in the sample.

 

Do we have this capability? Would be a huge help.

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?

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!

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?

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

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?Bruce Bullis


How hard is it to sell plugins?

$
0
0

Hi, I'm a compositor/editor (and a VJ on weekends) I had an idea for a really handy plugin strike me today, infact it's the second editing plugin I have thought of. It's being a few years since I've done any coding, but I am contemplating having a look into the sdk and having a go. I'm wondering before I spend the time and effort on it, is there any real way to get them out there? I know of www.toolfarm.com, I'm not expecting to make more fortune or anything, just wondering if it is possible to make enough to justify the time?

How do I add imported files into sequences using Premiere Pro's ExtendScript connection?

$
0
0

Really want to know the answer to this.... I'm trying to create a script (in ExtendScript for Premiere Pro) that will load in specified video files, clip them at specified start and stop times, place them into a sequence, and then export the resulting movie.

I understand that Adobe doesn't have official documentation about scripting for Premiere Pro, so I've been working from the data browser (in the ExtendScript Toolkit, or ESTK) and a collection of handy references I've found at links like this:

http://webcache.googleusercontent.com/search?q=cache:http://cssdk.adobesites.com/sdk/2.1/d ocs/WebHelp/references/csawlib/com/adobe/premiere/App.html

(You can replace the "App" there with other class names, but they always have to be correctly capitalized, like "Project" or "TrackCollection". The pages list properties and methods for the classes, and are the only place I've been able to find what kind of parameters/arguments the methods expect.)

I have successfully loaded in the CSV file that specifies the needed info. I also know how to import the video files and create a new sequence (as explained here: http://forums.adobe.com/thread/1177191). The trouble I'm having now is getting the imported files clipped correctly and placed into the sequence. (I see that the activeSequence has methods like setInPoint and setOutPoint, but that doesn't seem to result in the correct trimming upon export.)

Here is my code (with comments to show flow of overall script):

#target premierepro var myDir = "G:\\directoryWithVideoFiles\\"; // defined "indexOf" subfunction here // ***** begin main body of script ***** // (dataRuns has fields runName, startVideo, startTime, stopVideo, stopTime) // Import video files listed in dataRuns var vidFiles = new Array; for (i=0; i<dataRuns.length; i++) { if (indexOf.call(vidFiles,myDir + dataRuns[i].startVideo + '.MPG') == -1) { vidFiles.push(myDir + dataRuns[i].startVideo + '.MPG'); } if (indexOf.call(vidFiles,myDir + dataRuns[i].stopVideo + '.MPG') == -1) { vidFiles.push(myDir + dataRuns[i].stopVideo + '.MPG'); } app.project.createNewSequence(dataRuns[i].runName,''); } app.project.importFiles(vidFiles); // at this point, for each run (called runName) I need to: // - take a clip of the startVideo from the startTime to the end of the video // - take a clip of the stopVideo from the start of the video to the stopTime // - put clip 1 at the beginning of the associated sequence, & clip 2 right after // - export the sequence as a new video file

Delete sequence in Premiere Pro using ExtendScript

$
0
0

My work is almost done, but there is one simple question, how to delete the sequence using ExtendScript?

In my script I can clone it, rename, move new footages, pictures, wav's etc., but I can not delete it.

In Data Browser (ExtendScript) there's app.project.deleteSequence(), but what are the arguments for this function? I know about QE and I found just one thread about it (https://forums.adobe.com/thread/1977423?start=0&tstart=0), there's no answer how it works. For many years I'm waiting for the manual for Pr like an After Effects Scripting Guide=(


In my project there is a sequence I need to make a copy, create some footages and titles, then rename cloned sequence, export it as Premiere Pro project and delete from this one. Everything works perfect except the last one.

This is the part of code:

 

app.project.activeSequence.clone(); // create "old_seq copy" from "old_seq"
var nI = app.project.rootItem.children.numItems;
for (var i = 0; i < nI; i++)       {         if (app.project.rootItem.children[i].name == "old_seq copy")             {              var item = app.project.rootItem.children[i]                     item.name = "new_seq";             }       }
--------------------------------------------------------------
/*--*/
for (var i = 0; i < nI; i++)      {       if (app.project.rootItem.children[i].name == "new_seq")            {             app.project.deleteSequence(); //<--- this is just an example of the line, but how to delete "new_seq"?            }       }

 

I found nothing about it in PProPanel. Is it possible at all?

Thank you!

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

Running a .jsx in Premiere outside of ExtendScript

$
0
0

Has anyone figured out a way to run a script in Premiere outside of Extendscript?

 

I am trying to tie the file to a Keyboard Maestro or Applescript shortcut and it wont go through. I'm sure this is because Extendscript has its own processes to get it to link, but I'm wondering if anyone has developed a workaround?

 

If I figured out how to set up an HTML panel extension in premiere would a button even be able to run these scripts without extendscript?

Viewing all 53010 articles
Browse latest View live


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