Highlighted

Premiere Pro Extensions - To UXP or not to UXP

Community Beginner ,
Jul 30, 2020

Copy link to clipboard

Copied

Hi all, 

 

Skip the preamble if you'd like and just jump to the question....

 

PREAMBLE

 

I'm a long-time Avid editor, but have just been asked to cut my next project on Premiere Pro. I was initially resistant, fearing the effort required both to re-map muscle memory and missing features between products. For the past few days, I've been digging into PPRO and have found it's not the software I once tried briefly in 2003! In fact, it's got something amazing that Avid doesn't have: AUTOMATION. Wow! This might convert me to Premiere long-term!

 

I've been hacking automation in the Avid for years now, writing horribly hacky global keyhooks and mimicking keyboard and mouse movements to automate repetitive tasks that you can't keymap in Avid. It's pretty janky, and just to be able to have an API to do repetitive stuff would change my editing life. I've been using the 3d modelling software, Blender, quite a bit recently, and I just love the way you can type a bit of Python and pretty much automate anything in the interface. If I had this level of automation in an editing package, I genuinely think I could save myself hours a week, and a great deal of unnecessary mouse faffing,

 

Now I'm trying to write some polyfill automations for Premiere to make my migration from Avid a bit more pleasant.Using CEP and Extendscript, I've successfully implemented:

 

  • Set audio mix level in-out (based on what's under the cursor)
  • Set pan in-out (on selected tracks)
  • Create subsequence from in-out selection and load it in source (Ctrl+Alt+C in Avid - I thought I was going to really miss this one).
  • Add filler between all clips (probably just me, but I do pulls and I like a second of black between things. Just feels neater)
  • Load filler (or load black video in PPRO speak). 

 

I'm planning to implement:

  • Add head and tail audio dissolves
  • Remove audio dissolves in-out
  • Quick add custom audio dissolves (head/centered/tail) 15frames 20 frames. 
  • Source patching mapped to a button (For e.g. to quickly map audio A1,A2 from a source to A5,A6 - which is where I always put sync audio from archive sources. Similarly A9-10 is where I put non-sync atmos, so I'd have a quick patch for that too). 
  •  Extract a sequence of clips based on markers in a source sequence. I add a GREEN marker every time I see a GV when I'm looking at doc rushes. I'd then basically be able to pull these out into custom GV sequences. 
  • I'd love to create a quick input box I could pop up and have some quick commands that might be customized for a particular setting. The idea would be I could quickly type quick aliases for commands: AL 1,2 -15 might mean set Audio levels on tracks 1 and 2 to -15. AN 1-6 -10 might mean nudge audio on tracks 1-6 by 10 dB. 

 

What I've found is that Extendscript development is cool, but definitely a bit hobbled. From a day's worth of hacking, I've found:

 

  • The old-school Javascript is a bit of a pain, and talking between the JS engine and the Extendscript engine by only passing basic objects can get restrictive. 
  • It doesn't seem possible to issue common PPRO contextual commands. It would be great to issue global commands to PPRO with just a command name (lots of programs do this now. e.g. VSCode, Visual Studio proper) activeTimeline.addThroughCut (I've made up this command name, assuming that there must be some internal reference to commands within PPRO).
  •  It would be great to be able to capture global keypresses when the extension panel isn't active, but this doesn't seem possible. 
  • It doesn't appear that the API is complete even when you dig into the QE DOM. For e.g., it doesn't seem possible to set the source-target patches for instance. Or to do things like control the zoom or view of the timeline. 

 

QUESTION

Long story short...I've seen there's migration to UXP which should be based on a more modern javascript implementation - and might have a bigger surface area on the internal API. What I can't find is any documentation on how to migrate to UXP other than an April 2019 blog-post. Before I really dig into writing more fully fledge extensions, can anyone point me towards how I start UXP development for Premiere Pro? Is it mature enough to do the kinds of things I describe above, or should I concentrate my efforts on Extendscript?

 

 

 

UXP development for Premiere Pro is nowhere near actuality. We had hoped to provide preliminary UXP 'plug-in' hosting (they're still extensions, not plug-ins) in this fall's MAX release; that has become unlikely.

CEP panels using ExtendScript remains the recommended integration path. 

  • The old-school Javascript is a bit of a pain, and talking between the JS engine and the Extendscript engine by only passing basic objects can get restrictive. 


That won't change, until UXP.

 

  • It doesn't seem possible to issue common PPRO contextual commands.


Depends on the context. For your example, app.project.activeSequence.insertClip() actually would work, so long as there's an active sequence in an open project. Broadly, you're correct; you'd need to work through the DOM to get to a specific item to manipulate, rather than issuing contextual commands.

  •  It would be great to be able to capture global keypresses when the extension panel isn't active, but this doesn't seem possible. 

It's doubtful PPro will ever allow an inactive extension to capture all keypresses.

  • It doesn't appear that the API is complete even when you dig into the QE DOM. For e.g., it doesn't seem possible to set the source-target patches for instance. Or to do things like control the zoom or view of the timeline. 

 

> It doesn't appear that the API is complete...


No shipping API is. 🙂 The API has grown through feature requests from partners and customers; yes, numerous functional areas are not exposed through APIs. You're right, there's no control of the timeline view. PPro scripting was initially created for automation, without a user. 

If you could control timeline view/zoom, what workflows would that enable?

TOPICS
SDK

Views

150

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Premiere Pro Extensions - To UXP or not to UXP

Community Beginner ,
Jul 30, 2020

Copy link to clipboard

Copied

Hi all, 

 

Skip the preamble if you'd like and just jump to the question....

 

PREAMBLE

 

I'm a long-time Avid editor, but have just been asked to cut my next project on Premiere Pro. I was initially resistant, fearing the effort required both to re-map muscle memory and missing features between products. For the past few days, I've been digging into PPRO and have found it's not the software I once tried briefly in 2003! In fact, it's got something amazing that Avid doesn't have: AUTOMATION. Wow! This might convert me to Premiere long-term!

 

I've been hacking automation in the Avid for years now, writing horribly hacky global keyhooks and mimicking keyboard and mouse movements to automate repetitive tasks that you can't keymap in Avid. It's pretty janky, and just to be able to have an API to do repetitive stuff would change my editing life. I've been using the 3d modelling software, Blender, quite a bit recently, and I just love the way you can type a bit of Python and pretty much automate anything in the interface. If I had this level of automation in an editing package, I genuinely think I could save myself hours a week, and a great deal of unnecessary mouse faffing,

 

Now I'm trying to write some polyfill automations for Premiere to make my migration from Avid a bit more pleasant.Using CEP and Extendscript, I've successfully implemented:

 

  • Set audio mix level in-out (based on what's under the cursor)
  • Set pan in-out (on selected tracks)
  • Create subsequence from in-out selection and load it in source (Ctrl+Alt+C in Avid - I thought I was going to really miss this one).
  • Add filler between all clips (probably just me, but I do pulls and I like a second of black between things. Just feels neater)
  • Load filler (or load black video in PPRO speak). 

 

I'm planning to implement:

  • Add head and tail audio dissolves
  • Remove audio dissolves in-out
  • Quick add custom audio dissolves (head/centered/tail) 15frames 20 frames. 
  • Source patching mapped to a button (For e.g. to quickly map audio A1,A2 from a source to A5,A6 - which is where I always put sync audio from archive sources. Similarly A9-10 is where I put non-sync atmos, so I'd have a quick patch for that too). 
  •  Extract a sequence of clips based on markers in a source sequence. I add a GREEN marker every time I see a GV when I'm looking at doc rushes. I'd then basically be able to pull these out into custom GV sequences. 
  • I'd love to create a quick input box I could pop up and have some quick commands that might be customized for a particular setting. The idea would be I could quickly type quick aliases for commands: AL 1,2 -15 might mean set Audio levels on tracks 1 and 2 to -15. AN 1-6 -10 might mean nudge audio on tracks 1-6 by 10 dB. 

 

What I've found is that Extendscript development is cool, but definitely a bit hobbled. From a day's worth of hacking, I've found:

 

  • The old-school Javascript is a bit of a pain, and talking between the JS engine and the Extendscript engine by only passing basic objects can get restrictive. 
  • It doesn't seem possible to issue common PPRO contextual commands. It would be great to issue global commands to PPRO with just a command name (lots of programs do this now. e.g. VSCode, Visual Studio proper) activeTimeline.addThroughCut (I've made up this command name, assuming that there must be some internal reference to commands within PPRO).
  •  It would be great to be able to capture global keypresses when the extension panel isn't active, but this doesn't seem possible. 
  • It doesn't appear that the API is complete even when you dig into the QE DOM. For e.g., it doesn't seem possible to set the source-target patches for instance. Or to do things like control the zoom or view of the timeline. 

 

QUESTION

Long story short...I've seen there's migration to UXP which should be based on a more modern javascript implementation - and might have a bigger surface area on the internal API. What I can't find is any documentation on how to migrate to UXP other than an April 2019 blog-post. Before I really dig into writing more fully fledge extensions, can anyone point me towards how I start UXP development for Premiere Pro? Is it mature enough to do the kinds of things I describe above, or should I concentrate my efforts on Extendscript?

 

 

 

UXP development for Premiere Pro is nowhere near actuality. We had hoped to provide preliminary UXP 'plug-in' hosting (they're still extensions, not plug-ins) in this fall's MAX release; that has become unlikely.

CEP panels using ExtendScript remains the recommended integration path. 

  • The old-school Javascript is a bit of a pain, and talking between the JS engine and the Extendscript engine by only passing basic objects can get restrictive. 


That won't change, until UXP.

 

  • It doesn't seem possible to issue common PPRO contextual commands.


Depends on the context. For your example, app.project.activeSequence.insertClip() actually would work, so long as there's an active sequence in an open project. Broadly, you're correct; you'd need to work through the DOM to get to a specific item to manipulate, rather than issuing contextual commands.

  •  It would be great to be able to capture global keypresses when the extension panel isn't active, but this doesn't seem possible. 

It's doubtful PPro will ever allow an inactive extension to capture all keypresses.

  • It doesn't appear that the API is complete even when you dig into the QE DOM. For e.g., it doesn't seem possible to set the source-target patches for instance. Or to do things like control the zoom or view of the timeline. 

 

> It doesn't appear that the API is complete...


No shipping API is. 🙂 The API has grown through feature requests from partners and customers; yes, numerous functional areas are not exposed through APIs. You're right, there's no control of the timeline view. PPro scripting was initially created for automation, without a user. 

If you could control timeline view/zoom, what workflows would that enable?

TOPICS
SDK

Views

151

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 30, 2020 0
Adobe Employee ,
Jul 31, 2020

Copy link to clipboard

Copied

UXP development for Premiere Pro is nowhere near actuality. We had hoped to provide preliminary UXP 'plug-in' hosting (they're still extensions, not plug-ins) in this fall's MAX release; that has become unlikely.

CEP panels using ExtendScript remains the recommended integration path. 

  • The old-school Javascript is a bit of a pain, and talking between the JS engine and the Extendscript engine by only passing basic objects can get restrictive. 


That won't change, until UXP.

 

  • It doesn't seem possible to issue common PPRO contextual commands.


Depends on the context. For your example, app.project.activeSequence.insertClip() actually would work, so long as there's an active sequence in an open project. Broadly, you're correct; you'd need to work through the DOM to get to a specific item to manipulate, rather than issuing contextual commands.

  •  It would be great to be able to capture global keypresses when the extension panel isn't active, but this doesn't seem possible. 

It's doubtful PPro will ever allow an inactive extension to capture all keypresses.

  • It doesn't appear that the API is complete even when you dig into the QE DOM. For e.g., it doesn't seem possible to set the source-target patches for instance. Or to do things like control the zoom or view of the timeline. 

 

> It doesn't appear that the API is complete...


No shipping API is. 🙂 The API has grown through feature requests from partners and customers; yes, numerous functional areas are not exposed through APIs. You're right, there's no control of the timeline view. PPro scripting was initially created for automation, without a user. 

If you could control timeline view/zoom, what workflows would that enable?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 31, 2020 0
woodced LATEST
Community Beginner ,
Jul 31, 2020

Copy link to clipboard

Copied

Thanks so much for the quick and detailed response. Very helpful indeed. 

 

UXP

Sounds like CEP/Extendscript is the way forward for now - perhaps for some time. I can definitely live with it. I'm only just breaking the surface of what's possible and there seems a fair amount in there if you're willing to dig and hack. I've essentially written a clip mixer that allows me to gang audio tracks, set clip level in-out etc - just like the one I'm used to, but better! 🙂

 

Where does Adobe Premiere Pro news about updates about things like UXP get published? 

 

API

I totally understand your point about the size of an API. I suppose that's why lots of the really full apis are ones where the interface is written against the (public) API itself. Have you had a play with scripting in Blender? It's a great example of a where the scripting api feels like an interface into the whole app (even if that is an apparition). The power is immense.

 

Essentially most of the tasks I've ever wanted to automate have been about fiddling with the internals of sequences, or creating sequences. I think that ultimately many of the things I'd like to do will be ultimately possible looking at QE. I'm going to give adding audio transitions quickly a go today. 

 

You mention the API has grown through feedback? Is there a location for making feature requests for PPRO extensions? I see in your responses to previous posts you've given feature requests id's. 

 

Global keypresses - I think I can find a workaround. I'm going to write a little separate program which will run in the background as a global keyboard hook and a little websocket server. The server can talk to the extension Javascript which can in turn call the Extendscript. That sounds feasible, right?

 

Global commands - understood. What I was thinking of was being able to invoke the commands in the same way as I imagine the keybinding service does internally. Looking at the .kys file format, it seems that there are named contexts and commands e.g. `cmd.project.previous.thumbnail.size.large` in the xml snippet below. The idea would be to chain multiple complex commands into one , though I do appreciate there is a 'context' issue (What context is the extension in?)

 

   <context.project Version="1">
            <itemcount>22</itemcount>
            <item.16 Version="1">
                <commandname>cmd.project.previous.thumbnail.size.large</commandname>
                <modifier.shift>false</modifier.shift>
                <modifier.alt>false</modifier.alt>
                <modifier.ctrl>true</modifier.ctrl>
                <virtualkey>2147483723</virtualkey>
            </item.16>
</context.project>

 

Timeline View Control

The reason I suggested this example was arbitrary, but I'm having a bit of pain navigating around the timeline view. I think it's just muscle memory and 20 years of looking at the Media Composer timeline and I'm sure there must be better keyboard commands for focusing the timeline view than I've found so far. If there weren't, however, I was going to write a few commands to quickly navigate the timeline view to show the following:

 

- Timelineview centred at current cursor at current zoom level. 

- Timelineview centred at all selected items.

- Timeline view at current zoom level with cursor at 10% width from the left (i.e. so that the timeline is oriented with the bit I'm working on ahead of the cursor).

- Generally save the current timeline view state (scale of tracks etc), so I can quickly flick between different common track views. Feature doc projects I work on end up having around 24 audio tracks and I'd like to have a view to specifically enlarge specific audio tracks depending on what I'm focusing on to easily view the waveforms (might be A1-2, or A1-4, or A5-8 depending various factors like - whether it's archive or whatever). 

 

 

Thanks again for the reply. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 31, 2020 0