How to Configure Render Settings with the DaVinci Resolve Python API
Set TargetDir, CustomName, container, codec, audio, and other delivery parameters before AddRenderJob
Use SetRenderSettings() to configure a practical final export: output directory, file name, MOV container, H.265/HEVC video, AAC audio, and bitrate-related options.
API
Resolve Scripting API
Language
Python
Resolve
19–20+
Requires
Running Resolve
Syntax
ok = project.SetRenderSettings(render_settings)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
def apply_mov_hevc_settings(project, target_dir: Path, base_name: str):
target_dir.mkdir(parents=True, exist_ok=True)
common_settings = {
"TargetDir": str(target_dir),
"CustomName": base_name,
"ExportVideo": True,
"ExportAudio": True,
"IndividualClips": False,
"UniqueFilenames": True,
"Format": "mov",
"AudioCodec": "AAC",
"AudioBitrate": 320000,
"AudioSampleRate": 48000,
"AudioBitDepth": 16,
}
safe_call(project, "SetRenderSettings", common_settings)
for codec in ["H.265", "H265", "HEVC", "H.265 Master", "H.265 Main10"]:
if safe_call(project, "SetRenderSettings", {"VideoCodec": codec}):
break
safe_call(project, "SetRenderSettings", {
"Quality": "Restrict to",
"VideoBitrate": 30000,
})
resolve, project, timeline = get_project_and_timeline()
output_dir = Path.home() / "Resolve_API_Render"
apply_mov_hevc_settings(project, output_dir, "api_render_test")
print("Render settings prepared:", output_dir)
Guide
What the example does
The helper creates the output directory and sends the main Deliver-page parameters to SetRenderSettings(): destination, base file name, container, video and audio export flags, AAC options, and bitrate-related settings.
Why the codec is tried as a small list
The accepted H.265 identifier can vary across Resolve versions and platforms. The example therefore tries several common values and stops when one is accepted instead of assuming a single string works everywhere.
When to call SetRenderSettings
Apply the render settings before AddRenderJob(). A queued job captures the active delivery configuration at creation time, so changing the Deliver page afterward should not be treated as editing that already-created job.
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: how to configure render settings with the davinci resolve 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
- TargetDir should exist or be created by the script before the Render Job is added.
- CustomName is the base output name and does not necessarily include the final file extension.
- IndividualClips=False requests one rendered program file rather than separate clip files.
- Codec availability can depend on Resolve Studio, GPU support, operating system, and installed encoders.
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 Load a Render Preset with the DaVinci Resolve Python API
List available presets, choose an H.265/HEVC-oriented or otherwise suitable option, load it safely, and then apply project-specific Render Settings before creating a job.
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 Configure MOV H.265 Render Settings with the DaVinci Resolve API
Configure a practical MOV + H.265/HEVC export from Python, including output directory, base file name, video and audio settings, bitrate, and codec-name fallbacks for different Resolve environments.

