Bug - NVENC broken in 19b5-6

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

adinbied

  • Posts: 2
  • Joined: Wed Aug 07, 2024 8:19 pm
  • Real Name: Adin Biederman

Bug - NVENC broken in 19b5-6

PostThu Aug 08, 2024 12:30 am

Hey there!
So I've spent the last few hours diving down debugging and troubleshooting rabbit holes, but I'm now pretty confident NVENC is broken in Resolve 19 betas 5 and 6. I first noticed the issue when trying to enable Remote Monitoring and it giving a "Failed to Initialize Video Encoder" error - diving into debug logs at that point, I see from RemoteStreamer: "Failed to initialize, failed to open NVENC session (NV_ENC_ERR_INVALID_VERSION).".

Huh, that's odd - I'm on the latest release Nvidia Driver (3080 Ti, Win 10) - maybe its a studio vs game ready issue? So I try a fresh install of both the latest studio and game ready drivers and nope, still the same error. Out of curiosity/desperation, I then went and tried reverting back to a driver from a few months back that I know NVENC worked with Resolve 18.6 with, and nope - still the same error. Did one more clean install using latest nvidia studio driver, and after it still giving the NV_ENC_ERR_INVALID_VERSION I decided to pivot.

Next up, I thought "If Remote Monitoring is trying to use NVENC and is failing, does normal NVENC deliver work?" Aaaaand of course, the answer is no. The deliver window popup error gives a "Render Job 2 failed as the current clip could not be processed, Cannot find appropriate codec for encoding the video frame." error. Native (software/cpu based) H264 and H265 work fine, but neither work with the Nvidia Encoder selected.

Going into the debug logs, here we get a bit more info, SyManager comes back with the error "There is no current clip, SetCurrentFrame failed.", followed by IO's error reporting logging: "NVENC m_EncodeAPI.nvEncOpenEncodeSessionEx(&encodeSessionExParams, &m_pEncodeSession) return: 15", "Nvidia codec cannot be initialized with property successfully", and "Failed to create encoder."

At this point, I check if NVENC is functioning at all on my system, and try using Handbrake's NVENC x264 encoder, and it works flawlessly. I try OBS NVENC recording, works great. Go back to Resolve, and it errors out. I double check Resolve's Memory and GPU settings and yup - 3080 Ti selected, processing mode CUDA, neural engine support enabled, memory limits near maxed out - everything looks fine.

Looking online for the exact NVENC error log message, it looks like this post is saying the return: 15 is due to some invalid struct version error: forums.developer.nvidia. com/t/openencodesessionex-fail-with-invalid-struct-version-error/125076 but that's starting to get out of my wheelhouse.

Figured I'd let you guys know about this to hopefully figure out whats going on!

Thanks!

Edit: Link to Resolve diagnostic log zip, system info NFO, and dxdiag txt: https:// drive.google. com/drive/folders/1230hTrtHy4MIXLfXP2RYOIGJoyYckUDv?usp=sharing
Last edited by adinbied on Thu Aug 08, 2024 1:01 pm, edited 1 time in total.
Online

Mads Johansen

  • Posts: 1403
  • Joined: Mon Dec 19, 2016 10:51 am

Re: Bug - NVENC broken in 19b5-6

PostThu Aug 08, 2024 8:46 am

You need to provide the actual whole log and a NFO. See the FAQ for details as to how to do that.
Davinci Resolve Studio 20 build 49, Windows 11, Ultra 7 265k, Nvidia 5070 TI, 576.80 Studio
Offline
User avatar

Ivor_Bigunn

  • Posts: 44
  • Joined: Wed May 29, 2019 11:11 pm
  • Real Name: James Muir

Re: Bug - NVENC broken in 19b5-6

PostThu Aug 08, 2024 2:04 pm

I have been using Nvidia H264 and h265 encoding for export from all Betas including b5 on dozens of jobs without ever encountering any problems.

If it is relevant, my Nvidia drivers are Studio 555.99 June 2024.

IB
AMD 5900X 12-Core Processor; Nvidia 3080 VideoCard; 32Gb DDR4 Memory; Windows 11; Davinci Resolve Studio 20 Beta; Samsung Odyssey G80SD 4K Monitor.
Offline

adinbied

  • Posts: 2
  • Joined: Wed Aug 07, 2024 8:19 pm
  • Real Name: Adin Biederman

Re: Bug - NVENC broken in 19b5-6

PostThu Aug 08, 2024 3:18 pm

