← All DaVinci Resolve API guides
DaVinci Resolve APIIntermediateRender

How to Wait for a Render to Finish with the DaVinci Resolve Python API

Use IsRenderingInProgress, a polling interval, and a final Render Job status check

Keep a Python automation process alive until Resolve finishes rendering, poll at a reasonable interval, then read the final job status and verify the output file.

API

Resolve Scripting API

Language

Python

Resolve

19–20+

Requires

Running Resolve

Syntax

while project.IsRenderingInProgress():
    time.sleep(1.0)

Parameters

  • The relevant arguments are shown in the complete working example below. Validate paths, object types, and required project state before calling the API method.

Returns

Always validate the returned object, list, identifier, or boolean before continuing to the next automation step.

Complete working Python exampleuse it as a starting point for your own script
import os
import sys
import time
from pathlib import Path


def import_resolve_module():
    try:
        import DaVinciResolveScript as dvr
        return dvr
    except ImportError:
        search_paths = [
            os.environ.get("RESOLVE_SCRIPT_API", ""),
            os.environ.get("RESOLVE_MODULES", ""),
            r"C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\Developer\Scripting\Modules",
            "/opt/resolve/Developer/Scripting/Modules",
            "/opt/BlackmagicDesign/DaVinciResolve/Developer/Scripting/Modules",
            "/Library/Application Support/Blackmagic Design/DaVinci Resolve/Developer/Scripting/Modules",
            str(Path.home() / "Library/Application Support/Blackmagic Design/DaVinci Resolve/Developer/Scripting/Modules"),
        ]
        for path in search_paths:
            if path and os.path.isdir(path) and path not in sys.path:
                sys.path.append(path)
        import DaVinciResolveScript as dvr
        return dvr


def safe_call(obj, name, *args, **kwargs):
    try:
        fn = getattr(obj, name, None)
        if callable(fn):
            return fn(*args, **kwargs)
    except Exception:
        return None
    return None


def get_project_and_timeline():
    dvr = import_resolve_module()
    resolve = dvr.scriptapp("Resolve")
    if not resolve:
        raise RuntimeError("DaVinci Resolve API is unavailable")

    project_manager = safe_call(resolve, "GetProjectManager")
    project = safe_call(project_manager, "GetCurrentProject") if project_manager else None
    if not project:
        raise RuntimeError("No DaVinci Resolve project is open")

    timeline = safe_call(project, "GetCurrentTimeline")
    if not timeline:
        raise RuntimeError("No active Timeline")

    return resolve, project, timeline



def wait_render_complete(project, job_id, poll_seconds=1.0):
    while safe_call(project, "IsRenderingInProgress"):
        status = safe_call(project, "GetRenderJobStatus", job_id) or {}
        progress = ""
        if isinstance(status, dict):
            progress = status.get("CompletionPercentage", status.get("Completion", ""))
        print("Rendering...", progress)
        time.sleep(poll_seconds)

    return safe_call(project, "GetRenderJobStatus", job_id) or {}


resolve, project, timeline = get_project_and_timeline()
job_id = safe_call(project, "AddRenderJob")
if not job_id:
    raise RuntimeError("Render Job was not created")

if not safe_call(project, "StartRendering", [job_id]):
    if not safe_call(project, "StartRendering", job_id):
        raise RuntimeError("StartRendering did not start the Render Job")

final_status = wait_render_complete(project, job_id)
print("Final status:", final_status)

Guide

What the wait helper does

wait_render_complete checks IsRenderingInProgress() and sleeps between polls. This gives the render time to progress without hammering Resolve with a tight API loop.

Why the poll interval matters

There is little value in querying the render state hundreds of times per second. A one-second interval is responsive enough for logs and simple user interfaces while keeping API traffic low.

What to do when the loop ends

Once Resolve reports that rendering has stopped, read the final job status and confirm that the expected file exists in TargetDir. A render that is no longer running may still have failed or been stopped.

How the example works

1

Connect to Resolve

Establish a Resolve Scripting API connection and stop early if the application object is unavailable.

2

Validate the current context

Check the active project, Timeline, Media Pool, source paths, or Render Queue state required by this specific operation.

3

Run the core API operation

Execute the operation demonstrated in this guide: how to wait for a render to finish with the davinci resolve python api.

4

Validate the result

Check the returned value before the workflow continues. Resolve methods often signal an unavailable object or failed operation with None, False, or an empty result.

Resolve API notes

  • Do not use an infinite tight loop without sleep.
  • If the render never started, IsRenderingInProgress() may return False immediately.
  • A GUI can forward progress to the interface instead of printing it.
  • For batch delivery, retain and validate each Render Job ID separately.

Common errors

Resolve API is unavailable

Reason: Resolve is closed or Python cannot import/use DaVinciResolveScript.

Fix: Start Resolve and verify the Developer/Scripting/Modules path from the same Python interpreter used by the script.

The method returns None or False

Reason: A required project, Timeline, clip, preset, path, or application state is missing.

Fix: Validate each input and add explicit result checks after important Resolve API calls.

The script only works on one workstation

Reason: Paths or environment assumptions are hard-coded for a single operating system or machine.

Fix: Move paths into configuration and support the required Windows, Linux, and macOS locations explicitly.

Next step

Continue only after the current operation has returned the expected Resolve object or result.

Related API guides