All posts by Igor Ridanovic

Resolve DRP Watched Folder

This Python 2.7 or 3.x compatible script will watch a directory and move DaVinci Resolve DRP files to a backup folder one level below.

When a Resolve user repeatedly saves DRPs using a keyboard shortcut they will overwrite each other because they all use the same file name. When the script is running it will append the original name with a timestamp and move the DRP file to the backup directory.

Only tested in Linux, but it should work on all three supported OS-es. Windows does not come with Python. You need to install it yourself.

The best way to run the script is from the command line because it will report progress.  That way you can also easily stop it with CTRL+C.

Make sure to start the script before you save any DRPs. At start the script will delete any lose  files it finds in the watched folder.

You can also run this script from Resolve script dropdown menu and see the reporting in the Resolve built in console.

Download movedrp.py

FilmLight API

Baselight v5 has joined the exclusive club of motion picture finishing systems that expose the application features via an API.

Baselight’s API is called FLAPI which is pronounced as “flappy” according to FilmLight’s Martin Tlaskal. It stands for Film Light API.

Let not the acronym confuse you. This is an industrial strength tool and FilmLight is just getting started.

An API is a set of software tools that allow developers to create applications that interact with another software like Baselight. What does that mean if you’re a Baselight colorist or an assistant?

It means that many onerous tasks like logging metadata can be automated. It also means that third party developers can create symbiotic applications that provide entirely new features that don’t exist in Baselight. This opens up the door to pipeline and workflow enhancing tools similar to the Meta Fide apps for DaVinci Resolve.

FLAPI is actually a set of multiple APIs for several popular languages. There are Python, JavaScript, and Node.js APIs, as well as the bindings for Java.

The Film Light API is built with a modern post production facility in mind where multiple seats of Baselight use a common database to collaborate on projects.

The communications protocol uses WebSockets making it very simple to control not only a specific in-house Baselight, but also to control off-site Baselights. In fact, the very first day I had FLAPI up and running I was using my laptop to connect to a remote Baselight from 12 miles away.

The implications are many. With some content security precautions in place, it’s possible to create a system where an on-set Baselight automatically sets up a job at the home facility so everything is ready when the media arrives. It’s also possible to create an in-house system where the operations personnel can monitor job stats in real time.

FLAPI supports signals which can trigger events in the the external script or an application. For example, a change in the grade can trigger a third party app to refresh shot thumbnails.

The documented classes and methods are primarily concerned with job and scene management, LUT and CDL insertion, and media render. There are no documented API classes or methods in Baselight v5.2 that allow transport control or grade manipulation.

This Python 2.7 script demonstrates the simplest use case of fetching the Baselight application info:

#! /usr/bin/env python
import flapi
conn = flapi.Connection('localhost')
if conn.connect():   
    print conn.Application.get_application_info()

FLAPI examples on Github.

Watch a video tutorial showing how you can connect to Baselight using the API.

Resolve Project Automation

DaVinci Resolve™ Studio has recently added support for scripting.

Users normally interact with Resolve™ via the user interface. The scripting makes it possible to bypass the user interface and control the software by typing commands.

This feature may be difficult for most users, but it opens up DaVinci Resolve™ Studio to third party applications. The first application to utilize the scripting is Meta Fide Projector.

Setting up projects in Resolve™ is easy. Staying on top of your facility naming conventions can be onerous.

In environments where there is a frequent project handoff it’s necessary to use standard nomenclature and bin organizational structure. It is also very useful to have all standard media assets like logos, bars, facility slates, graphics toolkits, etc. imported into a project.

Doing all this by hand for each new project is time consuming. This is where Projector steps in. Creating a new project with Projector is as simple as giving it a name and clicking a button.

All of the project’s bin structure as well as the common assets are defined in a user template. This template ensures all new projects adhere to the facility standards. However, it is also possible to define multiple templates. The user can build a template for each client or for each type of a job.

Projector takes this a step further by allowing the command line use. This way other applications can trigger Projector automatically in the non-GUI mode.

For example, it is possible for Adobe After Effects to launch Projector after completing the render, create a new DaVinci Resolve™ project, and import all the rendered shots into a bin. All this can take place without any user input.

