Batch stabilization: is it possible?

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

ronandc

  • Posts: 1
  • Joined: Sat Oct 24, 2020 3:06 am
  • Real Name: Ronan Conlan

Re: Batch stabilization: is it possible?

PostSat Oct 24, 2020 3:24 am

Marc Wielage wrote:
dev_willis wrote:Respectfully, I feel like "get an assistant" and "you don't need that feature anyway" aren't great answers.

That's not what I said. What I said is that you can't get around doing the hard work, and often stabilization requires different settings on every single clip. There's no way to do that automatically with any software on earth -- it just requires time and effort. What you ask for can't work that way.

One of the problems with asking for free advice on the internet is that sometimes, the answers you get may not be what you expected or hoped for. But it doesn't make the advice any less true.


Listen: you're not even understanding what most of us are even talking about here. Nobody is cutting corners on the "hard work".

When you're ready, here's what actually being talked about:

Step 1 (SLOW AND SLOPPY): Every time you INITIALLY go to stabilise a clip, when you click stabilise (regardless of what sub-parameters you put in within one of the 3 stabilisation flavours), Resolve takes a WHILE to do it's INITIAL analysis on the clip. At this point, no intelligent input (the "hard work" you espouse) is actually needed yet from the user, and they're just sitting there waiting until they can click more buttons to actually refine the result of the initial "blind" stabilisation they are waiting on. It's all dumb button pushing and waiting for GPU process up to this point. An utter waste of the valuable time of a 'hard work'-er

Step 2 (INTELLIGENT INPUT FROM A HUMAN & MUCH QUICKER): Once the VERY SLOW AND NOT-YET-DIALLED-IN-BY-USER inital stabilisation analysis has been executed, most of us then check out the result of the inital blind effort Resolve made, tweak a low level parameter or two, and re-stabilise and THIS PART ONLY TAKES MILLISECONDS - so nobody is saying they have a problem with manually doing this part on individual clips.

What people are asking for is a way to get the blunt instrument Step 1 stuff out of the way in a batch process, and then have the completed (slow) stabilisation analysis at the ready to tweak and re-stabilise in the blink of an eye when they are actually present/attending to the NLE.
Offline

Horst Girtew

  • Posts: 11
  • Joined: Mon Jun 03, 2019 6:36 am
  • Location: Germany
  • Real Name: Horst Girtew

Re: Batch stabilization: is it possible?

PostThu Oct 29, 2020 1:24 pm

Yes, I also need this batch option. And better than translation as default would be to set the own default in the user settings.
For next Christmas, I wish for peace all over the world, but if that is not possible, I wish for a remote-controlled fire truck.
Offline

Ahriman

  • Posts: 24
  • Joined: Sun Dec 29, 2019 10:07 am
  • Real Name: Fabian Belser

Re: Batch stabilization: is it possible?

PostMon Dec 14, 2020 11:28 pm

Horst Girtew wrote:Yes, I also need this batch option. And better than translation as default would be to set the own default in the user settings.


Yes, please do this! :)
Offline
User avatar

Marc Wielage

  • Posts: 7794
  • Joined: Fri Oct 18, 2013 2:46 am
  • Location: Hollywood, USA

Re: Batch stabilization: is it possible?

PostTue Dec 15, 2020 3:37 am

Hendrik Proosa wrote:Marc, you are basically arguing the same logic that xml/edl import is very bad and doesn't work because it might get some cuts wrong. So better place all clips on timeline manually, because then you can check that they are right. So I guess you never use xml/edl imports?

No, you're using a false equivalency argument. I import EDLs and XMLs all the time for color sessions (and have for 25 years), and they're a very important and necessary part of workflow. You still have to check them meticulously. Generally what happens with me is I deal with sloppy editors who don't clean their lists, and I wind up with dozens of unnecessary cuts for "through" edits. So I wind up having to join a lot of clips manually, and there's no automatic way around it. If it happens too often, and it's not that long a project, I'll just scene-detect it. If it's a conform with camera source clips, that's a different situation.

I think the gist of the stabilization question is, "why can't this be easier?" And in general the answer is, "post is hard." I did a project the other day where I think I had to track 10 shots in a row, and I wound up using a different method on every single shot. Sometimes Classic worked better; sometimes I had to change the tracks with Interactive mode; sometimes I could use the regular (new) tracker in Translation mode; sometimes I could only track up to one point, then it went crazy, so I had to split the clip in half and track it in sections. Sometimes the shot was static and I could use Camera Lock. None of this could be done automatically: I had to look at each shot, use good judgement, and try different things.

