Question / Help Failed to open NVENC codec: Unknown error occurred

tophatcat999

New Member
When trying to record with OBS, it tells me that "starting the output failed." I have pasted my log below. All of my drivers are up to date, I do not see what is failing.




18:39:03.308: CPU Name: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
18:39:03.308: CPU Speed: 3192MHz
18:39:03.308: Physical Cores: 4, Logical Cores: 4
18:39:03.308: Physical Memory: 8072MB Total, 5090MB Free
18:39:03.308: Windows Version: 6.1 Build 7601 (revision: 23915; 64-bit)
18:39:03.308: Running as administrator: false
18:39:03.308: Aero is Enabled
18:39:03.308: Portable mode: false
18:39:03.318: OBS 20.1.3 (64bit, windows)
18:39:03.318: ---------------------------------
18:39:03.319: ---------------------------------
18:39:03.319: audio settings reset:
18:39:03.319: samples per sec: 44100
18:39:03.319: speakers: 2
18:39:03.320: ---------------------------------
18:39:03.320: Initializing D3D11...
18:39:03.320: Available Video Adapters:
18:39:03.323: Adapter 1: NVIDIA GeForce GT 730
18:39:03.323: Dedicated VRAM: 2070609920
18:39:03.323: Shared VRAM: 2147807232
18:39:03.323: output 1: pos={0, 0}, size={1920, 1080}, attached=true
18:39:03.323: Adapter 2: Intel(R) HD Graphics 530
18:39:03.323: Dedicated VRAM: 201326592
18:39:03.323: Shared VRAM: 1711276032
18:39:03.327: Loading up D3D11 on adapter NVIDIA GeForce GT 730 (0)
18:39:03.338: D3D11 loaded successfully, feature level used: 45056
18:39:04.022: ---------------------------------
18:39:04.022: video settings reset:
18:39:04.022: base resolution: 1920x1080
18:39:04.022: output resolution: 1920x1080
18:39:04.022: downscale filter: Bicubic
18:39:04.022: fps: 60/1
18:39:04.022: format: NV12
18:39:04.024: Audio monitoring device:
18:39:04.024: name: Default
18:39:04.024: id: default
18:39:04.024: ---------------------------------
18:39:04.025: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
18:39:04.026: [AMF] Encountered Exception during AMF initialization: Unable to load 'amfrt64.dll', error code 126.
18:39:04.026: Failed to initialize module 'enc-amf.dll'
18:39:04.034: NVENC supported
18:39:04.067: Couldn't find VLC installation, VLC video source disabled
18:39:04.073: No blackmagic support
18:39:04.077: [Media Foundation encoder]: plugin is disabled for performance reasons on Windows versions prior to 8
18:39:04.190: ---------------------------------
18:39:04.190: Loaded Modules:
18:39:04.190: win-wasapi.dll
18:39:04.190: win-mf.dll
18:39:04.190: win-dshow.dll
18:39:04.190: win-decklink.dll
18:39:04.190: win-capture.dll
18:39:04.190: vlc-video.dll
18:39:04.190: text-freetype2.dll
18:39:04.190: rtmp-services.dll
18:39:04.190: obs-x264.dll
18:39:04.190: obs-vst.dll
18:39:04.190: obs-transitions.dll
18:39:04.190: obs-text.dll
18:39:04.190: obs-qsv11.dll
18:39:04.190: obs-outputs.dll
18:39:04.190: obs-filters.dll
18:39:04.190: obs-ffmpeg.dll
18:39:04.190: image-source.dll
18:39:04.190: frontend-tools.dll
18:39:04.190: enc-amf.dll
18:39:04.190: coreaudio-encoder.dll
18:39:04.190: ---------------------------------
18:39:04.191: ==== Startup complete ===============================================
18:39:04.191: Service '' not found
18:39:04.193: All scene data cleared
18:39:04.193: ------------------------------------------------
18:39:04.232: WASAPI: Device 'Speakers (Realtek High Definition Audio)' initialized
18:39:04.233: Switched to scene 'Scene'
18:39:04.233: ------------------------------------------------
18:39:04.233: Loaded scenes:
18:39:04.233: - scene 'Scene':
18:39:04.233: ------------------------------------------------
18:39:04.269: adding 23 milliseconds of audio buffering, total audio buffering is now 23 milliseconds
18:39:04.533: adding 23 milliseconds of audio buffering, total audio buffering is now 46 milliseconds
18:39:56.052: ---------------------------------
18:39:56.052: [NVENC encoder: 'simple_h264_recording'] settings:
18:39:56.052: rate_control: CQP
18:39:56.052: bitrate: 0
18:39:56.052: cqp: 23
18:39:56.052: keyint: 250
18:39:56.052: preset: hq
18:39:56.052: profile: high
18:39:56.052: level: auto
18:39:56.052: width: 1920
18:39:56.052: height: 1080
18:39:56.052: 2-pass: true
18:39:56.052: b-frames: 2
18:39:56.052: GPU: 0
18:39:56.052:
18:39:56.055: [NVENC encoder: 'simple_h264_recording'] Failed to open NVENC codec: Unknown error occurred
 
