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.
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
-
Navigate to DaVinci Resolves Scripts folder:
- Windows:
C:\ProgramData\Blackmagic Design\DaVinci Resolve\Fusion\Scripts\
- Windows:
-
Place the
launch_davinci_rest.pyfile 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?
We are actively developing 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 in the Pro version?
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:
- Website: https://beluck.net/davinci-rest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file davinci_rest-0.1.5-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: davinci_rest-0.1.5-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 65.4 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c6308a4365e7b228902f826fe315427f4eb2b3ae74e447e61eac6c07dad6060
|
|
| MD5 |
1734611f2d81836bba255923700e6935
|
|
| BLAKE2b-256 |
ad4d97cd22328128b3dfb8394bed5be5e76914d7764a1cfa9b288e5d517b7e9e
|