Ability to force 8-bit NeatVideo in 32-bit projects.

suggest a way to improve Neat Video
Post Reply
Rush_iam
Posts: 3
Joined: Tue Nov 08, 2016 9:31 am

Ability to force 8-bit NeatVideo in 32-bit projects.

Post by Rush_iam »

I am happy customer of NV-v3 in the past and now I work with NV-v4 in Vegas Pro. My workflow is:
- Vegas Pro 13 or Vegas Pro 14
- 8-bit source footage in 4K
- NeatVideo applied as "Media FX" (before any FXs)
- project set to 32-bit for precise color grading (very helpful to get rid of banding)
- 8-bit output

You know, NeatVideo works a lot slower in 32-bit, but I really don't need 32-bit computations with my 8-bit footage (I apply NV before any color processing).
Furthermore NeatVideo in 4K 32-bit becomes very unstable on my config (2GB GPU, 16GB RAM) - I usually get black frames - no matter GPU or CPU is used in NV (I get "out of gpu memory" message when GPU used with 4K footage in 32-bit).
1080p resolution in 8-bit or 32-bit works fine, 4K 8-bit too.

Please, add option to force 8-bit computation for NeatVideo (and/or optimize memory consumption/32 bit mode)
NVTeam
Posts: 2745
Joined: Thu Sep 01, 2005 4:12 pm
Contact:

Post by NVTeam »

Lets consider this issue from several angles:

1. The speed difference of Neat Video processing (as measured for example by Optimize Settings) with 32-bit vs 8-bit data should not be very large. It should typically be about 10-20%. If you see a larger difference in Optimize Settings test, then there may be some problem with the hardware or drivers. Please then post your figures from Optimize and also specify the parameters of the GPU and its driver.

2. If you get black frames with 4K 32-bit (even if Neat Video is set to use the CPU only), that may indicate a shortage of GPU memory experienced by Vegas itself. Vegas uses more GPU resources when working with larger frames, so it is not surprising that Vegas may fail (and so produce black frames) when running low on the GPU memory. If Vegas fails like that (and it is Vegas failing, not Neat Video, because Neat Video doesn't use the GPU), then there may be several possible workarounds:

a. to use a GPU with larger memory;
b. to switch Vegas from CUDA to OpenCL mode or vice versa (if such an option is available in your version of Vegas); one of these modes may be more memory efficient than the other, depending on implementation of the video drivers;
c. to switch Vegas to CPU-only mode (if such an option is available).

I recommend to try these options (remember to set Neat Video itself to CPU-only mode) to see if any of them allows to avoid the black frames. If it is possible to avoid black frames at least in one of the cases, then you will be able to identify the trigger of the problem.

3. Even if Neat Video itself was somehow forced (by some settings inside Neat Video itself) to do its internal processing in 8-bit precision, that would still not change the Vegas side of the processing workflow. Vegas would still think that it has to work in 32-bit precision when preparing input data for and receiving output data from Neat Video. Vegas would still use more memory than if the project was set to 8-bit precision. Which is why forcing Neat Video alone might not really help Vegas. Especially if you also take the point 2 above into account.

Therefore, the solution you suggest ("add option to force 8-bit computation for NeatVideo and/or optimize memory consumption/32 bit mode") may not be very effective. Neat Video's GPU memory consumption (1) can be managed already, (2) can be disabled altogether. However, Neat Video is just one of the users of the GPU, while there are others too. I think it is necessary to take them all into account to achieve good results.

Please try the workarounds described above, at least for a test. If none of them work in your test cases, I recommend to try to pre-denoise the required footage in a separate 8-bit project where you apply only noise filter and force Vegas to work in 8-bit precision to save memory resources.

Hope this helps,
Vlad
Rush_iam
Posts: 3
Joined: Tue Nov 08, 2016 9:31 am

Post by Rush_iam »

Thank you very much for your comprehensive technical reccomendations!

Sorry, my mistake - just found that if NeatVideo set to CPU mode - I get no black frames.
And I missed to mention one thing in my workflow - my project is 1080p and output is 1080p, it's the footage only - in 4K.
So all other effects except NeatVideo - they work in 1080p-32bit (because they all applied as "Track FX" - after downsizing to 1080p, but NeatVideo the only applied to "Media FX" to source footage).

I tried your suggestion to disable GPU in Vegas Pro - and now it works! (even with NeatVideo set to GPU+CPU).
I also tried to set Vegas Pro to utilize internal Intel GPU instead of discrete Nvidia GPU - and it works too (NV works on Nvidia at the same time).

And so here is summary what I get (4k footage, 1080p-32bit project):
BLACK 32-bit: GPU Nvidia Vegas + GPU NVidia NeatVideo
GOOD 8-bit: GPU Nvidia Vegas + GPU NVidia NeatVideo
GOOD 32-bit: GPU Nvidia Vegas + CPU NeatVideo
GOOD 32-bit: GPU Intel Vegas + GPU Nvidia NeatVideo

I did some measurements of GPU memory consumption with Vegas set to Intel GPU and NeatVideo set to Nvidia GPU in 1080p-32bit and 1080-8bit project with 4K footage.
According to GPU-Z:
in 32-bit project:
- Vegas up to 1500 MB video RAM of Intel (actually it's system RAM)
- NeatVideo up to 900 MB video RAM of NVidia.
in 8-bit project:
- Vegas up to 600 MB video RAM of Intel
- NeatVideo up to 900 MB video RAM of NVidia.

It seems, that NeatVideo uses about same amount of memory in 32-bit, so it's my fault to suggest 8-bit switch for memory reasons (it's only benefit is speed improvements).
NVTeam
Posts: 2745
Joined: Thu Sep 01, 2005 4:12 pm
Contact:

Post by NVTeam »

Thank you for a detailed reply. I am glad you could find a way to avoid the problem by smart managing use of the available GPU resources.

The GPU memory used by Neat Video does not directly depend on the bitdepth. Neat Video may use more GPU memory when more of that memory is available on the GPU but can also adapt to smaller sizes of that memory.

It is of course better to have more memory on the GPU to accomodate all its users (Vegas, NV, etc.). However if you can fit into available space by managing the available resources, that could work too.

Kind regards,
Vlad
Rush_iam
Posts: 3
Joined: Tue Nov 08, 2016 9:31 am

Post by Rush_iam »

Despite using Intel GPU for Vegas and Nvidia GPU for NeatVideo - it didn't worked well - in some situations (crossfades) - I still get black frames in 4K 32bit.

Is it possible that 2GB video memory is not always enough for NeatVideo in 4K 32bit?
NVTeam
Posts: 2745
Joined: Thu Sep 01, 2005 4:12 pm
Contact:

Post by NVTeam »

If there is not enough GPU memory for Neat Video, then it will use less memory. If there is no memory at all, then it will use the CPU instead of GPU. So it shouldn't be a problem.

Please try to reduce the percentage in Performance tab of NV Preferences to 50%. If that doesn't change the outcome, then the problem is likely related to a specific combination of effects, clips and project settings. Please then prepare a small test project allowing to reproduce the problem and send it to support [at] neatvideo.com for direct tests.

Thank you,
Vlad
Post Reply