Skip to main content
Inspiring
October 9, 2017
Answered

how to get started with premiere scripting?

  • October 9, 2017
  • 3 replies
  • 10394 views

Hi. I'm an experienced web developer who's working on a project which requires some scripting in Premiere Pro.

My needs aren't highly complicated, and at first I thought "well this looks fine" seeing the CEP samples on github. Never have I have ever seen such bad bad horrible job of creating an API since trying to work with Microsoft's Outlook. There seems to be no manual or proper documentation for Premiere, furthermore, most (if not all? I didn't check) of the links on the github page are dead. Worse, some of the links are supposed to point at a file within that project - upon finding that file (in a different place) it turns out that even the intended lines the link points to are out of date.The official ESTK install links on Adobe's website are dead too, I only finally got it through the Creative Cloud - after enabling "show older apps" of course, which hasn't been a whole lot of help because it's debugging system is so ridiculously out of date. Oh also, some of the examples on github don't even run *as is*. There's no proper guide or quick-start tool, there's not even something like a REPL system that'll allow you to mess around and learn through that.

I need to run some really simple operations. I'm not asking for help with figuring out how to do them - I can do that on my own, provided I have some system that allows me to actually understand and learn without banging my head against the wall. Frankly, this is embarrassing and unprofessional from a company this big, and I don't understand it, but maybe someone on this community can point me in the right direction? I just need a way to start messing with this so I can actually learn how to use it.

This topic has been closed for replies.
Correct answer Bruce Bullis

Ok, I found it, it's an XML file. Where's an explanation for the specifications and requirements of such a file / how its structure is built / how to give it information to link an audio and video file ?

Let's take a step back. I looked into the samples trying to make sense of 'em with your help. I can now import and create my hierarchy. Ok. What's left is the sequences - I found the function ​app.project.createNewSequence​ which gets two arguments: name & id. Testing it with ESTK revealed it automatically opens a prompt for user input (choosing which format). I want to avoid that. I don't want any input from the user. I need the details of that sequence to match those of the video, or a better way would be to create it from a specific video item and then adding the audio. Also, I can't see any way to create that sequence in a chosen directory (or even moving it? I don't know if that's possible).

By the way, that link you gave for the FCP XML - I already found it before, I always google before I ask - and it doesn't have anything, except for an overview and a link to some long lost documentation. Honestly I don't think there's anything about this thing, nor a library or tool that makes it easy to handle.


Where's an explanation for the specifications and requirements of such a file / how its structure is built

/ how to give it information to link an audio and video file ?

I don't understand why you'd every need to parse or (programmatically) create an .sqpreset file...? The only way to build a valid sequence preset is with PPro's Create Sequence dialog. Nothing outside of PPro should ever parse it. Perhaps you mean instead to provide a project, containing template sequences? Also doable.

I need the details of that sequence to match those of the video, or a better way would be to create it from a specific video item and then adding the audio.

There is no way to create a sequence from footage; you need to choose a specific preset.

Also, I can't see any way to create that sequence in a chosen directory (or even moving it? I don't know if that's possible).

Do you mean sequence in a bin, instead of directory? Every sequence is a projectItem, and you can change a projectItem's parent.

3 replies

Bruce Bullis
Legend
October 10, 2017

Sorry you've found it difficult to get started; yes, on-boarding could be simpler.

Premiere Pro has a thriving community of hundreds of panel developers and integration partners, all of whom have based their panel development on PProPanel.

PProPanel shows how to create bins, imports files, and creates sequences; what other questions do you have?

hyuviiAuthor
Inspiring
October 10, 2017

Well all of those things are "there" technically but not really as a tool to learn from.

There's a searchForBinWithName function - which does a deep-search, because really? That's the first method you bring? And a name-based search? What if I have multiple bins with the same name - something that's very common when you create a scene-shot-take hierarchy? There's also the searchBinForProjItemByName (what??) which is recursive for some reason and I have no idea what it does but it seems so convoluted and unreadable I'm at awe.

I can see a function called createBin being used at some points but where's a single comment explaining that function? Maybe it can take more arguments - like color maybe? Can you create multiple bins at once? Does it return anything (maybe itself or the name?) - can you chain functionalities? Also - when you want to create it within another bin, do you have to go from rootItem or is there any traversing system in place? Who knows. I'd test it but there's no REPL system that'll make that process easier to do, right? I have to write code and run it through the IDE, then do it again and again to test every single silly thing because there's no documentation to explain it, nor is there a readable sample that explains different usages and options.
 
The importFiles function is also badly written, relying on user input (why would I want that when creating automation? I am trying to actively avoid that) which *doesn't work well* as is (it sets up the filetype in the dialog badly so it doesn't recognize – wait for it – audio or video files. yep). There's also an ingestFiles function - why? I don't know. There's no GUI functionality for "ingesting", that's not part of the video editor's jargon. There's this cryptic comment halfway in which says "// We have an array of File objects; importFiles() takes an array of paths." – from which you'd think that – ok, so imortFiles takes paths and ingestFiles takes objects – only that isn't true! Because a few lines below that it actually opens a file dialog and extracts the files from a path just like importFiles. That is bonkers absolutely freaking ridiculous.


