How to Stop Rendering with the DaVinci Resolve Python API
Use StopRendering before queue cleanup or an emergency cancellation path
Stop an active Resolve export safely, confirm that IsRenderingInProgress becomes false, and only then modify the Render Queue or rebuild a Render Job.
API
Resolve Scripting API
Language
Python
Resolve
19–20+
Requires
Running Resolve
Syntax
project.StopRendering()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 stop_current_render(project, wait_seconds=0.5, max_checks=10):
if not safe_call(project, "IsRenderingInProgress"):
return {"was_rendering": False, "stopped": True}
safe_call(project, "StopRendering")
for _ in range(max_checks):
if not safe_call(project, "IsRenderingInProgress"):
return {"was_rendering": True, "stopped": True}
time.sleep(wait_seconds)
return {"was_rendering": True, "stopped": False}
resolve, project, timeline = get_project_and_timeline()
result = stop_current_render(project)
print(result)
Guide
What the example does
The script checks whether Resolve is currently rendering, calls StopRendering(), and then polls IsRenderingInProgress a few times to confirm that the active export has actually stopped.
When StopRendering is useful
Use it before clearing the queue, before replacing a Render Job, or when a user-facing tool needs a controlled cancel action for the current export.
Why queue changes should wait
Deleting or rebuilding queue entries while one of them is still rendering can lead to ambiguous behavior. Stop first, wait until Resolve reports an idle render state, and then change the queue.
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 stop rendering 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
- StopRendering() does not delete the Render Job from the queue.
- Read the job status separately after cancellation if the caller needs a final state.
- Do not call StopRendering unnecessarily during a healthy export.
- For a UI, return a clear stopped, not-running, or failed result to the user.
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 Clear the Render Queue with the DaVinci Resolve Python API
Build a defensive Render Queue cleanup routine: enumerate existing jobs, extract their job IDs, stop an active render if necessary, and remove stale jobs before creating a new one.
Render
How to Delete a Render Job with the DaVinci Resolve Python API
Delete a specific Render Queue task while accounting for job IDs that Resolve may expose as strings, numbers, or dictionaries in different scripting versions.
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.

