Skip to content

pedrolabonia/pydavinci

 
 

Repository files navigation

pydavinci

A lightly opinionated DaVinci Resolve Python API wrapper

Provides auto completion, type hints and great API reference documentation.

I really just wanted auto completion in the IDE and to program transcoding RAW formats


Note This branch is for Resolve 18 only and is still in development. Checkout the main branch if you are using Resolve 17


Install PyDavinci

  • PyDavinci requires Python 3.10 or higher
  • External scripting with PyDavinci requires Resolve Studio 18 (Free version does not allow API access)
  • There is currently no release version for the Resolve 18 branch. Install it with git.
pip install git+https://github.com/pedrolabonia/pydavinci@resolve_18

Now, with Davinci Resolve open, we just need to import it!

from pydavinci import davinci

resolve = davinci.Resolve()

Examples and documentation


Installation requirements and guidelines

For launching scripts externally, you also need the Studio version.

If you're working with the built-in Davinci Resolve Python console, you need to install pydavinci for the Python interpreter that's used by Davinci's console.

For avoiding conflicts when using inside the embedded console, don't use resolve as the entry point variable, as that's reserved by the console. Example of suggested usage:


Launching scripts externally (Studio version)

For pydavinci to work by launching scripts outside the embedded console, make sure external scripting is set to Local in Settings -> System -> General

To-do and contributing

Contributors are always welcome! I currently have a few things I want to change, some of them are:

  • Document all possible values of get_setting and set_setting New in 0.2.0!
  • Add a better way of interfacing with the whole get_setting and set_setting methods using a proxy class or something to that effect New in 0.2.0!
  • Deal with markers in a better way New in 0.2.0!
  • Auto launch Resolve when it's not open - I've ran into some issues while trying to connect to the C extension right after launching it, a dirty way to do it is to just implement a time.sleep before trying to import the fusionscript module, otherwise we'll need to create another entrypoint to the api for launching the process and then signaling when it's ready
  • Do the same wrapper made for settings to Metadata and Properties

If you want to contribute feel free to open a pull request!

Documentation

Up to date docs are still a work in progress. At some point expect to see the original API reference extended and some further examples included. For now go to the original PyDavinci project

Here's a quick list of changes and added API support not present in the original docs:

About

A python package that helps you script DaVinci Resolve

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages