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

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?


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

Is it possible to load jsx file other than the local extension folder?

$
0
0

Hello All,

 

I want to load jsx file dynamically from the server (e.g. Through an http get call) in my premiere pro panel. How this can be achieved?

 

Premiere Pro version: 9.0.0
Extension Type: Panel

 

 

Thanks & Regards,
Meet Tank

How to import .mogrt ? [Scripting]

$
0
0

Hi...

 

I have a .mogrt file made with Essential Graphics in Adobe After Effects 2018...

How can I import it to my existing project with scripting ?

I mean I want a code to put it in my .jsx file and I replace a path Then it imports the file into my time line.

Rightnow it works when I drag my .mogrt from Essential Graphics Window in premiere but I want to do it with scripting... ( Like ImportFile() )

 

Thanks...

Connecting ProjectItem and Sequence object

$
0
0

Hello there!

 

I've got the next code to change params of selected it ProjectItem Window selected Sequence

 

changeSelectedSequence : function(newHeight, newWidth, newFPS, newName) {

 

 

newSelectedSequenceWidth = newWidth;

newSelectedSequenceHeight = newHeight;

newSelectedFPS = newFPS;

newSelectedSequenceName = newName;

 

 

var viewIDs = app.getProjectViewIDs(); // sample code optimized for a single open project

viewSelection = app.getProjectViewSelection(viewIDs[0]);

$._MYFUNCTIONS.projectPanelSelectedSequenceChange(viewSelection, viewIDs[0]);

return (newSelectedSequenceWidth, newSelectedSequenceHeight, newSelectedFPS, newSelectedSequenceName);

 

 

},

 

 

projectPanelSelectedSequenceChange : function(projectItems, viewID) {

 

var remainingArgs = projectItems.length;

var message = remainingArgs + " successfuly renamed: ";

var view = viewID;

var projectItemsUsed = [];

 

 

var iteration = app.project.rootItem.children.numItems; //A number all projectItem in project

var seqList = app.project.sequences;

 

 

        for (var i = 0; i < projectItems.length; i++) {

 

 

            if (projectItems[i]) {

if (projectItems[i].isSequence()) {

 

 

projectItems[i].name = projectItems[i].name +  "_0" + nameCounter++;

 

 

for (var seqIndex = 0; seqIndex < seqList.numSequences; seqIndex++) {

 

 

var currentSeq = seqList[seqIndex];

if (currentSeq.name == projectItems[i].name) {

 

alert("alo" + i);

sequenceSettings = currentSeq.getSettings();

 

 

if (isNaN(parseInt(newSelectedSequenceHeight))) {

sequenceSettings.videoFrameHeight = sequenceSettings.videoFrameHeight;

} else {

sequenceSettings.videoFrameHeight = parseInt(newSelectedSequenceHeight);

}

 

 

if (isNaN(parseInt(newSelectedSequenceWidth))) {

sequenceSettings.videoFrameWidth = sequenceSettings.videoFrameWidth;

} else {

sequenceSettings.videoFrameWidth = parseInt(newSelectedSequenceWidth);

}

 

 

if (isNaN(parseFloat(newSelectedFPS))) {

sequenceSettings.videoFrameRate = sequenceSettings.videoFrameRate;

} else {

sequenceSettings.videoFrameRate = 1/parseFloat(newSelectedFPS);

}

 

 

if (newSelectedSequenceName.length === 0 ) {

alert ("хуйня");

currentSeq.name = currentSeq.name;

} else {

alert ("заебись");

currentSeq.name = newSelectedSequenceName;

}

 

 

alert(projectItems[i].treePath);

 

 

currentSeq.setSettings(sequenceSettings);

 

 

 

}

 

 

}

}

 

 

} else {

 

 

app.setSDKEventMessage("No elements selected!", 'error');

 

 

}

 

}

 

 

app.setSDKEventMessage("New Selected Sequence Resolution (Dimentions) is " + sequenceSettings.videoFrameWidth + " x " + sequenceSettings.videoFrameHeight, 'info');

 

},

 

 

If I have more than one sequences with the same names and one of them selected and another one not - change both of them (because of equaling of their names).

 

Is it possible to understand what sequence is selected without using their names?

 

Thank you!

Finding sequenceID based on projectItem

$
0
0

Hi everyone,

 

I'm trying to write a script that will open the selected Project panel sequence, but I'm having trouble locating the necessary sequence ID to use project.openSequence(sequenceID). I'm using this script from PPP to return the projectItem of the selected object(s):

 