Projector is available from Meta Fide as a desktop application for Linux, MacOS, and Windows.

DaVinci Resolve Dynamic Text Hack

This Windows app demonstrates DaVinci Resolve external dynamic title generation.

DaVinci Resolve V15 allows Fusion macros to be used on the edit page as title templates. This app generates macros on-the-fly.

The app has two buttons. One generates a date/time stamp at the time the button is pressed. The other button retrieves Bundesliga RSS news (German football league) and formats the headlines as a bottom of the screen crawl.

It is necessary to click each button once before launching Resolve for the first time. Resolve loads the list or templates into the memory only once at start time. Once the templates are loaded we can click the buttons to refresh the templates. The text content of the templates cut into  the timeline is frozen.

Windows executable (8.1 MB)

Python script

Resolve Scripting

DaVinci Resolve V15 added a powerful new feature to its ever expanding toolset. Resolve merged with Fusion VFX software and inherited the Fusion’s scripting capability.

In addition to the existing FuScript, Resolve now has an API that opens up the the color grading application to third party software integration and pipeline automation.

The documentation lists a whole range of methods for creating and structuring projects, importing media, writing and reading metadata, applying color presets, and setting up and rendering timelines.

The API is accessible via Lua or Python. Users can use the built-in console or the native OS command line console to execute commands. But the true power comes from using external scripts or applications to automate tasks in Resolve.

This sample Python script shows the simplicity of the API. It retrieves the currently loaded project’s name once an hour and calls a user supplied presentation function to display the name.

#! /usr/bin/env python

import time

# Import the API module and
# create resolve instance

import DaVinciResolveScript as drs
resolve = drs.scriptapp('Resolve')

projectManager = resolve.GetProjectManager()
project = projectManager.GetCurrentProject()

def presentation(p)
# Supply your own function here
    print 'The current Resolve project name:', p

while True:
   projectName = project.GetName()
   presentation(projectName)
  time.sleep(3600)

Download other sample Resolve Python scripts.

Avid to Resolve Marker Converter

This tool converts Avid Media Composer markers to DaVinci Resolve timeline markers. It also generates a web based document for colorist and client review.

In Media Composer click on the fast menu in the markers window and save the markers in txt format. Upload the file and download the converted EDL file.

In Resolve right click a timeline, select Timelines/Import/Timeline Markers from EDL…, and load the converted marker EDL file.

Continue reading

Resolve Database Backup

This Python script dumps one DaVinci Resolve Postgres database at a time and saves it in the current user’s Documents directory twice a day. The interval is set inside the script itself. The script does not require OS level scheduling.

User controls available inside the script:

  • Backup interval
  • Days to keep old backups
  • Database name
  • Database login information
  • Postgres version number

It is important to set the correct Postgres version for the script to run.

Usage is the same in Windows and OS X. Execute the script at any time, or add it to the startup programs for automatic start. In Windows you can rename the extension to .pyw to suppress the console window.

Python 2.7 in required in Windows. OS X already comes with Python, but you need to associate the .py extension with the Python Launcher if you want to execute the script by double clicking. The script currently does not support the Linux version of Resolve.

Download pgrbackup.py.

GitHub: https://github.com/IgorRidanovic/Resolve-backup-Postgres

If you are running Resolve Disc Database instead of Postgres database use this backup tool.

DaVinci Resolve 12 Disk Database Backup Tool

A bug in the new projects Disk Database in Resolve 12 can invalidate the project XML which can lead to catastrophic loss of timelines.

This Python script zips up the database and saves it in the current user’s Documents directory every two hours. The interval is set inside the script itself. The script does not require OS level scheduling.

Usage is the same in Window,  OS X, and Linux. Run the script after login, or add it to the startup programs for automatic start. In Windows you can rename the extension to .pyw to suppress the console window.

You will need to install Python 2.7 in Windows. OS X and Linux already come with Python, but you need to associate the .py extension with the Python Launcher in OS X if you want to execute the script by double clicking. CentOS 7 seems to be missing Tkinter module which you can install manually with yum install tkinter.

Download: resolvebackup.py.

GitHub: https://github.com/IgorRidanovic/resolve-backup