Exact same issue. Had been working fine. Might have updated OBS? Might have updated Windows 10? Have definitely updated Nvidia drivers. Any ideas?


18:50:50.798: CPU Name: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
18:50:50.798: CPU Speed: 2904MHz
18:50:50.798: Physical Cores: 2, Logical Cores: 4
18:50:50.798: Physical Memory: 16286MB Total, 12171MB Free
18:50:50.798: Windows Version: 10.0 Build 16299 (revision: 248; 64-bit)
18:50:50.798: Running as administrator: true
18:50:50.798: Aero is Enabled (Aero is always on for windows 8 and above)
18:50:50.798: Windows 10 Gaming Features:
18:50:50.798: Game DVR: On
18:50:50.800: Sec. Software Status:
18:50:50.800: Windows Defender Antivirus: enabled (AV)
18:50:50.800: McAfee VirusScan: disabled (AV)
18:50:50.801: McAfee Firewall: disabled (FW)
18:50:50.801: Windows Firewall: enabled (FW)
18:50:50.801: Windows Defender Antivirus: enabled (ASW)
18:50:50.801: McAfee VirusScan: disabled (ASW)
18:50:50.801: Portable mode: false
18:50:50.811: OBS 21.0.1 (64bit, windows)
18:50:50.811: ---------------------------------
18:50:50.812: ---------------------------------
18:50:50.812: audio settings reset:
18:50:50.812: samples per sec: 44100
18:50:50.812: speakers: 2
18:50:50.813: ---------------------------------
18:50:50.813: Initializing D3D11...
18:50:50.813: Available Video Adapters:
18:50:50.816: Adapter 1: Intel(R) HD Graphics 620
18:50:50.816: Dedicated VRAM: 134217728
18:50:50.816: Shared VRAM: 4244002816
18:50:50.816: output 1: pos={0, 0}, size={1920, 1080}, attached=true
18:50:50.816: output 2: pos={0, -1080}, size={1920, 1080}, attached=true
18:50:50.816: Adapter 2: NVIDIA GeForce GTX 950M
18:50:50.816: Dedicated VRAM: 2107703296
18:50:50.816: Shared VRAM: 4244002816
18:50:50.819: Loading up D3D11 on adapter Intel(R) HD Graphics 620 (0)
18:50:50.826: D3D11 loaded successfully, feature level used: 45056
18:50:51.543: ---------------------------------
18:50:51.543: video settings reset:
18:50:51.543: base resolution: 1280x720
18:50:51.543: output resolution: 1280x720
18:50:51.543: downscale filter: Bicubic
18:50:51.543: fps: 60/1
18:50:51.543: format: NV12
18:50:51.544: Audio monitoring device:
18:50:51.544: name: Speakers / Headphones (Realtek High Definition Audio)
18:50:51.544: id: {0.0.0.00000000}.{9be31335-0b7b-403d-aa3f-01b748bfc796}
18:50:51.544: ---------------------------------
18:50:51.546: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/chrome_elf.dll' not found, loading of module failed
18:50:51.547: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
18:50:51.587: [AMF] <obs_module_load> AMF not supported (no AMD graphics)
18:50:51.587: Failed to initialize module 'enc-amf.dll'
18:50:51.598: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libcef.dll' not found, loading of module failed
18:50:51.599: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libEGL.dll' not found, loading of module failed
18:50:51.599: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libGLESv2.dll' not found, loading of module failed
18:50:51.600: Failed to load 'en-US' text for module: 'obs-browser.dll'
18:50:51.600: [browser_source: 'Version: 1.29.0']
18:50:51.603: NVENC supported
18:50:51.604: [obs-ndi] hello ! (version 4.1.1)
18:50:51.605: [obs-ndi] Trying 'C:\Program Files\NewTek\NewTek NDI Redist\v3'
18:50:51.605: [obs-ndi] Found NDI library at 'C:/Program Files/NewTek/NewTek NDI Redist/v3/Processing.NDI.Lib.x64.dll'
18:50:51.608: [obs-ndi] NDI runtime loaded successfully
18:50:51.612: [obs-ndi] NDI library initialized successfully
18:50:51.644: VLC found, VLC video source enabled
18:50:51.649: No blackmagic support
18:50:51.783: ---------------------------------
18:50:51.783: Loaded Modules:
18:50:51.783: win-wasapi.dll
18:50:51.783: win-mf.dll
18:50:51.783: win-dshow.dll
18:50:51.783: win-decklink.dll
18:50:51.783: win-capture.dll
18:50:51.783: vlc-video.dll
18:50:51.783: text-freetype2.dll
18:50:51.783: rtmp-services.dll
18:50:51.783: obs-x264.dll
18:50:51.783: obs-vst.dll
18:50:51.783: obs-transitions.dll
18:50:51.783: obs-text.dll
18:50:51.783: obs-qsv11.dll
18:50:51.783: obs-outputs.dll
18:50:51.783: obs-ndi.dll
18:50:51.783: obs-filters.dll
18:50:51.783: obs-ffmpeg.dll
18:50:51.783: obs-browser.dll
18:50:51.783: image-source.dll
18:50:51.783: frontend-tools.dll
18:50:51.783: enc-amf.dll
18:50:51.783: coreaudio-encoder.dll
18:50:51.783: ---------------------------------
18:50:51.783: ==== Startup complete ===============================================


