How to Configure MOV H.265 Render Settings with the DaVinci Resolve API
Set TargetDir, CustomName, container, HEVC video, AAC audio, and bitrate from Python
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.
API
Resolve Scripting API
Language
Python
Resolve
19–20+
Requires
Running Resolve
Syntax
project.SetRenderSettings({"Format": "mov", "VideoCodec": "H265"})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
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 = resolve.GetProjectManager()
project = project_manager.GetCurrentProject() if project_manager else None
if not project:
raise RuntimeError("No DaVinci Resolve project is open")
timeline = project.GetCurrentTimeline()
if not timeline:
raise RuntimeError("No active Timeline")
return resolve, project, timeline
def apply_mov_hevc_settings(project, target_dir: str, base_name: str) -> None:
Path(target_dir).expanduser().mkdir(parents=True, exist_ok=True)
project.SetRenderSettings({
"TargetDir": str(Path(target_dir).expanduser()),
"CustomName": base_name,
"ExportVideo": True,
"ExportAudio": True,
"IndividualClips": False,
"UniqueFilenames": True,
"Format": "mov",
"AudioCodec": "AAC",
"AudioBitrate": 320000,
"AudioSampleRate": 48000,
"AudioBitDepth": 16,
})
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()
apply_mov_hevc_settings(project, r"D:\\renders", "resolve_hevc_export")
job_id = project.AddRenderJob()
print("Render job created:", job_id)
Guide
What the example does
The script applies the common output settings and then tries several H.265/HEVC codec identifiers in sequence because the exact accepted string can vary with Resolve build, platform, licensing, and available encoders.
Why the settings are applied in stages
Some Resolve configurations accept render parameters more reliably when related groups are set separately. The example first establishes container, audio, and naming options, then selects the video codec, and finally applies bitrate-related values.
When to use this block
Call this helper before AddRenderJob() when your automation needs to create a delivery task without relying entirely on a manually selected Deliver-page preset.
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 mov h.265 render settings with the davinci resolve 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
- H.265 availability depends on the Resolve edition, operating system, hardware, and installed encoders.
- If a codec override is rejected, Resolve may retain the current Deliver-page codec.
- TargetDir must be writable.
- For MP4, use the container and codec values supported by your specific Resolve installation.
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 Render the Entire Timeline with the DaVinci Resolve Python API
Build a complete active-Timeline render skeleton: clean the queue, clear old In/Out points, select Entire Timeline, configure the output path, create a Render Job, launch it, and wait for completion.
Render
How to List Render Presets with the DaVinci Resolve Python API
Read the Render Presets available to the current Resolve project, select a suitable preset, and load it safely before creating a Render Job.
Render
How to Detect Source Resolution on V1 with the DaVinci Resolve API
Walk the clips on V1, resolve each TimelineItem back to its MediaPoolItem, read source properties, and determine a representative maximum resolution for project or render setup.