The plot thickens - looks like its maybe something to do with the audio track that NVENC isn't liking - trying to use the Vokuder encoder plugin to go from resolve to NVENC output and it errors out as well, but that at least gives super detailed logging and seeing:
Code: Select all
[08:08:39]   FFmpeg: timecode: tbc=1/0 invalid, fallback on 24000/1001
[08:08:39]   FFmpeg: Application provided duration: -9223372036854775808 / timestamp: -9223372036854775808 is out of range for mov/mp4 format
[08:08:39]   FFmpeg: pts has no value
[08:08:39]   FFmpeg: Calling dl_fn->cuda_dl->cuCtxPushCurrent(ctx->cu_context)
[08:08:39]   FFmpeg: Calling dl_fn->cuda_dl->cuCtxPopCurrent(&dummy)
[08:08:39]   FFmpeg: Calling dl_fn->cuda_dl->cuCtxPushCurrent(ctx->cu_context)
[08:08:39]   FFmpeg: Calling dl_fn->cuda_dl->cuCtxPopCurrent(&dummy)
[08:08:39] Frame #1: vEncoding: 1977 us, Latency: 1984 us
[08:08:39]   FFmpeg: Sample format was not set or was invalid
[08:08:39]   FFmpeg: Setting 'n' to value '1024'
[08:08:39]   FFmpeg: Setting 'p' to value '0'
[08:08:39]   FFmpeg: Setting 'channel_layouts' to value '2c'
[08:08:39]   FFmpeg: Setting 'sample_fmts' to value 'fltp'
[08:08:39]   FFmpeg: Setting 'sample_rates' to value '48000'
[08:08:39]   FFmpeg: auto-inserting filter 'auto_resampler_0' between the filter 'in' and the filter 'Parsed_asetnsamples_0'
[08:08:39]   FFmpeg: Impossible to convert between the formats supported by the filter 'in' and the filter 'auto_resampler_0'
[08:08:39] Unable to configure filter graph. (Code -40)
[08:08:39] Applying audio filters: asetnsamples=n=1024:p=0,aformat=channel_layouts=2c:sample_fmts=fltp:sample_rates=48000
[08:08:39]   FFmpeg: filter context - fmt: (null) r: 48000 layout: 0 ch: 2, incoming frame - fmt: (null) r: 48000 layout: 3 ch: 2 pts_time: -nan(ind)
[08:08:39]   FFmpeg: Changing audio frame properties on the fly is not supported.
[08:08:39] Exported 1 frames in 0 seconds. (avg. 100.00 fps)
[08:08:39] Flushing encoders and finalizing ...
led me to believe its something about the audio stream that NVENC isn't liking here - so I deselected "export audio" in the resolve export panel, and lo and behold NVENC started working, but only within Vokuder's NVENC output, the resolve NVIDIA encoder still doesn't work even with export audio deselected - I've tried wiping Resolve AppData and settings, no dice, tried full reinstall of CUDA 12.6 + nvidia drivers, no dice, tried reinstall of resolve, no dice, at this point pretty confused as to what is actually going on, and why it seems nobody else is having the same issue........
Offline

perrycool

  • Posts: 5
  • Joined: Wed Aug 07, 2024 7:15 am
  • Real Name: Eduard Burca

Re: Bug - NVENC broken in 19b5-6

PostThu Aug 08, 2024 3:29 pm

I have the same issue, studio driver latest on a 4090. Can't make it render no matter what.
Offline
User avatar

Dwaine Maggart

Blackmagic Design

  • Posts: 13239
  • Joined: Wed Aug 22, 2012 2:53 pm

Re: Bug - NVENC broken in 19b5-6

PostThu Aug 08, 2024 5:55 pm

If it was that busted, lots more people would be complaining.

What I suspect your issue is related to are all the MainConcept Plugin errors I see in the logs:

