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

Windows PlayMod Question

$
0
0

Hi Zac,

 

I have a general question concerning PlayMods on Windows. I was wondering if there was anyway on Windows for a PlayMod to explicitly make a request to PPro for a new window handle for either the program monitor or source monitor that is internal to the PPro app UI? When a PlayMod instance is instantiated we get a window handle, but can a PlayMod ask for (and receive) a new window handle at an arbitrary time?

 

The reason for this is so that the PlayMod can use the self-same window handle that is passed in as the window into which it draws in any and all usage cases. On Windows a window DC can only have its pixel format set once and attempting to set the pixel format a second time leads to undefined behavior at best. With the different 3D playback options we offer in our PlayMod, there are at least 2 different pixel formats we must switch between to drive the different playback types capable of being dynamically set in a PPro session. It is through the dialog that we pop up during a call to playGetFilePrefs() that we allow switching between these playback formats, and thus pixel formats, and from my experience this call doesn't cause a refresh of the window handles (automatically, at least). Is there a way, perhaps in returning from the call to playGetFilePrefs(), to request new window handles?

 

To work around this I have been creating my own window that has as its parent the window handle passed into the Playmod. This works for most situations as I can create and destroy these windows at will, but causes the need for extra overhead to get the window positioned properly. Additionally, I have not yet been able to get my windows to become completely click-through which often hampers the case where a user would double click on the program monitor to bring up the handles that allow for interactive scaling and motion to be applied to a clip. In fact, seeing how the interactive scaling and motion works with a stock Adobe PlayMod, I am not sure if I were able to make my window completely click-through if this would even be enough to get the behavior to where it should be if I were able to draw directly into the window that is passed into the playmod instead of throwing up my own window.

 

This problem is not present on the Mac due to the way windows, contexts and pixel formats are handled OS-wise.

 

Thanks,
Josh


Multiple Outputs in Encoder

$
0
0

I know the following code in the sample panel will allow you to render a sequence in Media Encoder, however is there a way to add multiple outputs/presets so that one sequence can render to multiple files?

 

Sample Code:

app.encoder.encodeSequence( app.project.activeSequence, fullPathToFile,                            outPreset.fsName, app.encoder.ENCODE_WORKAREA, 1);

 

I tried duplicating this snippet, however it just creates multiple render jobs in encoder, not multiple outputs.

 

What I'm trying to achieve looks like this in AME:

Screen Shot 2017-03-31 at 10.12.34 AM.png

Any input is appreciated.

 

Thanks,

 

Justin

Keyboard Shortcut Conflicts

$
0
0

Is there a way to override Premiere Pro shortcuts when your custom CEP Panel is in focus? For instance, I'm trying to get the Cmd+Z and Cmd+Shift+Z shortcut for a text field in my panel, but it keeps triggering the Premiere Pro undo command instead.

 

  $("#editor").on("keyup", function(e){       e.preventDefault();       if(e.keyCode == 91 && e.keyCode == 90)       {       undoEdit();       }  });

 

I know the code works since I tested it with each key individually, and I believe e.preventDefault() is supposed to allow this, but it's not working in my case. Any thoughts are appreciated. Thanks!

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!

Having trouble deleting transitions with the api

$
0
0

Hi friendly Adobe peeps,

 

I'm having trouble deleting transitions with the Premiere api. I've been using QE, thusly (simplified from a loop):

 

app.enableQE();

qe.project.getActiveSequence().getVideoTrackAt(0).getTransitionAt(0).remove()

 

... & it works but there is a memory leak, so I can't run the script twice. I chatted to bbb_999 offline & he suggested I don't use QE, so I've got this now:

 

app.project.sequences[0].videoTracks[0].transitions[0].unbind(true)

 

... which returns Undefined and the transition isn't deleted. I suspect I'm not passing the correct parameter to the unbind method. Any help would be appreciated!

 

As a side question: how do I find the arguments list for methods, since there is no documentation? I'm getting pretty exhausted browsing the DOM in ExtendScript Toolkit and then guessing what method arguments might be.

 

Cheers,

Raphael

PProPanel sample updated for 11.0 (CC 2017)

$
0
0
https://github.com/Adobe-CEP/Samples/tree/master/PProPanel

https://github.com/Adobe-CEP/Samples/tree/master/PProPanel

 

New stuff!

 

  • Panels can now access and modify nearly all characteristics of clips in sequences (without resorting to QE DOM subterfuge)
  • Get/set param values and keyframes
  • The Encoder object can now render any projectItem; you can also just have it transcode a file path
  • Get/set selection, within the timeline

 