19:01:20.588: ---------------------------------
19:01:20.588: [NVENC encoder: 'simple_h264_stream'] settings:
19:01:20.588: rate_control: CBR
19:01:20.588: bitrate: 4000
19:01:20.588: cqp: 0
19:01:20.588: keyint: 120
19:01:20.588: preset: default
19:01:20.588: profile: main
19:01:20.588: level: auto
19:01:20.588: width: 1280
19:01:20.588: height: 720
19:01:20.588: 2-pass: true
19:01:20.588: b-frames: 2
19:01:20.588: GPU: 0
19:01:20.588:
19:01:21.118: error: Cannot init CUDA
19:01:21.119: [NVENC encoder: 'simple_h264_stream'] Failed to open NVENC codec: Unknown error occurred
 
FIXED? In my case, the NVIDIA driver for my GeForce GTX 950M was updated 1/23/2018 to version: 23.21.13.9077
I rolled back the driver (after trying to update it as instructed, like a good boy) to:

5/1/2017 version 22.21.13.8205

And everything seems to be working again.

So this has to be an OBS bug. How does that get reported?
 
Actually, not fixed. After re-booting, I got the same error. So I then installed the latest drivers, and it worked fine. Then rebooted again, and it stopped working. Rolled back drivers, and it worked fine. Can exit OBS and restart, and that's OK. But as soon as I re-boot, I get the error again.