[0x000070b4] | IO | WARN | 2024-08-08 05:56:08,408 | Plugin Warning :: !!!!!!! plugin.cpp !!!!!!! g_HandleGetInfo() SETUP MAINCONCEPT ENGINE !!!!!!
[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,141 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! Supported NVIDIA devices (hevcnvvenc): !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,141 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! id=0, NVIDIA GeForce RTX 3080 Ti, hw_mode=2 !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,242 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! Supported NVIDIA devices (hevcnvvenc): !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,243 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! id=0, NVIDIA GeForce RTX 3080 Ti, hw_mode=2 !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,289 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! Supported NVIDIA devices (hevcnvvenc): !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,289 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! id=0, NVIDIA GeForce RTX 3080 Ti, hw_mode=2 !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,334 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! Supported NVIDIA devices (hevcnvvenc): !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,334 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! id=0, NVIDIA GeForce RTX 3080 Ti, hw_mode=2 !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,378 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! Supported NVIDIA devices (hevcnvvenc): !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,378 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! id=0, NVIDIA GeForce RTX 3080 Ti, hw_mode=2 !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,428 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! Supported NVIDIA devices (hevcnvvenc): !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,428 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! id=0, NVIDIA GeForce RTX 3080 Ti, hw_mode=2 !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,490 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! Supported NVIDIA devices (hevcnvvenc): !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,490 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! id=0, NVIDIA GeForce RTX 3080 Ti, hw_mode=2 !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,535 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! Supported NVIDIA devices (hevcnvvenc): !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,536 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! id=0, NVIDIA GeForce RTX 3080 Ti, hw_mode=2 !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,687 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! Supported NVIDIA devices (hevcnvvenc): !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,687 | Plugin Warning :: !!!!!!! mc_ultra_defs.cpp enum_nvidia_devices !!!!!!! id=0, NVIDIA GeForce RTX 3080 Ti, hw_mode=2 !!!!!!

[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,733 | Plugin Warning :: !!!!!!! plugin.cpp !!!!!!! g_ListCodecs() !!!!!!! begin !!!!!!
[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,733 | Plugin Warning :: !!!!!!! plugin.cpp !!!!!!! g_ListContainers() !!!!!!! begin !!!!!!
[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,734 | Plugin Warning :: !!!!!!! plugin.cpp !!!!!!! g_HandlePluginStart() !!!!!!! begin !!!!!!
[0x000070b4] | IO | INFO | 2024-08-08 05:56:09,734 | Plugin Repository :: loaded plugin [6589D5B2CDA911E7ABC4CEC278B6B50A] at C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\IOPlugins\davinci_mc_ultra_plugin.dvcp.bundle\Contents\Win64\davinci_mc_ultra_plugin.dvcp
[0x000070b4] | IO | INFO | 2024-08-08 05:56:09,736 | Plugin Info :: Voukoder Plugin Version 0.7.0
[0x000070b4] | IO | INFO | 2024-08-08 05:56:09,736 | Plugin Repository :: loaded plugin [40171B2D65B94239A14071161DD132D2] at C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\IOPlugins\voukoder_plugin.dvcp.bundle\Contents\Win64\voukoder_plugin.dvcp
[0x000070b4] | IO | INFO | 2024-08-08 05:56:09,738 | Plugin Repository :: loaded plugin [5D43CE6045114F5887DEF302801E7BBC] at C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\IOPlugins\x264_encoder_plugin.dvcp.bundle\Contents\Win64\x264_encoder_plugin.dvcp
[0x000070b4] | IO | WARN | 2024-08-08 05:56:09,738 | IOPlugin :: Container (5D43CE6045114F5887DEF302801E7BBC:951FF03A0C9911E8BA890ED5F89F718B) not found for codec 5D43CE6045114F5887DEF302801E7BBC:6A88E841D8E4414B879EA480FC90DAB4
Dwaine Maggart
Blackmagic Design DaVinci Support
Offline

ShaheedMalik

  • Posts: 1558
  • Joined: Wed Aug 19, 2020 5:28 am
  • Real Name: Shaheed Malik

Re: Bug - NVENC broken in 19b5-6

PostThu Aug 08, 2024 7:02 pm

Looks like Voukoder Plugin Version 0.7.0 is causing it? OP can you disable it and see if it works correctly?
Offline
User avatar

Kopelent

  • Posts: 13
  • Joined: Wed Dec 06, 2023 2:44 pm
  • Location: Austria
  • Real Name: Jürgen Kopelent

Re: Bug - NVENC broken in 19b5-6

PostFri Aug 23, 2024 7:49 am

Same here too, Encoder Nvidea not working job failed (codec) ?
Resolve Studio 19 Version
WIN 11 PRO 64bit
Intel i9 14th 14900K, (64GB DDR6 RAM), ASUS RTX 4080 16GB
Location: Austria - Salzburg
Offline
User avatar

Kopelent

  • Posts: 13
  • Joined: Wed Dec 06, 2023 2:44 pm
  • Location: Austria
  • Real Name: Jürgen Kopelent

Re: Bug - NVENC broken in 19b5-6

PostSat Aug 31, 2024 6:21 am

Found the problem with job failed (codec) problem

MainConcept - Codec Plugin is the bug.
I deinstalled the plugin and now every export h264, 265 .... is working perfect with nvidea encoder
Resolve Studio 19 Version
WIN 11 PRO 64bit
Intel i9 14th 14900K, (64GB DDR6 RAM), ASUS RTX 4080 16GB
Location: Austria - Salzburg
Offline

Tommie

  • Posts: 3
  • Joined: Thu Sep 19, 2024 4:07 pm
  • Real Name: Thomas Mientus

Re: Bug - NVENC broken in 19b5-6

PostThu Sep 19, 2024 4:21 pm

This is the answer I got from MainConcept on September 06th:
'Codec Plugin version 1.6 will be available in just a few days.
In the meantime, due to compatibility issues, please note the following:
• For Resolve 18 users: Continue using Codec Plugin 1.5.1 with the GPU driver version specified in the docs (to avoid issues with native presets)
• For Resolve 19 users: Please wait a few days for the release of version 1.6 (which will require updated GPU drivers)'
Tommie
Offline

samliq

  • Posts: 16
  • Joined: Mon Dec 04, 2023 11:18 pm
  • Real Name: Valentin Edvence

Re: Bug - NVENC broken in 19b5-6

PostSat Nov 16, 2024 2:24 pm

Is this fixed now in 19.1?

Return to DaVinci Resolve

Who is online

Users browsing this forum: Bing [Bot], dennis9880, Mads Johansen, RobertK and 339 guests