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

Adding additional metadata to a project and retrieving them during export.

$
0
0

Hello,

 

Is it possible via the Premiere Pro API/SDK calls to add additional/custom metadata to a project?

 

I'm asking this because I'm creating a custom exporter for my own format and need additional metadata in it such as title/author/version and whatever I come up with.

 

What I did (as a temporary workaround) is adding a custom TAB in the File->Export->Media (and thn select my own exporter) with the fields I require and use that to create my export. But these values are locally stored somewhere in the user profile, so not persistent in the project. When opening and working on another project the settings are lost.

(Note: storing them in presets is not an option because these are lost too if somebody else continues the project.)

 

I need it to work on CS6.05 as well as CC7 for both Windows (and a to be implemented port on MAC OS-X).

 

An ideas what also could be done is adding a dummy video effect with parameters in it, but getting these parameters from inside the exporter callbacks seems to be impossible or at least very poorly documented how to do it.

 

greetings,

Henri


Add Track audio/video to sequence

$
0
0

It there a way to add a new audio or video track into a sequence?

 

The way it would be used it to import footage into an existing sequence, but create a new track and import the clip onto that so that nothing would be overwritten?

 

Is this possible or offered yet?

cep.fs.readFile error code 1

$
0
0

Hi All,

 

We are getting error while reading a file using cep fs library (cep.fs.readFile).

 

var file = window.cep.fs.readFile(path);
var errorCode = file.err;

 

errorCode value is 1. From the cep.fs library this error code belongs to "Unknown error". File is available at given location. What could be the possible scenarios which causes this error? How to troubleshoot this error?


Premiere Pro version: 11.1.0

Extension Type: Panel

 

Thanks & Regards,
Meet Tank

AWS S3: Download media file get corrupted

$
0
0

Hi All,

 

I am trying to download media file (image or video) from AWS S3 using nodejsaws-sdk module. The file is downloaded but I couldn't open as it looks corrupted. Also noted that file size is not same as source file. Refer below code:

 

 

var AWS = require('aws-sdk');

var options = {
accessKeyId: "XXX",
secretAccessKey: "XXX"
};
var s3 = new AWS.S3(options);

var bucketName = 'test-bucket';
var keyName = 'test.jpg';
var params = {Bucket: bucketName, Key: keyName};

var fsModule = "fs";
var fs = require(fsModule);

// This requires when running this code in panel
AWS.util.stream = require('stream');

var writeStream = fs.createWriteStream('D:/test.jpg');
var readStream = s3.getObject(params).createReadStream();

readStream.pipe(writeStream);

 

I have added aws-sdk node module in my extension folder.

 

Note:
(1) I can download and open txt file without any issue
(2) If I run this code outside panel context (run in local nodejs server) it works for all type of files including text and media!!

 

 


Premiere Pro version: 9.0.0
Extension Type: Panel

 


Thanks & Regards,
Meet Tank

How to identify the MXF-OP Atom files in a Premiere project

$
0
0

Hi All,

 

Is there any way we can go through a large project and find the MXF-OP Atom files in that project?

Is there any way to get the codec/wrapper details of the files in a Premiere project?

We are trying to achieve this using our HTML5-CEP based panel.

 

Thanks and Regards,

Anoop NR

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

getCurrentPos for Clips ?

$
0
0

I need the ability to get the current playhead position for a source clip.

The reason why I need this is because I have external logs which I would like to push into clip markers.
But the external logs have a timecode-offset (logs-TC has an offset to clip-TC).

 

Envisioned workflow:
- Premiere PRO editor open extension pane and selects one log
- Then shuttles to the position in the clip which belongs to the log
- Then goes back to the extension pane, clicks a sync button
- Result: extension panel recalculates the TCs and imports the logs as markers


All I found is this for sequences:

getCurrentPos

Returns the position of the current time indicator (the position bar set by the user). If (-1) is returned, the position bar in the timeline is not present.

csSDK_int32 getCurrentPos(PrTimelineID timelineData);

timelineData - the timelineData of the current sequence

Thank you,
Petra

Importer to emit audio for playback operation before conforming has completed, but not for scrubbing

$
0
0

Hello,

 

 

Our importer-plugin imports video and audio content from a remote storage. Before conforming is done, we can (and wish) to stream the audio for playback. But we wish to avoid streaming the audio for scrubbing (too slow). For scrubbing before conforming is done we're okay with silence-while-scrubbing.

 

 

So we are using "kSeparateSequentialAudio" as an access-mode. We emit audio while playing before conforming is done, and it's working great. We would like to keep that character.

 

 

