Skip to main content

A REST server for interacting with DaVinci Resolve

Project description

DaVinci Resolve REST API

A Python app that provides a REST API for controlling DaVinci Resolve and a Python client to easily integrate DaVinci Resolve control into your Python applications.

This package allows users to create, open, and manage projects, import media, and add clips to the timeline through a FastAPI server and a Python client.

Tested with DaVinci Resolve 18.6 (Free Version). It is likely compatible with newer versions as well.

Although the package is currently in its early stages with a few available endpoints, we are committed to continuously improving it and adding more functionality.

Note: Used by ShortFabrik, a web UI for automated short video creation with DaVinci Resolve.


Features

  • Create new projects in DaVinci Resolve.
  • Open existing projects with ease.
  • Import media clips into the Media Pool.
  • Add clips to the timeline with precise control.

The package includes:

  • A FastAPI server to expose REST endpoints for DaVinci Resolve.
  • A Python client for easy interaction from your Python applications.

Installation

Install the package directly from PyPI:

pip install davinci-rest

Note: Ensure that DaVinci Resolve is running and that the FastAPI server is started before using the client.


Starting the FastAPI Server

The FastAPI server must be running to handle REST API requests.

Step 1: Move launch_davinci_rest.py to DaVinci Resolves Script Folder

  1. Navigate to DaVinci Resolves Scripts folder:

    • Windows:
      C:\ProgramData\Blackmagic Design\DaVinci Resolve\Fusion\Scripts\
  2. Place the launch_davinci_rest.py file into the Scripts folder.


Step 2: Run the Server from DaVinci Resolve

Launch the server from DaVinci Resolve:

  • Go to Workspace -> Scripts -> launch_davinci_rest.

Once the server is running, you can send requests to the REST API at:

http://localhost:5001

Usage Guide

Here is how to use the DavinciRestClient to interact with DaVinci Resolve via the REST API.

Import the Client:

from davinci_rest.client import DavinciRestClient

# Initialize the client
client = DavinciRestClient()

Example Usage:

# Create a new project
response = client.create_project("MyProject")
print(response)

# Open an existing project
response = client.open_project("MyProject")
print(response)

# Import a clip into the Media Pool
response = client.import_clip("C:\path\to\clip.mp4", "MyClip")
print(response)

# Add a clip to the timeline
response = client.add_clip_to_timeline("MyClip", start_time=10.0, duration=5.0)
print(response)

Available API Endpoints

The following endpoints are exposed by the FastAPI server:

Endpoint Method Description
/project/create POST Create a new project in DaVinci Resolve.
/project/open POST Open an existing project.
/media/import_clip POST Import a clip into the Media Pool.
/timeline/add_clip POST Add a clip to the timeline.

Want More Advanced Features?

I am thinking of releasing a pro version that will include automatic subtitle generation, the ability to apply FX through the API, and more powerful endpoints for advanced control of DaVinci Resolve workflows.

Interested? Visit https://beluck.net/davinci-rest to learn more and provide your feedback!


Development Status

This package is in early development, and we are continuously improving the free version. Expect new features and enhancements in future updates!

We highly value user feedback. If you have suggestions or feature requests, please reach out to us!


License

This project is licensed under the MIT License. See the LICENSE file for more details.


More Information

For more information or support, please visit:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

davinci_rest-0.2.2-cp312-cp312-win_amd64.whl (488.1 kB view details)

Uploaded CPython 3.12Windows x86-64

davinci_rest-0.2.2-cp311-cp311-win_amd64.whl (547.9 kB view details)

Uploaded CPython 3.11Windows x86-64

davinci_rest-0.2.2-cp310-cp310-win_amd64.whl (498.7 kB view details)

Uploaded CPython 3.10Windows x86-64

davinci_rest-0.2.2-cp39-cp39-win_amd64.whl (501.8 kB view details)

Uploaded CPython 3.9Windows x86-64

davinci_rest-0.2.2-cp38-cp38-win_amd64.whl (511.2 kB view details)

Uploaded CPython 3.8Windows x86-64

File details

Details for the file davinci_rest-0.2.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for davinci_rest-0.2.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 bdf397b9a2228a9c82676fdcf9bf499a344429ce79ecc7c1bc70c2bc2fb79644
MD5 1af22db9da798f799fd8986f0d9c2f44
BLAKE2b-256 d6cf6ef8e158d90433c46cbc936b2c6984565536059db15163c74ec6a6715b97

See more details on using hashes here.

File details

Details for the file davinci_rest-0.2.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for davinci_rest-0.2.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2a07a845fa038a6a6b7251dff479a67b1b47ebc193b6ec86c9f97a6d70aab7c9
MD5 44b7b7f2959fccd4fecd76968b9c374a
BLAKE2b-256 b5d12b279ebf40be72144be3449d237f95e0e9dbaa102b586bac8feef7f799ea

See more details on using hashes here.

File details

Details for the file davinci_rest-0.2.2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for davinci_rest-0.2.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 72965fe9df7131229ed637d7995ef3b9588ede8af4f13b1c25089c29d04dee41
MD5 8a5a23e0f17ab98a2939e3c726caf3a9
BLAKE2b-256 ac95702529c56d01318e09d72f90aa7128884f780f1b6b6e1977a9a4e2babb23

See more details on using hashes here.

File details

Details for the file davinci_rest-0.2.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: davinci_rest-0.2.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 501.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.1

File hashes

Hashes for davinci_rest-0.2.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 635bd6068c1e11346148bb95c6154166338f52acd11305fa6f15c76796dc5aa0
MD5 7fb5dcdc0fdeb478f9e6db84a7b0f1b8
BLAKE2b-256 759d97b22b9386b9786f87269b4f41579e52b45dd24bd4d3003e413c1cf3aad6

See more details on using hashes here.

File details

Details for the file davinci_rest-0.2.2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: davinci_rest-0.2.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 511.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.1

File hashes

Hashes for davinci_rest-0.2.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 c038da114598f9291eb45f3c71f893982a055f92e816817b1749f55ef8b24932
MD5 c0b789ce96452d1b6e8002dd0773f8f3
BLAKE2b-256 637fab5857dd1f16d82a7fed0dd0cd463a95296ed0dea646f735803ee45b1d05

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page