var viewIDs = app.getProjectViewIDs();

var selectedItems = app.getProjectViewSelection(viewIDs[a]);

 

Unfortunately, sequenceID is property of sequence, not projectItem. Is it somehow possible to find the sequence ID using the project item?

 

Thanks!

How to create custom transitions in effects panel ?

$
0
0

Hi to all of you !

 

I am looking to make custom transitions in Premiere. I am well aware of the "Save Preset" function but I am looking to create my own transitions in the effects panel.

 

I know it is possible as some companies sell packages like these (see in my picture)

Capture d’écran 2017-12-08 à 17.40.35.png

If any of you has the solution, you will make my searching efforts irrelevant but I will be so glad.

 

Cheers.

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?

 

 


Premiere & multi-threading

$
0
0

Q: (copied here from an email exchange I had with Zac)

 

I’m trying to use an old plug-in that’s an AEX from 2003. It works on Prem Pro but I want to use it in CS3 (coz I have HD footage and Prem Pro can’t do HD). Anyhow it doesn’t work in CS3.

 

I was stepping through it in the debugger and it looks like it gets called by multiple threads concurrently and it then Stack Overflows and causes an Access Violation.

 

So, I guess my question is – is CS3 multi-threaded accessing the plugin and did Prem Pro not do that?

 

My assumption is that the AEX isn’t thread safe or is single core thread safe and can’t handle threads running in parallel on multi-core pcs. (I’ll test setting the affinity of Premiere to one core to see if that fixes parallel-thread execution potential bugs).

 

If so, what would happen if I make a skeleton AEX that opens this AEX from somewhere out of the Premiere tree, forwards all the calls but only lets one thread in at once?

 

A: (from Zac via email)

 

Here’s a good description of what changed in CS3, from the AE SDK Guide:

 

“Starting with Premiere Pro CS3, Premiere uses multithreaded rendering for AE effects. For AE effects, there is a critical section which is used for all commands, except those relating to arbitrary data. The critical section prevents two threads from calling the same instance of the effect at the same time. However, Premiere creates multiple instances of the effect, which can be called concurrently from separate threads. Effects should not depend on static, non-constant variables.

 

New in Premiere Pro CS4.1, we have added a new flag to the AE API, PF_OutFlag2_PPRO_DO_NOT_CLONE_SEQUENCE_DATA_FOR_RENDER, to allow a plug-in to opt out of Premiere Pro's multithreaded rendering of AE effects. When the flag is set, we don't clone the sequence data across all the threads and we only call into the plug-in on one thread at a time. Premiere Pro will still render using multiple threads, but the effect will only render on one thread at a time, and the same sequence data will be used. This flag is useful for plug-ins that provide their own internal multithreading, or plug-ins that render frames based on previous frames, such as image stabilizers.”

 

So for CS3, since we don’t support that new flag in 4.1, your suggested workaround using a shim plug-in just might work.  But it’s hard to say for certain, since we don’t really know what is happening…

 

Zac

 

So, I guess the answer is that this old plugin is using statics or globals and is thus not multi-thread capable.

Solution: Get CS4!! 

 

One for the too-hard basket right now.....

Exporter plugin: PrPixelFormat PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_PLANAR_8u_*

$
0
0

I've been struggling to get my Exporter plugin to work with any of the new planar PrPixelFormats (adobe Premiere Pro 6.0.3):

    PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_PLANAR_8u_709

    PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_PLANAR_8u_601

    PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_PLANAR_8u_709_FullRange

    PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_PLANAR_8u_601_FullRange

    ...

 

My plugin uses an input format not natively supported by the SDK:  "NV12"

NV12 contains the same pixel/chroma information as YV12;  the difference is in the chroma-plane packing.  In YV12, each of the Cb and Cr planes is stored as a solo plane (at half-height x half-width).  In NV12, each Cb+Cr sample is grouped into a 16-bit value, then packed into a single plane.  The same information is there, the only difference is that YV12 has 2 chroma-planes (each with total bytesize '1/4 Y'), and NV12 has 1 chroma-plane (with total bytesize '1/2 Y'.)

 

Anyway,

so far I've only been successful using a 4:4:4 YUV PrPixelFormat, then having my user-plugin manually convert the 4:4:4 into a NV12 format.

(PrPixelFormat_VUYX_4444_8u).  When I try any of the sequenceRenderSuite->RenderVideoFrame(...), I get garbled pixeldata.