We have a problem with scrubbing-audio-before-conforming though: Since we can't stream (fast enough) the audio for scrubbing before conforming is done, we were trying to return silence. That's bad, because PPro will cache that silence and will emit it later on again while playing (if conforming isn't completed yet), which we of course want to avoid. We were also trying to return an error (we tried all the error types :-) - with the same result: PPro cached a silence audio and emit it later on during play.

 

 

Is there a way to return audio while playing before conforming is done, but at the same time not playing audio while scrubbing before conforming is done (without caching silence) ?

 

 

Thanks,

Oran Gilad

XTRMX R&D Leader


How to invoke JavaScript for Premiere Pro CC?

$
0
0

Hi,

 

I am new to Adobe CC products/scripting and I'm trying to control Adobe Premiere Pro CC from another desktop application. Using ExtendScript Toolkit, from its UI, I can invoke JavaScript commands or files.

 

But I can't find any way for my desktop application to invoke JavaScript commands. I can't seem to find any command line tool for it (no documentation either and JavaScript doesn't seem to be officially supported). Any help regarding this would be greatly appreciated.

 

I tried using the Socket object on a .jsx file to act as a server (to listen for commands from my desktop application) and placing it on the common startup script folder. But the start up script blocks the UI of the Premiere Pro application entirely (even if I use "$.sleep(milliseconds)" function in between  the "poll" function for acquiring a connection). This wouldn't work for my application as I can't block the UI.

 

For After After Effects CC, I can use the "afterfx.exe" on Windows and AppleScript with "DoScript" command on Mac, to execute JavaScript expressions or files. But this doesn't seem to work with Premiere Pro or any Adobe CC products. For Photoshop, I can just open any .jsx file with Photoshop (for e.g. "Open With") and it runs the .jsx file. But this technique doesn't work with all the other Adobe CC products (even the ones which support JavaScript officially).

 

According to Adobe Premiere Pro developer centre, there is no mention of any JavaScript support. But since the functionality does seem to be there (as discovered through ExtendScript Toolkit), I am hoping I can get away just by using JavaScript commands to control Premiere, as opposed to using the native SDK for Plugins. However, I really hope Adobe Premiere Pro folks are seeing this and they officially support JavaScript soon .

 

Thanks for your help.

Scripting for Premiere Pro CC / Premiere Pro CC 2014

$
0
0

Using Extendscript Toolkit I've found that it can possible to scripting for Premiere Pro CC and Premiere Pro CC 2014, but my question is:

 

Why Adobe don't provide any relative scripting guide?? (It's essential to see at least the Object Model)

About the Adobe Extension SDK...

$
0
0

I am trying to add extensions to premiere pro.

 

However, I run the sample code ppropanel index.html, and I get the following error. (in CSInterface.js)

 

Uncaught TypeError: Cannot read property 'getHostEnvironment' of undefined at CSInterface.js:480

 

 

This happens when I run it directly in the browser, or when I create and deploy the zxp file.

 

What should I do? I need help.

 

[Here is the list of all Adobe forums... https://forums.adobe.com/welcome]

[Moved from generic Suite forum to SDK forum... Mod]

Run .exe File in PR via ExtendScript

$
0
0

Hi,

I'm trying to run a .exe File via ExtendScript. We're doing the same in AE which works fine using "system.callSystem(xyz.exe)" but "system" is unknown to Premiere.

Any ideas how to solve this?

 

Thanks,

Mathias

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

Get Source A1/V1 of selected clip

$
0
0

Hi All,

 

I'm trying to find the user assigned A1/V1 source in order to insert new clip/audio file in the preferred track :

Capture.PNG

 

 

Didn't find in any Object reference to those sources, is that possible? will that be possible in later SDK versions ?

 

Thanks,

 

Peleg

Change sequence Premiere Pro

$
0
0

Hi all ,

 

I try to get the name of the sequence when the user changes sequence.

Example: the editor works in sequence "BLABLA" my started application get the sequence name . When the user changes sequence I would like to get the name of the second sequence.

Via an event or other?

 

I thought of a timer or pooler but is this a good practice?

 

Thanks :-)


Event Chaining

$
0
0

Hi community,

 

I need to understand what I'm conceptually doing wrong or what I'm confusing here.

This experiment is to test the chaining of events, so basically Event1 shall trigger Event2, which is split, so Event2 shall trigger Event3 and then finish. Sounds a bit weird when describing it that way, so here's the basic code:

 

index.html:

<html>  <head>    <meta charset="utf-8">    <script src="./lib/CSInterface.js"></script>    <script src="./lib/jquery.js"></script>    <script>    $(document).ready(function() {        $("#EventChain").on("click", function(e){            e.preventDefault();            var cs = new CSInterface();            var message = "Event Listeners created.\nLet's go!\n\n";            cs.addEventListener("Test.Event1", function(evt) {                message += evt.data + "\n\nEvent 2 to occur...\n\n";                $("#textarea").text(message);                // console.log(evt.data);                cs.evalScript('$._ext_ed.e_chain2("This is Event 2.")');            });            cs.addEventListener("Test.Event2", function(evt) {                message += evt.data + "\n\nEvent 3 to occur...\n\n";                $("#textarea").text(message);                // console.log(evt.data);                cs.evalScript('$._ext_ed.e_chain3("This is Event 3.")');            });            cs.addEventListener("Test.Event3", function(evt) {                message += evt.data + "\n\n";                $("#textarea").text(message);                // console.log(evt.data);                cs.removeEventListener("Test.Event1");                cs.removeEventListener("Test.Event2");                cs.removeEventListener("Test.Event3");            });            $("#textarea").text(message);            cs.evalScript('$._ext_ed.e_chain1("This is Event 1.")');        });    });    </script></head><body><header></header><section>  <button id="EventChain">EventChain</button><br/>  <textarea id="textarea" placeholder="Click the EventChain button!"></textarea></section><footer></footer></body></html>

 

JSX:

try {    var xLib = new ExternalObject("lib:\PlugPlugExternalObject");
} catch (e) {    alert(e);
}

$._ext_ed={
    dispatchEventCEP : function (_type, _payload) {        if (xLib) {            var eventObj = new CSXSEvent();            eventObj.type = _type;            eventObj.data = _payload;            eventObj.dispatch();        } else {            alert ("PlugPlugExternalObject not loaded.", true);                   }    },       e_chain1 : function (msg) {        alert ("Message \""+msg+"\" received.", false)        var eventType = "Test.Event1";        $._ext_ed.dispatchEventCEP(eventType, msg)    },       e_chain2 : function (msg) {        var eventType = "Test.Event2";        $._ext_ed.dispatchEventCEP(eventType, msg + "part one");        $.sleep(5000);        $._ext_ed.dispatchEventCEP(eventType, msg + "part two");    },       e_chain3 : function (msg) {        var eventType = "Test.Event3";        $._ext_ed.dispatchEventCEP(eventType, msg)    }
}

 

 

expected test result:

Event Listeners created.

Let's go!

 

This is Event 1.

 

Event 2 to occur...

 

This is Event 2.part one

 

Event 3 to occur...

 

This is Event 3.

 

This is Event 2.part two

 

Event 3 to occur...

 

This is Event 3.

 

 

actual test result:

Event Listeners created.

Let's go!

 

This is Event 1.

 

Event 2 to occur...

 

This is Event 2.part one

 

Event 3 to occur...

 

This is Event 2.part two

 

Event 3 to occur...

 

This is Event 3.

 

This is Event 3.

 

 

What's going on? Why is Event 3 not completely dispatched when Event 2 part one is obviously finished?

 

It gets even worse when I click the button once more:

Event Listeners created.

Let's go!

 

This is Event 1.

 

Event 2 to occur...

 

This is Event 2.part one

 

Event 3 to occur...

 

This is Event 2.part two

 

Event 3 to occur...

 

This is Event 2.part one

 

Event 3 to occur...

 

This is Event 2.part two

 

Event 3 to occur...

 

This is Event 3.

 

This is Event 3.

 

This is Event 3.

 

This is Event 3.

 

This is Event 3.

 

This is Event 3.

 

This is Event 3.

 

This is Event 3.

 

I'll try to find some useful reading on this myself but I'd appreciate useful comments!

 

Cheers,

e.d.

Importing Markers

$
0
0

I'm currently trying to import markers in a Premiere plugin.

I'm using a Premiere Import plugin and an After Effects Effect plugin.

The AEGP_MarkerSuite2 offers a NewMarker API, but it seems that it's not available in Premiere.

The PrSDKMarkerSuite available in Premiere doesn't look to offer any way to create markers.

 

What's the most straight forward way to import a bunch of markers into Premiere from a plugin?

 

Thanks

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.

Clip Marker: Different start/end time in seconds

$
0
0

Hi All,

 

I am adding a marker in clip using below code:

 

var markers = app.project.rootItem.children[0].getMarkers();
var new_marker = markers.createMarker(2.075469);
new_marker.name = "Test marker";
new_marker.comments = "Test comment";
new_marker.end = 2.075469;

 

Now I need to check that the marker already exists or not at "2.075469". I am using below code to compare the start and end seconds.

 

var markers = app.project.rootItem.children[0].getMarkers();
var start = markers.getFirstMarker().start.seconds;
var end = markers.getFirstMarker().end.seconds;
var secondsToCompare = 2.075469;
if (secondsToCompare == start && secondsToCompare == end) {     // Marker is already exists so do nothing
}
else {     // Add new marker
}

 

 

However value of both "start" and "end" is "2.08" which is not same as "2.075469".
Why premiere pro doesn't return exact value? Can anyone suggest how to achieve this?

 

Premiere Pro Version: 9.0.0
Extension Type: Panel

 


Thanks & Regards,
Meet Tank

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


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