Any suggestions? Seem like an OBS issue, not Nvidia.
 
Used DDU in safe mode to clean out Nvidia drivers. and that didn't help. Reinstalled latest version of OBS. That didn't help.

Tried going back to the previous version of OBS -- that didn't help either. I'm now looking to rollback recent Windows patches and try that.

I currently testing with an absolutely stripped install. No scenes, no plugins.

Not sure I posted this but using the software x264 encoder works fine, but bumps up my CPU usage by 20% and that's too high for my app.

Anyone else having a problem like this? I assume using those Nvidia drivers for encoding a popular option. For my app, work much better than QuickSync.
 
Could someone verify they've used the latest version of Windows 10 w/ OBS and NVidia drivers (for NVIDIA GeForce GTX 950M) and gotten it to work?
Thanks.
 
@Chaskerr4

If you haven't solved this yet I might have a solution:
Go to device manager and under Display Adapters check to see that your graphics card is listed.
If it isn't, right click on Display Adapters and click 'Scan for hardware changes'.

Hope that helps?
 
well fwiw i have a 1080 and NVENC still works, but performance using nvenc has become unbearable for the past few weeks. I suspect something is broken with the latest windows and/or nvidia drivers.
 
Manajro KDE Plasma 18.1.3

Had the same problem, install my latest GT710 driver version 440xx, reboot and everything is working fine now.
 
After the last OBS update, I noticed - that my video recording button did not work.
This problem starts only after this update.
Streams- okay. Its works very well, but not video recording. It says that:
"Failed to open NVENC codec: Unknown error occurred".
Even redownload doesn't help.
And I still can't fix this problem. After all, I know that my video driver is good. No problem with that. I guess.

I have pasted my log below
-----

18:00:18.385: [jim-nvenc] init_session: nv.nvEncOpenEncodeSessionEx(&params, &enc->session) failed: 8 (NV_ENC_ERR_INVALID_PARAM)
18:00:18.398: [jim-nvenc] nvenc_create_internal failed, trying again without Psycho Visual Tuning
18:00:18.430: [jim-nvenc] init_session: nv.nvEncOpenEncodeSessionEx(&params, &enc->session) failed: 8 (NV_ENC_ERR_INVALID_PARAM)
18:00:18.443: ---------------------------------
18:00:18.443: [NVENC encoder: 'simple_h264_recording'] settings:
18:00:18.443: rate_control: CQP
18:00:18.443: bitrate: 0
18:00:18.443: cqp: 21
18:00:18.443: keyint: 250
18:00:18.443: preset: hq
18:00:18.443: profile: high
18:00:18.443: width: 1280
18:00:18.443: height: 720
18:00:18.443: 2-pass: false
18:00:18.443: b-frames: 2
18:00:18.443: psycho-aq: 1
18:00:18.443: GPU: 0
18:00:18.443:
18:00:18.754: [NVENC encoder: 'simple_h264_recording'] Failed to open NVENC codec: Unknown error occurred
18:00:18.754: [NVENC encoder] nvenc_create_internal failed, trying again without Psycho Visual Tuning
18:00:18.754: ---------------------------------
18:00:18.755: [NVENC encoder: 'simple_h264_recording'] settings:
18:00:18.755: rate_control: CQP
18:00:18.755: bitrate: 0
18:00:18.755: cqp: 21
18:00:18.755: keyint: 250
18:00:18.755: preset: hq
18:00:18.755: profile: high
18:00:18.755: width: 1280
18:00:18.755: height: 720
18:00:18.755: 2-pass: false
18:00:18.755: b-frames: 2
18:00:18.755: psycho-aq: 0
18:00:18.755: GPU: 0
18:00:18.755:
18:00:19.075: [NVENC encoder: 'simple_h264_recording'] Failed to open NVENC codec: Unknown error occurred
 
[It was old version of video driver. Please check your driver and try to update they, cause its may help]
 
Back
Top