← All DaVinci Resolve API guides
DaVinci Resolve APIIntermediateAudio

How to Export Timeline Audio to WAV with the DaVinci Resolve Python API

Deliver page, SetCurrentRenderFormatAndCodec, SetRenderSettings, and an audio-only Render Job

Export the active Timeline to WAV from Python: switch to Deliver, clear stale jobs, configure LinearPCM audio, create a Render Job, start it, and wait for Resolve to finish.

API

Resolve Scripting API

Language

Python

Resolve

19–20+

Requires

Running Resolve

Syntax

result = api_method()

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
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):
    try:
        fn = getattr(obj, name, None)
        if callable(fn):
            return fn(*args)
    except Exception:
        return None
    return None


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

project = resolve.GetProjectManager().GetCurrentProject()
if not project:
    raise RuntimeError("No DaVinci Resolve project is open")

timeline = project.GetCurrentTimeline()
if not timeline:
    raise RuntimeError("No active Timeline")
import time
from pathlib import Path

output_dir = Path.cwd() / "audio_export"
output_dir.mkdir(parents=True, exist_ok=True)
base_name = "timeline_audio"

resolve.OpenPage("deliver")
time.sleep(0.3)

jobs = safe_call(project, "GetRenderJobs") or safe_call(project, "GetRenderJobList") or []
for job in jobs:
    job_id = job.get("JobId") if isinstance(job, dict) else job
    safe_call(project, "DeleteRenderJob", job_id)

safe_call(project, "SetRenderRange", "Entire Timeline")
safe_call(timeline, "ClearInOutPoints")
safe_call(project, "SetCurrentRenderFormatAndCodec", "wav", "LinearPCM")

settings = {
    "TargetDir": str(output_dir),
    "CustomName": base_name,
    "RenderMode": "SingleClip",
    "ExportVideo": False,
    "ExportAudio": True,
    "Format": "wav",
    "AudioCodec": "LinearPCM",
    "AudioSampleRate": "48000",
    "AudioBitDepth": "24",
    "UniqueFilenames": True,
}

project.SetRenderSettings(settings)
job_id = project.AddRenderJob()
if not job_id:
    raise RuntimeError("Could not create an audio Render Job")

started = bool(safe_call(project, "StartRendering", job_id)) or bool(safe_call(project, "StartRendering"))
if not started:
    raise RuntimeError("Resolve refused to start the audio export")

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

print("Audio export finished:", output_dir)

Guide

How the audio-only export works

Resolve uses the same Render Queue for WAV export that it uses for video delivery. The difference is in the render settings: ExportVideo is disabled, ExportAudio is enabled, the format is set to wav, and the audio codec is LinearPCM.

Why the script opens the Deliver page

For render operations it is useful to move Resolve explicitly to the Deliver page before changing output settings and queue state. This also makes an external bridge workflow easier to reason about: open Deliver, configure the format, create the job, and start the render.

What to verify after export

After IsRenderingInProgress() becomes false, a production script should verify that the expected WAV file exists and has a non-zero size. The compact example focuses on job creation and waiting; output validation can be added according to the surrounding pipeline.

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 export timeline audio to wav 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

  • The script changes Deliver-page settings for the current project.
  • TargetDir must point to a writable directory.
  • If StartRendering does not start, inspect the selected WAV format, codec, preset state, and Render Queue.
  • Long Timelines can keep the script waiting for a substantial amount of time.

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