Color is hard, editing is hard, VFX is hard, sound is hard. It gets easier when you get more experience and you figure out a few workarounds and shortcuts to make the day go faster. I look at it this way: it's a lot better than the 10+ years I used daVinci 2K, and we had to track 100% manually: every window and any kind of a position shift had to be done as manual keyframes and dynamics. No auto-tracking. From my point of view, the glass is half-full. You guys are complaining because you don't have ice and a straw! I'm glad to just get the glass and the water.
marc wielage, csi • VP/color & workflow • chroma | hollywood
Offline

Hendrik Proosa

  • Posts: 1973
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Batch stabilization: is it possible?

PostTue Dec 15, 2020 7:40 am

Since when does feature request equal complaining? If one wants to do everything the hard way, don’t use the feature, simple as that. There are plenty of actual hard problems, doing “push a button and twiddle thumbs while it does its stuff” prep operation that can be automated isn’t one of them. Or to put it another way, vfx side which uses orders of magnitude more meticulous, error prone and mind numbing tracking grabs every stick there is to automate the hell out of it, because life is hard enough without waiting on a rolling ball.

EDL/XML import is the exact analogy, it does the dumb stuff for you so can concentrate on actual problems.

Marc, I really enjoy the pieces about how something was done in the past, and read them with great interest, but if everyone kept doing as it was done in the past, you would still do all masks and tracks 100% manually. Maybe you would enjoy it ;)
I do stuff.
Offline

jamesalton.visuals

  • Posts: 10
  • Joined: Tue Jun 16, 2020 11:54 pm
  • Real Name: James Alton

Re: Batch stabilization: is it possible?

PostWed Apr 14, 2021 5:33 pm

I find it puzzling that I can not batch stabilize my clips on the timeline.

Each clip has to have the button 'stabilize' clicked manually and there is no way to sync the settings using attributes.

Of course each clip will be checked over for correctness, but why would a feature be denied for 'purity' laws? It's much easier for me to click 'Batch Stabilize All' and go to sleep, then check and adjust settings in the morning than to click and sit through 60-90 clips manually, one by one. It's a huge waste of time.

+1 for batch stabilize in Davinci Resolve 17.2 or 18.0
Offline

Philipp Glaninger

  • Posts: 120
  • Joined: Sun Aug 09, 2015 10:56 am
  • Location: Austria

Re: Batch stabilization: is it possible?

PostThu Apr 15, 2021 11:17 pm

Horst Girtew wrote:Yes, I also need this batch option. And better than translation as default would be to set the own default in the user settings.

+1
Resolve Studio 17.x / Intensity Pro / i7 9700k / Windows 10 (64GB Ram) / GeForce GTX 1080TI 11GB / Tangent Wave Tablet / 3 Monitors + 1 Reference Monitor
Offline

grafsimeon

  • Posts: 11
  • Joined: Sun Jun 30, 2019 7:31 pm
  • Location: GER - Berlin
  • Real Name: Graf Simeon

Re: Batch stabilization: is it possible?

PostFri Apr 16, 2021 12:15 am

Oh yes!

And since we’re talking about batch effects, would be lovely to add this to other items and effects as well.

+1
Windows 10 Pro
i5-6500 CPU @ 3.20GHz x64
RAM 64GB
GeForce GTX1060 6GB
Offline

sjonkeesse

  • Posts: 1
  • Joined: Sun May 16, 2021 12:00 pm
  • Real Name: Robin Jansen

Simple python script for stabilizing all clips on the timeli

PostSun May 16, 2021 4:06 pm

I created a simple python script which automates the stabilization process of all the clips on the timeline.
It is not using any DaVinci Resolve scripting so it should be working with all the versions.

You can find a demo here:


You can get the python script here:
https://gist.github.com/sjonkeesse/1344 ... 5d8d528fe3

Code: Select all
import time
import GPUtil
import psutil
import pyautogui

# Check https://youtu.be/OGKQ6krf5O0 for a demo

# Required software
# Python 3      (https://www.python.org/downloads/) (with installation: check add to PATH)
# psutil        (pip install psutil)
# gputil        (pip install gputil)
# pyautogui     (pip install pyautogui)

# Instructions
# 1. Open DaVinci Resolve and open the Color tab
# 2. In the tracker panel, open the Stabilizer
# 3. Make sure you can select the next clip on the timeline with the arrow down button
# 4. Select the first clip for stabilization
# 5. Open Windows Taskmanager (ctrl + alt + del)
# 6. Open Performance tab
# 7. In DaVinci Resolve click on 'Stabilize' and monitor GPU and CPU usage (in percentage)
# 8. Define a threshold of the GPU / CPU usage for when the Stabilization is in progress / idle
# 9. Run this script in the command prompt, preferably next to the DaVinci Resolve window
# 10. Define the Cropping ratio, Smooth and Strength values you want to change. Leave blank for no change.
# 11. When asked, hold your mouse above the input field(s) and Stabilize button.
# 12. Enter the thresold for the GPU and CPU you think is appropriate
# 13. Let it do it's thing. You should monitor the first few tries.

