How to Read Source Properties with MediaPoolItem.GetClipProperty
Connect TimelineItem to MediaPoolItem and read file path, resolution, FPS, and codec metadata
Use TimelineItem.GetMediaPoolItem() and MediaPoolItem.GetClipProperty() to inspect the source media behind clips on the Timeline.
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.
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 collect_media_pool_properties(timeline) -> list[dict]:
rows = []
for media_type in ("video", "audio"):
track_count = int(safe_call(timeline, "GetTrackCount", media_type) or 0)
for track_index in range(1, track_count + 1):
for item in safe_call(timeline, "GetItemListInTrack", media_type, track_index) or []:
media_pool_item = safe_call(item, "GetMediaPoolItem")
props = safe_call(media_pool_item, "GetClipProperty") or {}
rows.append({
"timeline_name": safe_call(item, "GetName") or "Untitled",
"track": f"{media_type}:{track_index}",
"file_path": props.get("File Path") or props.get("FilePath") or "",
"resolution": props.get("Resolution") or props.get("Video Resolution") or "",
"fps": props.get("FPS") or props.get("Frame Rate") or "",
"codec": props.get("Codec") or props.get("Video Codec") or "",
})
return rows
resolve, project, timeline = get_project_and_timeline()
for row in collect_media_pool_properties(timeline)[:20]:
print(row)
Guide
What the example collects
The script walks Timeline items, gets the associated MediaPoolItem, and reads the dictionary returned by GetClipProperty(). It extracts commonly useful values such as file path, source resolution, frame rate, and codec.
Why source properties live on MediaPoolItem
TimelineItem represents an instance placed on a Timeline: its position, duration, and editing context. Source-media properties belong to the Media Pool object, so file-level metadata is normally reached through GetMediaPoolItem() first.
Why several property keys are checked
Property labels can differ between Resolve versions, media types, and environments. The example therefore checks alternatives such as File Path/FilePath and Resolution/Video Resolution instead of assuming one spelling is universal.
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 read source properties with mediapoolitem.getclipproperty.
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
- Generators, titles, compound clips, and other synthetic items may not expose a normal source file path.
- GetClipProperty() without a property name typically returns a dictionary of available clip properties.
- If you know the exact property key, you can request a specific value such as GetClipProperty("Resolution").
- Serialize the collected data to JSON when you need a repeatable project audit.
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
Timeline
How to Build a Timeline Clip Map with the DaVinci Resolve API
Build a technical map of the active Timeline containing media type, track number, clip name, start, end, duration, and source file path when a linked MediaPoolItem is available.
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.
Media Pool
How to Import Media into the DaVinci Resolve Media Pool with Python
Import files into the active project Media Pool, validate source paths before calling Resolve, and inspect the MediaPoolItem objects returned by ImportMedia().

