Resolve/Python - getting the length of an offline clip

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

Robert Arnold

  • Posts: 483
  • Joined: Tue Oct 30, 2012 11:53 pm
  • Location: San Francisco

Resolve/Python - getting the length of an offline clip

PostMon May 03, 2021 9:22 pm

I'm working on a Python utility that, among other things, will (hopefully) find and import clips that are in a timeline but have no associated clip in the media pool. I can get the name of the missing clip, but I'm trying to get the duration so I can compare with files on disk to see if that matches. Unfortunately, I can't seem to find any way to query that. Resolve definitely knows how long the source clip is supposed to be, because you can take the clip in the timeline and pull on its handles until it is at full extension, and that duration matches the source media's duration. GetRightOffset() will return the correct source media duration IF the end of the clip in the timeline is the last frame of the clip. Otherwise, no combination of GetDuration(), GetLeftOffset(), GetRightOffset(), GetStart(), etc. can be manipulated to get the correct value. Am I missing something?

Return to DaVinci Resolve

Who is online

Users browsing this forum: anas_colorist, Andrew Kolakowski, Bing [Bot], gizmosito, Google [Bot], Kri_Alesis, muaddiibh, Nevergiveup, panos_mts, Uli Plank and 261 guests