print("Make sure DaVinci Resolve Color tab is active with tracker Stabilizer.")

clipCount = input("Amount of clips to stabilize: ")
croppingRatio = input("Cropping ratio (enter for no change): ")
smooth = input("Smooth (enter for no change): ")
strength = input("Strength (enter for no change): ")
gpuIdleThreshold = int(input("GPU idle threshold in percentage: ") or "3") # in percent
cpuIdleThreshold = int(input("CPU idle threshold in percentage: ") or "3") # in percent

# Set default values or leave it to 0 for configuration on each start
posXCroppingRatio = 0
posYCroppingRatio = 0
posXSmooth = 0
posYSmooth = 0
posXStrength = 0
posYStrength = 0
posXStabilize = 0
posYStabilize = 0

# Get position of Cropping Ratio field
if "" != croppingRatio and 0 == posXCroppingRatio and 0 == posYCroppingRatio:
    print("Hold cursor above 'Cropping Ratio' field")
    for x in range(5, 0, -1):
        print("Capturing mouse position (hold above 'Cropping Ratio' field) in", x)
        time.sleep(1);

    posXCroppingRatio, posYCroppingRatio = pyautogui.position()
    print("Position captured! X:", posXCroppingRatio, " Y:", posYCroppingRatio)
    time.sleep(1);

# Get position of Smooth field
if "" != smooth and 0 == posXSmooth and 0 == posYSmooth:
    print("Hold cursor above 'Smooth' field")
    for x in range(5, 0, -1):
        print("Capturing mouse position (hold cursor above 'Smooth' field) in", x)
        time.sleep(1);

    posXSmooth, posYSmooth = pyautogui.position()
    print("Position captured! X:", posXSmooth, " Y:", posYSmooth)
    time.sleep(1);

# Get position of Strength field
if "" != strength and 0 == posXStrength and 0 == posYStrength:
    print("Hold cursor above 'Strength' field")
    for x in range(5, 0, -1):
        print("Capturing mouse position (hold cursor above 'Strength' field) in", x)
        time.sleep(1);

    posXStrength, posYStrength = pyautogui.position()
    print("Position captured! X:", posXStrength, " Y:", posYStrength)
    time.sleep(1);

# Get position of Stabilize button
if 0 == posXStabilize and 0 == posYStabilize:
    print("Hold cursor above 'Stabilize' button")
    for x in range(5, 0, -1):
        print("Capturing mouse position (hold cursor above 'Stabilize' button) in", x)
        time.sleep(1);

    posXStabilize, posYStabilize = pyautogui.position()
    print("Position captured! X:", posXStabilize, " Y:", posYStabilize)
    time.sleep(1);

print("Dont move or resize DaVinci Resolve!")

for x in range(int(clipCount)):
    print("Starting stabilization for clip", x)

    # Entering Cropping ratio value
    if "" != croppingRatio:
        print("Setting cropping ratio to", croppingRatio)
        pyautogui.moveTo(posXCroppingRatio, posYCroppingRatio, duration = 1) # Not necessary, but nice to see what's going on
        pyautogui.click(posXCroppingRatio, posYCroppingRatio, clicks = 2)
        time.sleep(1)
        pyautogui.typewrite(["backspace", "backspace", "backspace", "backspace", "backspace", "backspace"])
        time.sleep(1)
        pyautogui.typewrite(croppingRatio)
        pyautogui.typewrite(["enter"])
        time.sleep(1)

    # Entering Smooth value
    if "" != smooth:
        print("Setting smooth to", smooth)
        pyautogui.moveTo(posXSmooth, posYSmooth, duration = 1) # Not necessary, but nice to see what's going on
        pyautogui.click(posXSmooth, posYSmooth, clicks = 2)
        time.sleep(1)
        pyautogui.typewrite(["backspace", "backspace", "backspace", "backspace", "backspace", "backspace"])
        time.sleep(1)
        pyautogui.typewrite(smooth)
        pyautogui.typewrite(["enter"])
        time.sleep(1)

    # Entering Strength value
    if "" != strength:
        print("Setting strength to", strength)
        pyautogui.moveTo(posXStrength, posYStrength, duration = 1) # Not necessary, but nice to see what's going on
        pyautogui.click(posXStrength, posYStrength, clicks = 2)
        time.sleep(1)
        pyautogui.typewrite(["backspace", "backspace", "backspace", "backspace", "backspace", "backspace"])
        time.sleep(1)
        pyautogui.typewrite(strength)
        pyautogui.typewrite(["enter"])
        time.sleep(1)

    # Start stabilization
    print("Starting stabilization")
    pyautogui.moveTo(posXStabilize, posYStabilize, duration = 1) # Not necessary, but nice to see what's going on
    pyautogui.click(posXStabilize, posYStabilize)

    time.sleep(5)

    # Wait for stabilisation to finisch
    start = time.time()
    load = 1.00
    counter = 0
    stabilizationInProgress = True
    while stabilizationInProgress:
        GPUs = GPUtil.getGPUs()
        gpuLoad = GPUs[0].load * 100
        cpuLoad = psutil.cpu_percent(1)

        if gpuIdleThreshold <= gpuLoad or cpuIdleThreshold <= cpuLoad:
            # GPU is working
            print("GPU load:", gpuLoad, "%", ", CPU load:", cpuLoad, "%")

            # Reset counter
            counter = 0
        else:
            # GPU is idle
            print("Idle for", counter, "second(s)")

            if 5 <= counter:
                stabilizationInProgress = False
            else:
                counter = counter + 1

    end = time.time()
    duration = end - start + 5;
    print("It looks like DaVinci is ready with stabilizing. (it took ", duration,"seconds)")

    time.sleep(5)

    # Select next clip in timeline
    print("Selecting next clip on timeline")
    pyautogui.typewrite(["down"])