Some general sample improvements as well. I show how panels can emulate PPro's new ingest functionality, and I've added a listener for a Vulcan-based message, sent by the After Effects sample panel (which I'll be updating soon).

SDK Panel only works when ExtendScript Toolkit is open

$
0
0

Whenever I open Premiere Pro and try to use the SDK Panel I've created, I keep getting the notification: "Run Script Error: undefined is not an object". When I open Extendscript Toolkit, however, it functions fine. Do I have to finalize my project before it can run with just Premiere Pro, or what am I missing here?

 

Thanks,

 

Justin

HDR video export...

$
0
0

How do I get Premiere to give me high range pixels out of ->RenderVideoFrame() ?  I have selected the PrPixelFormat_BGRA_4444_32f pixel format, so I assumed I would get pixels with values above 1.0f (using some high color depth Red files).  Is there another flag I need somewhere?

 

Thanks!


Panel Notification when Sequence Selection Changes?

$
0
0

We would like to add some functionality to our extension panel that allows it to reflect the selection state of the TrackItems in the active sequence. While CSInterface has a CSEvent definition, I found this old discussion which seems to indicate that CSEvents have no effect in Premiere. Is there a different way to register for such events?

 

Or is the only option a polling one (whether the polling be done on the ExtendScript [APP] side or the JavaScript [HTML] side)?

Placing/moving clips in a sequence at sub-frame accuracy

$
0
0

Hi all, anyone got a workaround using supported or unsupported APIs to place or move a clip in a sequence using seconds or ticks instead of timecode?  Working with audio files and need to place items very accurately on the timeline.

 

1st try: Got clip placement working but can only give times in TC ie snapped to frames

2nd try:  Can set the CTI using ticks which is great, can omit a start time when placing a clip which uses the current CTI, BUT the placed clip time still snaps to frames .

3rd try: Call a Powershell script which "presses" the "," key which accurately inserts a clip to the current CTI, but can't change the track targeting programmatically so has limited use besides the obvious hackz.

 

PS: This is all while "Show Audio Time Units" is active for the sequence.

PPS: I've tried the alignToVideo = false option of the insert function and doesn't  seem to do anything

 

Any help is appreciated.

 

TNKS!

 

G

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

Where to put #include/script src statement

$
0
0

This will probably be a confusing question, but I'm going to give it a shot.

 

In my panel development, I use the PProPanel as a base to start developing. 

In that 'package', I have:

ext.js

index.html

PProPanel.jsx

Premiere.jsx

plus other files and folders.

 

In my development, I have created a library of custom functions that I use across multiple panels.

(example: myPProFunctions.js, myAEFunctions.js, myCommonFunctions.js)

I add this to individual panels by using an #include line, usually in the Premiere.jsx or the AE.jsx.

However, I've created some library functions that I can utilize in the ext.js and index.html.

My question is, where do I add the #include or the script src line so the libraries can be utilized across all files?

I've found that when I add the #include line to the Premiere.jsx file the ext.js file can't see the functions.

 

thanks for any input,

Kelly

Timecode total frame count

$
0
0

Hey guys,

 

I was wondering if it would be possible to build something that would use or build upon the 'Timecode' Video Effect to show a total Frame Count of a clip. So say you have a title card that's 100 frames long. Currently if you apply the effect it would count up from 1-100 as you play through. I would like it just to show total of 100, then if I reduced the duration of the clip, say to 75 frames it would update and show 75 frames. Is something like this possible? Why I ask is because currently I have a workflow that requires at title card with a frame count on each shot, a single project could have hundreds of shots, so across numerous projects the act of just manually adjusting a title card can be rather time consuming.

 

Cheers,

Matthew

How to know the Drag and drop is completed?

$
0
0

Hi All,

How can we get to know event.dataTransfer.setData("com.adobe.cep.dnd.file.0", path) is completed and the asset is imported?

Can we get any call backs for the event.dataTransfer.setData() function?

 

Thanks and Regards,

ANOOP NR

What's the point of namespacing in metadata?

$
0
0

I understand namespacing, but I'm curious as to why it exists within metadata?

 

If I run getMetaData on the rootItems.children, and return that metaData back and inspect it, there are namespaces in the dat

 

I'm curious, because I can't seem to figure out the purpose that it serves in this context.

In addition, why are the namespaces nested? I've converted this from XML to JSON for readability.

{    "x:xmpmeta": {        "@xmlns:x": "adobe:ns:meta/",        "@x:xmptk": "Adobe XMP Core 5.6-c107 79.158019, 2015/06/29-13:20:40        ",        "rdf:RDF": {            "@xmlns:rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",            "rdf:Description": {                "@rdf:about": "",                "@xmlns:premierePrivateProjectMetaData": "http://ns.adobe.com/premierePrivateProjectMetaData/1.0/",
...

adding support for FFV1 and Matroska

$
0
0

Hi all,

 

I'm working as part of the IETF Working Group, CELLAR, which focuses on lossless audiovisual formats and is standardizing a lossless video encoding, FFV1, and an audiovisual container format, Matroska. The IETF working group charter, timeline, deliverable list and other info can be found the CELLAR working group page. Because of the level of work going into these standards and the small but steadily growing number of users, I wanted to start researching ways about increasing implementations through a mix of either volunteering and/or sponsorship.

 

From an initial look at the Adobe Import SDK, it seems that FFmpeg could bind with the Adobe SDK to allow import of both formats. I'm looking for advice or resources about developing Adobe plugins for the import/export of these video formats. I would also love to discuss this in more detail with anyone who may have familiarity with both the FFmpeg API and the Adobe SDK in order to get a sense of the level of effort involved.


Thanks much,
Dave Rice

Setting focus on an extension that is opened.

$
0
0

Using csInterface.requestOpenExtension() to call "sub-extensions" that are part of the main extension.

 

They open fine, except modal dialogs that are being created are not focusing on creation. Is there a way to focus them? Without this, the user has to click two or three times(on a button) to get the focus set on the extension. Most users aren't going to think to select the toolbar on the top of the window to set the focus.  I haven't found anything in the code or the sample extensions that leads me to believe there's a way with Adobe.

 

I know this is a more general question for extensions, but the Extension Builder forums are kind of dead, so I figured here was my best bet. Thanks.

 

This appears to be an issue on Windows only, on OSX, modal dialogs are already focused.

Sometimes exports to Media Encoder just get lost

$
0
0

Using the Panels & JS/JSX. Sometimes we send off tasks for exports and they're just completely lost. All data is confirmed to be correct going out, Media Encoder activates(comes to front), and after that it seems pretty hit or miss as to whether it will pick up the job.

 

Do you have any tips Bruce? We're working on both OSX and Windows with the same results in both.
BTW - It would be awesome if there was a better way of reporting back from Media Encoder to Premiere - is there something we haven't found yet?

This occurs on both 2015.2 (OSX) and 2015.1 (Windows)

Premiere 10.3: debugging JavaScript in HTML panel crashes

$
0
0

Since upgrading to Premiere 10.3, we noticed that when debugging HTML panels with breakpoints in JavaScript, when execution reaches the breakpoint, the entire panel crashes and reloads.

 

We did not have this problem debugging the exact same JavaScript panel code in Premiere 9.2.

 

This problem only seems to happen at the same script lines, some other script lines never cause the panel to crash.

All tested script lines were plain browser JS, no NodeJS involved.

 

I have already tried upgrading in my manifest.xml the version of the ExtensionManifest element, and RequiredRuntime element from 5.0 to 6.0, but to no avail.

Editing a Title (.prtl) file

$
0
0

Hello,

 

I'm trying to edit an exported title file from PPro.  The editing is working but when I import the file back into PPro, PPro crashes.

I've tried writing the file as UTF8 and UTF16.  Both crash PPro.  Any ideas?

thanks,

Kelly

 

 

Here's my code:

 

##########################################

var tapeType = "<TRString>TAPE TYPE</TRString>";

var theFile = File("/Users/ops.kanderson/Desktop/OnAir Slate.prtl");

theFile.open ("r");

var theText = theFile.read();

theFile.close();

 

theText = theText.replace (tapeType, "<TRString>GENERIC MASTER</TRString>");

 

var outFileName = 'kellySlateText1' + '.prtl';

var completeOutputPath = "/Users/ops.kanderson/Desktop/" + outFileName;

var outFile = new File(completeOutputPath);

 

if (outFile){

  outFile.encoding = "UTF8";  OR outFile.encoding = "UTF16";

  outFile.open("w", "TEXT", "????");

  outFile.write(theText);

  outFile.close();

}

##########################################

Viewing all 53010 articles
Browse latest View live




Latest Images