SCRIPTING / AUTOMATION
DaVinci Resolve API
One script.
Less repetition.
Turn repeatable editing tasks into Python scripts. Connect to Resolve, organize media, work with timelines and manage rendering — one understandable step at a time.
Understand the object. Check the result. Automate the task.
manager = resolve.GetProjectManager()
project = manager.GetCurrentProject()
if project:
print(project.GetName())
Begin with the active project.
Get Project Manager, then the open project. Check the result before accessing media, a timeline or render settings.
The model changes the explanation, not your project. No connection to Resolve; no Python execution.
Write the script.
Or connect an assistant.
Different interfaces to a task — with the same need to understand and verify the result.
A repeatable script
Explore objects, methods and examples for precise automation.
Browse the libraryAn assistant with tools
Understand MCP, connect a client and verify a first read-only request.
Explore MCP in ResolveA LIBRARY OF PRACTICAL TASKS
From a method
to a working script.
Find a task, object or method name. Connection, projects, Media Pool, timeline structure, audio and rendering — with code and explanations in the guides.
Guides shown50 / 50
How to Connect to DaVinci Resolve with the Python API
Set up external Python for Resolve Studio using the installed Blackmagic module, Windows/macOS/Linux paths and a product/version check. No project opening, hidden retries or random pip package.
scriptapp("Resolve")GetProductName()GetVersionString()How to Diagnose DaVinci Resolve Scripting API Access
Diagnose Python, the installed module, the Resolve object and the current project. Separate loading from connection failures and produce a local JSON report without project names by default.
sys.executable / pointer_bitsscriptapp("Resolve")GetProjectManager()How to Get the Current DaVinci Resolve Project in Python
Obtain Project Manager, check the current project name and ID, and read timeline count and the active Timeline. An absent timeline is allowed; implicit loading and project creation are excluded.
GetProjectManager()GetCurrentProject()GetName() / GetUniqueId()How to Create a DaVinci Resolve Project with the Python API
Controlled CreateProject in a local Project Library: check name, library and folder, require a separate --apply, stop if a project is open and verify saving. No hidden LoadProject or automatic deletion.
GetCurrentDatabase()GetCurrentFolder() / GetProjectListInCurrentFolder()CreateProject(name)Import files into Media Pool with the Python API
Use ImportMedia without silently skipped files: absolute paths, selected bin, preview plan and partial-result checks. Complete Python example for Resolve Studio.
GetMediaPool()GetCurrentFolder()ImportMedia([paths])Import a folder and append clips to a timeline with the API
Controlled folder assembly in Resolve: explicit extensions, natural filename order, separate import/append phases and empty-test-timeline checks. Python code included.
ImportMedia([paths])GetClipList()AppendToTimeline([items])Create a timeline with the Python API
Understand CreateEmptyTimeline and CreateTimelineFromClips, prepare a reviewed plan and verify the new object. The executable example creates only an empty test timeline, with explicit write authorization.
CreateEmptyTimeline(name)CreateTimelineFromClips(name, [clips])GetTimelineByIndex(index)Read timeline FPS through the API
Read timelineFrameRate from Timeline and Project independently, preserve the original string and handle fractional labels and DF. Never substitute a rate after failure or guess the underlying timebase.
GetSetting("timelineFrameRate")GetSetting("timelineFrameRate")parse_rate(raw)Enumerate timeline clips with Python
Enumerate video, audio and subtitle items without hiding empty states or failures. Preserve track indices, occurrence IDs and fractional boundaries, then compare two observations.
GetTrackCount(trackType)GetItemListInTrack(trackType, index)GetUniqueId()How to manage the render queue with Python
Follow a precise JobId from queue inspection to creation, launch, observation and output review. No fallback that starts every job and no hidden queue purge.
GetRenderJobList()StartRendering([job_id], False)GetRenderJobStatus(job_id)Convert frames to timecode in Python
Frames to HH:MM:SS:FF or HH:MM:SS;FF with an explicit rate, NDF/DF mode, timeline origin and round-trip check. Complete Python example and an interactive calculator without a Resolve connection.
Clock(rate, mode)frames_to_timecode(frames, clock)offset_to_timecode(offset, start, clock)Convert timecode to frames in Python
Strict NDF/DF parsing: valid fields, skipped labels, actual whole frames and offsets relative to timeline start. No float arithmetic, zero fallback or inferred midnight wrap.
re.fullmatch(pattern, timecode)timecode_to_frames(tc, clock)timecode_to_offset(tc, start, clock)Move the Resolve playhead with Python
SetCurrentTimecode without fallback methods: plan the seek, anchor the offset, verify project and timeline, require --apply and read back the result. NDF/DF within the selected timebase.
GetCurrentPage()GetCurrentTimecode()SetCurrentTimecode(timecode)Unlock a Timeline track with Python
Unlock one exact Resolve track with an explicit type, index, reviewed plan and readback. No mass audio/video enablement or hidden retries.
GetTrackCount(trackType)GetIsTrackLocked(trackType, index)GetIsTrackEnabled(trackType, index)How to list render presets
Read exact export preset names with GetRenderPresetList. Empty, failed and ambiguous results stay distinct. No Deliver changes and no open timeline required.
GetRenderPresetList()GetUniqueId()list_presets(resolve, project_id)How to clean the Render Queue without deleting other jobs
Selectively remove completed, failed or cancelled Render Jobs by explicit IDs, with a plan, neighbour checks and immediate stop on a partial or uncertain outcome.
GetRenderJobList()GetRenderJobStatus(job_id)DeleteRenderJob(job_id)Set a Render Range from V1 Clips
Read enabled V1 clip boundaries, account for gaps and translate the enclosing interval into Deliver settings. No queue cleanup, timecode changes or invented methods.
GetItemListInTrackGetStartGetStartFrameHow to inspect source dimensions on V1
Inspect V1 using exact IDs, the raw Resolution property and explicit unknowns. Mixed sizes, disabled clips and generators never become an arbitrary export resolution.
GetItemListInTrack("video", 1)GetMediaPoolItem()GetClipProperty("Resolution")Export Timeline Audio to WAV
Prepare audio-only output using the actual WAV codec catalogue. Review sample rate, bit depth, channels and file verification without deleting existing queue jobs.
GetAudioRenderFormatsGetAudioRenderCodecsSetRenderSettingsDelete an exact Timeline clip through the API
Delete a Resolve item by occurrence ID: inspect links, never silently unlock, and explicitly disable ripple. Review a plan, issue one call and compare structure.
GetUniqueId()GetLinkedItems()GetType()AppendToTimeline: add clips with the Python API
Append existing clips to a timeline: objects and IDs, ordering, preview mode and result checks. Understand clipInfo, mediaType and frame boundaries without guessing.
AppendToTimeline([MediaPoolItem, ...])AppendToTimeline([{clipInfo}, ...])GetItemListInTrack(type, index)Read the timeline start frame with Python
GetStartFrame: read the timeline origin, convert an absolute coordinate to an offset and retain the independent start label. No GetStart fallback, float truncation or default zero.
GetStartFrame()GetEndFrame()GetStartTimecode()Read the timeline start timecode in Python
GetStartTimecode without guessing a timelineStartTimecode setting: preserve the label, FPS and start_frame separately. Optional strict NDF/DF parsing with an explicit rate and no origin changes.
GetStartTimecode()GetSetting("timelineFrameRate")GetStartFrame()Splitting a clip with Python: Resolve API limits
What split planning can do with Resolve API 21.1: identify the item, calculate two intervals and inspect the contract. No hidden keystrokes or invented SplitClip.
GetStart(True), GetEnd(True)GetDuration(True)GetLeftOffset(True), GetRightOffset(True)Build a timeline clip map
Build a versioned map of project, timeline, tracks and occurrences. Keep empty tracks, raw boundaries and enabled states; compare repeated reads and expose missing fields.
GetTrackCount(trackType)GetItemListInTrack(trackType, index)GetStart(True) / GetEnd(True) / GetDuration(True)Trimming a TimelineItem: a precise plan and API limits
Plan a shorter Resolve item using whole frames, an exclusive right boundary and explicit handle limits. Distinguish source In/Out without unsupported SetStart or SetEnd.
GetStart(True), GetEnd(True)GetDuration(True)GetLeftOffset(True), GetRightOffset(True)Render the Entire Timeline through the API
Select all frames with SelectAllFrames, preserve editorial marks and separate preparation from execution. Check late clips, audio, Single clip mode and the actual result.
GetCurrentRenderModeSetRenderSettingsAddRenderJobMOV and H.265: select actual API identifiers
Discover available Resolve formats and codecs, choose an exact H.265 ID for MOV and read the pair back. No alias probing, hidden mode changes or automatic Render Job creation.
GetRenderFormats()GetRenderCodecs("mov")SetCurrentRenderFormatAndCodec(format, codec)Dimensions from V1: project or render
Choose an explicit size from the V1 report and apply it either to output or project settings. No automatic maximum, partial-success shortcut or simultaneous changes to both scopes.
SetRenderSettings({"FormatWidth": w, "FormatHeight": h})SetSettings({"timelineResolutionWidth": str(w), "timelineResolutionHeight": str(h)})GetSettings()GetClipProperty: read Media Pool clip properties
Read Media Pool properties without requiring a timeline: full dictionaries, IDs, unrounded FPS text, per-item errors and an explicitly bounded JSON report.
GetClipList()GetClipProperty()GetClipProperty(propertyName)How to load one exact render preset
Explicitly load one preset with LoadRenderPreset: exact name, current catalogue, a plan and separate Deliver review. No substring selection, alternative probing or full-verification claim from one True.
GetRenderPresetList()LoadRenderPreset(presetName)GetCurrentRenderFormatAndCodec() / GetCurrentRenderMode()Render Settings: exact keys and a reviewable request
Prepare SetRenderSettings with a bounded JSON object: exact keys, strict types, an existing directory and a reviewed plan. No unknown fields, directory creation, hidden codec changes or render start.
SetRenderSettings(settings)FormatWidth / FormatHeightTargetDir / CustomNameHow to create a Render Job with Python
One AddRenderJob from manually reviewed Deliver settings: a plan, exact timeline, retained JobId and a before/after queue check without automatic rendering.
GetCurrentTimeline()AddRenderJob()GetRenderJobList()How to start one Render Job with Python
Start one existing local Ready job using StartRendering([job_id], False). Verify the target and queue, and distinguish an accepted launch from a finished output file.
GetRenderJobStatus(job_id)IsRenderingInProgress()StartRendering([job_id], False)How to read a Render Job status with Python
Read GetRenderJobStatus for an existing JobId and distinguish Ready, Rendering, Complete, failure, cancellation and uncertainty. Progress and global activity are not job outcomes.
GetRenderJobStatus(job_id)IsRenderingInProgress()How to wait for render completion with Python
Observe one JobId with monotonic time, an interval and a poll limit. Timeout, cancellation, failure, a missing job and Complete remain distinct outcomes.
GetRenderJobStatus(job_id)How to stop rendering with Python
Send StopRendering once with its broad scope explicitly acknowledged. Check the project and active jobs; do not treat None as failure or promise file rollback.
StopRendering()IsRenderingInProgress()GetRenderJobStatus(job_id)How to delete one Render Job from the queue
Delete one exact ID from an idle queue using a reviewed plan, target-disappearance and neighbour checks. No preparatory render stop or speculative argument conversions.
DeleteRenderJob(job_id)GetRenderJobList()IsRenderingInProgress()Set a Render In/Out Range through the API
Set an explicit [start,end) range, account for a non-zero origin and handle inclusive MarkOut. No fallback FPS, error-to-zero conversion or hidden changes to editorial marks.
GetStartFrameGetMarkInOutSetRenderSettingsA Complete Python Render Pipeline
Combine the previous methods into a controlled process with explicit checkpoints. Each command performs one stage; an unknown outcome never restarts the whole pipeline.
SetRenderSettingsAddRenderJobStartRenderingRead the audio track count with Resolve API
Use GetTrackCount for audio, including empty and disabled tracks, indices, formats and repeated observation. Never confuse a failed read with zero, or tracks with channels.
GetTrackCount("audio")GetTrackName("audio", index)GetTrackSubType("audio", index)Add the next missing audio track
Use AddTrack for audio: preserve an existing index, choose an explicit mono/stereo/multichannel subtype and add only the next track. Plan, approve and verify.
GetTrackCount("audio")AddTrack("audio", "stereo")GetItemListInTrack("audio", n + 1)Append an Audio File to a Timeline
Separate import from the edit, specify the exact MediaPoolItem, track and recordFrame. No automatic track creation, channel substitutions or zero-origin assumptions.
ImportMediaAppendToTimelineGetTrackSubTypeImportMedia: map clips by source path
Build a file-to-MediaPoolItem map without lowercasing, zipping return order or basename fallback. Explicit collisions, partial imports and a read-existing mode.
ImportMedia([paths])GetClipProperty()Convert seconds to timeline frames in Python
Seconds to offset to API coordinate: Fraction, 24000/1001 and 30000/1001, exact/floor/ceil/nearest, rounding error and optional anchoring to an open timeline. Negative values are never clamped to zero.
Fraction(seconds_text)seconds_to_frames(seconds, clock, rounding)seconds_at_timeline(resolve, ...)Find the track of a specific timeline item
Use GetTrackTypeAndIndex(), validate the index through timeline enumeration and compare the result with the track that yielded the object. No invented GetTrackIndex fallback or MediaPoolItem substitution.
GetTrackTypeAndIndex()GetTrackCount(trackType)GetItemListInTrack(trackType, index)Read a TimelineItem source file path with the Python API
Read File Path for one timeline track: TimelineItem, MediaPoolItem, missing/empty paths, offline references and optional filesystem checks.
GetTrackCount(trackType)GetItemListInTrack(type, index)GetMediaPoolItem()Add the next missing video track
Use AddTrack for video: inspect the V-index and add one next track without importing, unlocking, reordering or running an unbounded ensure loop.
GetTrackCount("video")AddTrack("video")GetItemListInTrack("video", n + 1)Export a timeline map to JSON
Use a versioned schema, UTF-8, completeness checks, no-overwrite output and byte-for-byte readback. Separate a structural report from an actual edit backup format.
collect_map(resolve)json.dumps(..., allow_nan=False)Path.open("xb")Calculate V1 intervals outside V2 coverage
Subtract the union of V2 intervals from each V1 clip, honoring disabled states and fractional boundaries. Explain transparency, transitions and other cases where this calculation cannot establish visibility.
GetIsTrackEnabled("video", index)GetClipEnabled()GetStart(True) / GetEnd(True) / GetDuration(True)BEYOND A SINGLE SCRIPT