A Complete DaVinci Resolve Render Pipeline with the Python API
Project, Timeline, queue cleanup, MOV H.265 settings, AddRenderJob, StartRendering, status, and output verification
Combine the core Resolve render calls into one end-to-end workflow: prepare the active project, configure delivery, create one Render Job, launch it safely, wait for completion, and return the finished file path.
API
Resolve Scripting API
Language
Python
Resolve
19–20+
Requires
Running Resolve
Syntax
job_id = project.AddRenderJob()
project.StartRendering([job_id])
while project.IsRenderingInProgress(): ...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.
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
from datetime import datetime
def render_current_timeline(output_dir: Path):
resolve, project, timeline = get_project_and_timeline()
output_dir.mkdir(parents=True, exist_ok=True)
project_name = (safe_call(project, "GetName") or "Project").strip().replace(" ", "_")
timeline_name = (safe_call(timeline, "GetName") or "Timeline").strip().replace(" ", "_")
base_name = f"{project_name}_{timeline_name}_{datetime.now().strftime('%Y%m%d_%H%M%S')}"
safe_call(project, "StopRendering")
safe_call(timeline, "ClearInOutPoints")
safe_call(project, "SetRenderRange", "Entire Timeline")
safe_call(project, "SetRenderSettings", {
"TargetDir": str(output_dir),
"CustomName": base_name,
"ExportVideo": True,
"ExportAudio": True,
"IndividualClips": False,
"UniqueFilenames": True,
"Format": "mov",
"AudioCodec": "AAC",
"AudioBitrate": 320000,
"AudioSampleRate": 48000,
})
for codec in ["H.265", "H265", "HEVC"]:
if safe_call(project, "SetRenderSettings", {"VideoCodec": codec}):
break
job_id = safe_call(project, "AddRenderJob")
if not job_id:
raise RuntimeError("AddRenderJob did not create a Render Job")
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")
while safe_call(project, "IsRenderingInProgress"):
time.sleep(1.0)
status = safe_call(project, "GetRenderJobStatus", job_id) or {}
files = sorted(
[path for path in output_dir.glob(f"{base_name}*") if path.is_file()],
key=lambda path: path.stat().st_mtime,
reverse=True,
)
return {
"job_id": str(job_id),
"status": status,
"output_path": str(files[0]) if files else "",
}
result = render_current_timeline(Path.home() / "Resolve_API_Render")
print(result)
Guide
What the example does
This is a compact end-to-end final-render pipeline: obtain the active Project and Timeline, stop a stale render if one exists, reset old In/Out state, configure delivery, add a Render Job, start that job, wait for Resolve to finish, and locate the resulting file.
What the pipeline is built from
The workflow uses standard Resolve Scripting API calls for preset loading, Render Settings, Render Job creation, targeted StartRendering, progress checks, and final status inspection. The value comes from combining those primitives into a predictable sequence.
How to extend it
A production system can add selectable ranges, team-specific Render Presets, V1-based resolution policy, structured progress events, cancellation, retries, and stronger output-file validation while retaining the same core job lifecycle.
How the example works
Connect to Resolve
Establish a Resolve Scripting API connection and stop early if the application object is unavailable.
Validate the current context
Check the active project, Timeline, Media Pool, source paths, or Render Queue state required by this specific operation.
Run the core API operation
Execute the operation demonstrated in this guide: a complete davinci resolve render pipeline with the python api.
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
- Verify that the required codec is available on the target workstation before relying on the profile.
- If StartRendering with a list of job IDs is rejected, the example can try an equivalent single-job form.
- The output lookup uses the base name because Resolve can append an extension or suffix.
- For production use, integrate deliberate stale-queue handling rather than assuming the queue is empty.
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
Render
How to Configure Render Settings with the DaVinci Resolve Python API
Use SetRenderSettings() to configure a practical final export: output directory, file name, MOV container, H.265/HEVC video, AAC audio, and bitrate-related options.
Render
How to Create a Render Job with the DaVinci Resolve Python API
Follow the correct Render Queue order: choose or load a preset, apply the final Render Settings and range, create the job, and retain the returned job ID for safe targeted execution.
Render
How to Wait for a Render to Finish with the DaVinci Resolve Python API
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.