The ingest function also has a whole bunch of encoder-related-event binding at the top - why? what does it do? And they bind events to functions named the same way with the word proxy, which makes it so weird – not only because that defies DRY, but because that naming suggest those are general tools you call upon, but they're only used in this specific function. That is so odd!! - why? I don't know! There's no documentation available. Maybe this makes sure to conform the imported files – hence ingest, but, uh, that *always supposed to happen* when you import files, that's something you expect anyway, so why have this other function called ingest? I can't understand any of it.
 

This isn't me having trouble understanding complicated features, these are the very basic elements of your entire API. And they're completely mumbled in a confused mess of badly named, badly written functions with minimal comments or details available.


Look, If you don't have documentation, what you need to do is provide samples that are crystal clear, and do exactly one thing. saveProject function is a good example, so is exportCurrentFrameAsPNG and insertOrAppend. Just like the rest of that code they lack comments and are badly written, but at least they're readable, short, and have a correlating action in the GUI so you can sorta figure out how to use them.
 
On the other hand - look at onPlayWithKeyframes - what a mess. So many logical conditions one after the other. I have taught several courses of basic python and JS programming to groups of people with various technical backgrounds and even the ones with literally zero knowledge stop writing stuff that way after about a week. And the name of the function is so meaningless and weird. And inside it you actually have some constants that you wrote as is that is just oh my god really? COME ON.

And this is all at odds with what I come to expect from Adobe in general. As a video editor I find the UI and software itself to be very thought-through and easy to work with, as well as your customer support  – when I had a problem I contacted someone through chat and it was quickly obvious he had actual technical knowledge and helped me through some playback issues (which is something to commemorate, really, when compared to customer support of so many other companies).

I'm astounded, really.

Bruce Bullis
Legend
October 10, 2017

> I'm astounded, really.

I'm sorry you don't like our API organization, design, or naming.

You are right; much could be done to improve the sample code, and documentation. Stepping through panel code in a debugger remains the best way to learn the interactions between PPro and panels.

The current panel sample has not been a barrier for hundreds of panel partners. We'd be happy to help you (directly, or here on the forums) with any specific development questions.

John T Smith
Community Expert
Community Expert
October 10, 2017

The SDK forum is probably a better place to ask Premiere Pro SDK

Kevin J. Monahan Jr.
Legend
October 10, 2017

Hi Hyuvii,

What is it that you want to do? Create plug-ins? Create an HTML panel? Let me know and I'll try to steer you in the correct direction.

Thanks,
Kevin

Kevin Monahan - Sr. Community and Engagement Strategist – Adobe Pro Video and Audio
hyuviiAuthor
Inspiring
October 10, 2017

I want to create several bins in a specific hierarchy, import files and create sequences from those files based on predetermined information. Again, I can figure it all out myself if there's any proper documentation that explains the basics, or even just a cheat sheet. But I need code samples I can actually work with.