Offline

Philipp Glaninger

  • Posts: 120
  • Joined: Sun Aug 09, 2015 10:56 am
  • Location: Austria

Re: Batch stabilization: is it possible?

PostWed May 19, 2021 9:23 am

oh my that sounds exiting! I will give it a try on the weekend. Thank you!
Resolve Studio 17.x / Intensity Pro / i7 9700k / Windows 10 (64GB Ram) / GeForce GTX 1080TI 11GB / Tangent Wave Tablet / 3 Monitors + 1 Reference Monitor
Offline

jamesalton.visuals

  • Posts: 10
  • Joined: Tue Jun 16, 2020 11:54 pm
  • Real Name: James Alton

Re: Batch stabilization: is it possible?

PostMon Jun 14, 2021 3:19 pm

@sjonkeesse, whenever I made a suggestion to,
Code: Select all
support-usa@blackmagicdesign.com
they ask for a coding sample in Lua show I can show them what I mean. I feel like Python3 is a very easy scripting language to convert, plus you're not even using their API, which means they can simplify it on conversion.

If you sent it to them, they might be able to have the devs implement it because of your efforts!
Offline

Tomato Ketchup

  • Posts: 2
  • Joined: Tue Nov 17, 2020 10:58 am
  • Real Name: Gonzalez y Carmona Manuel

Re: Batch stabilization: is it possible?

PostThu Jun 24, 2021 9:06 am

I'm also interested by that feature.
Could be great to have a batch process window, and compute in background (i know maybe that one is illusional)

Thx BM!
Offline

Hard Is Easy

  • Posts: 14
  • Joined: Fri Sep 24, 2021 5:48 pm
  • Real Name: Benediktas Lipnickas

Re: Batch stabilization: is it possible?

PostWed Oct 20, 2021 4:13 pm

+1 For this request.
On Premiere Pro you can drop Warp Stabilizer as an effect and it can run multiple stabilizers parallel in the background - huge time saver
Offline

cobra427

  • Posts: 39
  • Joined: Sat Nov 16, 2019 8:36 am
  • Real Name: Cors Snijders

Re: Batch stabilization: is it possible?

PostThu Oct 21, 2021 2:14 pm

+1 for this request.

In Edius Pro, you can select (all) clips and apply the effect 'stabilize' (internal Edius effect and pretty good) or apply the plugin Mercalli Stabilizer. Both analyze each clip individualy and change some setings for the best result per clip. Great timesaver.
Intel i9-9900K, 16 Gb, Corsair watercooling, 1 ssd for OS and NLE, 1 ssd for projects, 2x harddisk for archiving, NVidia 1070. Windows 10 2x 4k screen. Mainly 4k clips
Online

Uli Plank

  • Posts: 11604
  • Joined: Fri Feb 08, 2013 2:48 am
  • Location: Germany and Indonesia

Re: Batch stabilization: is it possible?

PostThu Oct 21, 2021 4:10 pm

Well, Mercalli standalone can batch stabilise too.
Don't approach Resolve with your expectations from other NLEs! They are all different.
Resolve Studio 17.4.1 , macOS 12.0.1
MacBook M1 Pro, 32 GB RAM
Speed Editor
Previous

Return to DaVinci Resolve

Who is online

Users browsing this forum: Bing [Bot], BumbleBee, crtkecnkl659, Mowerind, TheBloke, Uli Plank and 53 guests