Rendering and export very slow after adding color correction

mscn
mscn Posts: 3 Just Starting Out

Rendering and exporting is taking 3.5 hours for 20 minutes after I added auto levels on my clips. Is this normal for that kind of effects? I'd not guess it would be that big of a difference.

Without auto levels it takes 30-60 minutes. (4K, 30 fps)

"GPU-engine" says GPU 0 - 3D" and is used 50-90% by Hitfilm Express

It should be using my 1070 card, but tbh I'm not totally sure if it does. My PC should be a lot louder if the GPU was running on up to 90%

---

PC:

Intel i7-7700K @ 4.20 ghz

32GB RAM

Geforce GTX 1070

---

Thanks!

Tagged:

Best Answers

  • Triem23
    Triem23 Posts: 20,688 Ambassador
    Answer ✓

    Auto Levels, Auto Color and Auto Contrast are intensive effects.

    A basic Levels adjustment is simple - you tell Hitfilm to remap a set of values and that remap remains constant across the entire clip.

    With AUTO levels Hitfilm has to analyze each and every individual frame before it decides how to remap values separately for each and every individual frame.

    Which takes a fair amount of time.

  • NormanPCN
    NormanPCN Posts: 4,200 Enthusiast
    Answer ✓

    With AUTO levels Hitfilm has to analyze each and every individual frame before it decides how to remap values separately for each and every individual frame.

    Potentially even worse, if the auto effect was told to use a specific frame for the analysis. At least when I tested some time ago. Hitfilm did not buffer/save the analysis frame in question or save the resultant analysis of said frame. It did a seek and full decode of the analysis frame from the media file on every frame. Decode is slow and a seek destroys the decode context of GOP codecs, further adding to the performance issue.

    It should be using the card, but I'm suspicious since it usually sounds a lot when I use GPU-heavy games etc

    Hitfilm is not likely keeping the GPU that loaded all the time. Utilization tools are simply sampling on an interval. Activity in between the intervals is not detected.

    If you have only one GPU in the machine, then that is all that can be used. If you have two GPUs, Tte CPU integrated GPU and a discrete GPU, then which GPU is GPU 0, which is the one you listed in your post. I've no idea how Hitfilm chooses between two GPUs, but you can force the Nvidia 1070 GPU to OpenGL use via the Nvidia control panel.

Answers

  • mscn
    mscn Posts: 3 Just Starting Out

    Thanks for your answer.

    How do I set a value for levels that is "master" like the way you said?

    Any idea if it's using my 1070 GPU or the built-in GPU in my CPU? It should be using the card, but I'm suspicious since it usually sounds a lot when I use GPU-heavy games etc

    Thanks

  • mscn
    mscn Posts: 3 Just Starting Out
    Thanks guys. I think it works a little bit better now. Forced Open GL on the 1070 and using "Select frame"=0 makes the auto level go with the same setting as the first frame.

    Cheers
  • Triem23
    Triem23 Posts: 20,688 Ambassador
    edited July 19

    Ha! I'd gone to the store to do some shopping, and you figured it out before I got back to you! Nice! Looks like Norman gave you the GPU answer.

    An alternative is also to use the Levels Histogram effect. Auto Levels is, well, the automatic version of Levels Histogram (hereafter just called "Levels.")

    So, what Levels is doing is setting a 'black point' a 'white point' and a 'center gray' point then adjusting luminance values to hit these three points. I think Levels is faster than Auto Levels, even if you force Auto Levels to use a particular frame. The Histogram display in Levels is just there as feedback so you can see you're not pegging to many values to pure black or white (which is called "clipping" as you're chopping off highlight/shadow detail if you do).

    Related effects to look at are 'Gamma' and 'Curves.'

    Gamma is like if you only move the middle gray point of the Levels.

    Curves is Levels with more fine control. Levels moves things in a linear fashion - the altered values would plot as straight lines between the black-to-middle and middle-to-white points. Curves begins with just a black and white point, lets you add as many middle points as you want, and the values between the points is smoothed out.

    Curves, in general, is one of the most powerful, yet fast to set up and fast to render color tools around. Besides general tonal adjustments, Curves can color correct or create artistic looks. Curves allows you to either adjust the entire tonal range at once, or select individual red, green, blue or alpha (transparency) channels.

    I can't think offhand of a Hitfilm specific curves, or levels tutorial, but another fun thing about those effects is they are 'generic' and work the same way in any program, so I'm going to drop a couple of tutorials for other software. I'm not actually gonna watch then first, so if something I leave here starts talking about other filters, just know for this discussion we're focused on just the Curves.


  • NormanPCN
    NormanPCN Posts: 4,200 Enthusiast

    Potentially even worse, if the auto effect was told to use a specific frame for the analysis. At least when I tested some time ago. Hitfilm did not buffer/save the analysis frame in question or save the resultant analysis of said frame.

    I just did a test, and I believe this to still be the case. I took 30 sec of UHDp30 media and encoded that to MP4 AVC 50mbps. Source media was fast decode AVC, GOP=8 (often called NormanAVC this forum). I used auto levels, fixed reference frame (0 in this case), auto levels where each frame is its own reference and then curves to adjust the levels/contrast.

    Time in minutes:seconds as reported in the Exports panel. Hardware decode of source media turned off. For reference i9 9900k 4.7Ghz CPU, 32GB ram, Nvidia 3070 GPU, Windows 11.

    • auto levels fixed frame: 6:05
    • auto levels current frame: 2:42. this had a flicker which is not unexpected.
    • curves: 1:16.

    Using auto levels with a fixed reference is really no different than using a normal adjustment effect. e.g. Curves, Exposure Pro, Levels. Levels with GPU or CPU for analysis seemed similar in perf to each other and to curves. At least on export (no histo comp needed). On playback, no idea what the perf effect is if any. It used to be a lot/ton.

    It's up to you but I prefer to have the control over the adjustment/look that I want and not some algorithmic adjustment and I also want the better performance using normal adjustment effects.

  • Triem23
    Triem23 Posts: 20,688 Ambassador

    @NormanPCN yeah, Levels Histogram got a nice boost a few versions ago when it got recoded to only update the Histogram when the layer with the effect was actively selected, instead of always.

    I think it was one of your tests than initially determined Levels Histogram was quite slow back in the day?

    Either way, I obviously prefer Curves.