Package: pymiere
Pymiere: Python for Premiere ProUse Python to interact withAdobe Premiere Pro, gather data, check, edit and automate your projects.Why usePymiere?If you just want to create a Premiere file programmatically, you can  generate and use an XML file (seeOpen Timeline IO to XML).Butthat involves manually exporting and importing files, potentially losing data and with no visual feedback.Pymierewas created to enable video editors and 3D/VFX studios to automate some of their workflows using Python rather than Adobe's custom scripting language ExtendScript.Want to check if some shots have new versions available?Maybe automatically place them on a new track?Want to create interactive tools for your editor using Qt, Shotgun API, custom libs...?No problem!VersionsSupport Python 2 & 3Tested withAdobe Premiere Pro version 23.1 (2023),version 15.1 (2021),version 14.5 (2020),version 13.0 (2019)andversion 11.0 (2017). I highly recommend version 2019+ because some functionality isn't available in the previous versions. It should work for version 2017+ though.Tested on Windows 10 & macOS CatalinaInstallationInstallPythonif you haven't already.InstallPymierevia pip:python -m pip install pymiereInstall thePymiere Linkextension forPremiere Pro:Via the automaticextension_installerscriptDownload the installer scriptfor windowsorfor macNavigate to the download folder in Command line/Power shell (Windows) or terminal (Mac)Run the script by typingextension_installer_win.bat(Windows) or./extension_installer_mac.sh(Mac)Check the script output to see if it properly workedAlternatively via Adobe's Extension ManagerDownloadExtension Manager Command Line tool(note that the User Interface is deprecated, but we just need to use the command line interface).Unzip the folder somewhereDownloadpymiere_link.zxphereNavigate to the folder in Command line/Power shell (Windows) or terminal (Mac)Type (Windows).\ExManCmd.exe /install D:\path_to_extension\pymiere_link.zxpType (Mac)./ExManCmd --install /path_to_extension/pymiere_link.zxpAlternatively viaZXP installerorAnastasiy Extension ManagerTo check that the extension is correctly installed, start Premiere, underWindow > Extensionsyou should seePymiere Link(clicking on it will do nothing)Try running some basic code:importpymiereprint(pymiere.objects.app.isDocumentOpen())Quick startOpen or create aPremiere Proproject containing a Sequence with at least one video Clip. You can then run or step throughdemo.pywhich demonstrates some basic code.pymiere/wrappers.pycontains more code examples.Basically you start by creating aprojectobject to interact with the openedPremiere Proapplication (it needs to be running), after which you can get/set its attributes and call its methods like.nameor.save():project = pymiere.objects.app.projectFor more snippets and examples seepymiere documentation.Useful linksOfficial doc for Premiere Pro objectsUnofficial doc for Premiere Pro objectsAdvanced Premiere Pro Extendscript usageContactFor any support, questions or interest please contact me:q.masingarbe@gmail.comHowPymiereWorksPymiereis basically a wrapper forExtendScript(an Adobe flavour of JavaScript used for most of itsCreative Cloudsoftware).  Most of the help documentation forExtendScripttherefore applies directly toPymiere.In outline, this is howPymiereinteracts withPremiere Pro:Pymiereconverts a Python command (getting a property, executing a function etc.) toExtendScriptcode.Pymieresends the ExtendScript code to thePymiere Linkextension via therequestslibrary using HTTP (*)ThePymiere Linkextension is essentially anode.jsserver which receives theExtendScriptcode and executes it within Premiere Pro.Where required,Pymiere Linkwill return data as aJSONencoded response back toPymiere.Pymierewill then decode the JSON response for further processing in Python.(*)NB:You must have Premiere Pro running forPymiereto work - it's can't run "headlessly".  If your script needs to know if Premiere Pro is running, or start it, some functions are included inpymiere/exe_utils.pyfor that.Sopymiere.objectsare the entry point to access all Premiere Pro objects and functions and can learn more theold schoolway by browsing the docstrings.Alternatively, you'll be pleased to knowPymieresupports code completion and type hinting so it should be easy learn more about these objects dynamically as you code using most modern IDEs.Pymiereincludes a mirror of all Premiere Pro ExtendScript objects in Python which were autogenerated from the Extendscript objects interface.  If you'd like more detail about how I did this, please read my detailed articlehere.Future improvementsseparate the generic part handling communication between python and ExtendScript from the specific code for Premiere Pro, enabling its use in other applications (Photoshop, Encoder...)add support for Premiereeventsadd a way to simply customize a panel to call python functionsThanksI'd like to thank everybody that contributed toPymiereby reporting bugs, imrpoving the documentation, sending ideas etc. but especially:Isaac brown (https://github.com/ikebenbrown)Roy Nieterau (https://github.com/BigRoy)Peter Fison (https://github.com/Pfython)