The Y (luma) plane is correct, but the Chroma-data appears to be missing.

 

For example, I expect PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_PLANAR_8u_709 to store the Cb/Cr plane immediately after the Y plane.  However, it looks like renderVideoFrame( PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_PLANAR_8u_709 ) simply returns the 'Y' plane repeated 3 times.

 

The SDK documentation doesn't go into detail about the new planar pixel formats?  Is there an online reference or other doc?

How can I access HTTP services via Extendscript from PPro CC

$
0
0

I attempting to build an HTML5 panel for Premiere Pro that retrieves assets from a third party REST API but there seems to be no support for Socket or XMLHttpRequest objects in this application which there is for others. (I get Error: Socket does not have a constructor)

 

How would I go about making these requests in Extendscript?

How to invoke JavaScript/ExtendScript for Premiere Pro CC in Mac OS

$
0
0

Looking for a way to run JavaScript aka ExtendScript in Premiere Pro CC

 

Here's what I've got for other Adobe Apps, using AppleScript:

 

tell application "Adobe After Effects CC 2015"  activate  set SomeExtendScript to "ThisVariable='Runs This Js Code';"  DoScript SomeExtendScript
end tell


tell application "Adobe Photoshop CC 2015.5"
  activate  set SomeExtendScript to "ThisVariable='Runs This Js Code';"  do javascript SomeExtendScript
end tell


tell application "Adobe Illustrator"
  activate  set SomeExtendScript to "ThisVariable='Runs This Js Code';"  do javascript SomeExtendScript
end tell

 

But so far nothing for Premiere.

tell application "Adobe Premiere Pro CC 2015"  activate  set SomeExtendScript to "ThisVariable='Runs This Js Code';"  -- Does not work: DoScript SomeExtendScript  -- Does not work: do javascript SomeExtendScript  -- Does not work: do script SomeExtendScript
end tell

ExtendScript Toolkit and Premiere Pro?

$
0
0

I'm just starting to dive into Premiere Pro extension development and I'm finding it difficult to get a firm grasp on the environment. I get that there are two DOMs to deal with Application/ExtendScript (jsx) and HTML (js). Cool. However, I'm having a tough time figuring out how to really examine the environment. I've configured my environment to debug HTML DOM stuff that I try but I'm not quite sure how to debug the Application/ExtendScript stuff.

 

Any pointers?

Get Track names

$
0
0

Hey,

 

I'm trying to export a sequence into a custom xml file and I'm currently trying to get the name of a track but I for the life of me can't figure out how.  I thought that it would be in the PrSDKVideoSegmentProperties, but I can only get the TrackId from there.  Nothing else.

 

Thanks for the help,

-anthony

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


HDR video export from Media Encoder

$
0
0

OK, we've identified the problem.  It's something in Media Encoder (not Premiere).  So, if you:

 

1) make a media encoder job, and convert exr files to our format, then HDR export works fine.

2) if you do the exact same thing with an HDR video in media encoder, you do NOT get HDR export.

3) HOWEVER, if I take the same HDR video file, drop it into a Premiere project and then put it on the timeline, and then export THAT file, then we do get HDR pixels properly.

 

So, this appears to be a bug in Media Encoder and how it detects whether the input file is an HDR input or not.  Where do I file bugs?

 

This wasted a ton of time, btw - you need more information in the export record stuff, so we can see what ME/PPro *thinks* it's dumping out...

Extendscript: How to check string ends with

$
0
0

Hello All,

 

How to check a string ends with a particular string in extendscript? Where can I find the string api?

 

Premiere Pro Version: 12.0.0
Extension Type: Panel

 

Thanks & Regards,
Meet Tank

XMPMeta does not have a constructor

$
0
0

Hi,

 

I've encountered the above error when doing

var xmp = new XMPMeta(xmpBlob);

 

The strange thing is, after I call other function with the exact code (which somehow works), calling the same code in the original function works.

 

I don't where to begin debug... it's not consistent.

 

Thanks!

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?

[Q] Execute menu command from Script (CEP, ExtendScript)?

$
0
0

Hi all,

 

Is there any API for executing menu command from CEP plugin (or ExtendScript)?

 

Illustrator has app.executeMenuCommand().

InDesign has app.menuActions.

 

I'm looking for similar API for Premiere Pro.

 

Thank you very much,

Naoki

Viewing all 53010 articles
Browse latest View live


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