So here is the script I came up with for anyone who is interested. I wanted a script that i could use to make grabbing stock bits out of video clips a little more efficient.
The script does the following:
1. Based on the current location of the play head in the timeline, it places a duration marker on the clip with a default length of 30 seconds. It includes the word STOCK in the notes of the marker so you can create a Smart Bin to collect the picks.
2. I also place a duration marker in the same place on the timeline, this gives you a visual representation of the beginning and end of the marked clip.
3. if the length of the clip is less than the duration marker wants, the marker is placed from the current location to the end of the current clip. So, if you’re getting clips shorter than what you wanted it's likely because it ran into the end of the clip.
The Smart Bin I use is created as follows:
1. Add Smart Bin
2. Name: Stock Clips
3. Match: MediaPool Properties; Marker Notes; Contains; STOCK
Let me know if you have any ideas on other ways to use the script. I have included it here:
You can change the default length of the marker by changing the variable default_len
There is also a lot of debug info incorporated in the file that can be turned on or off with the variable Debug. I left Debug on in the script.
The code to convert between time code and frames was written by someone else I found in a forum somewhere but lost the reference, so sorry i didn't give credit for that.
This script works well from the command line as well as from the script menu, I assigned it to the key F4 in the keyboard for the Edit page that seems to work well, unfortunately there is no way to define an argument to the script either on the script menu or the keyboard shortcut. (if i could use arguments i could define two or more keys to use the same script with different clip lengths)
Hope this helps someone,
Geoff Kuchera
You can find the script here:
https://github.com/gkuchera/Davinci-Resolve-Scripts.git