univrsal / input-overlay

Show keyboard, gamepad and mouse input on stream
GNU General Public License v2.0
2.68k stars 239 forks source link

Plugin not working #327

Closed LTHPKBTE closed 1 year ago

LTHPKBTE commented 1 year ago

Describe the bug I'm sure it was install as required, but it doesn't appear normally in obs. OBS log says 14:40:15.693: Module '../../obs-plugins/64bit/input-overlay.dll' not loaded.

To Reproduce Steps to reproduce the behavior: I've been using version 5.0.0 of this plugin and recently upgraded to 5.0.3 (use installer), it doesn't work anymore. So I entered the system's settings panel and found that there are two Input overlays with different version numbers in the program list. After I uninstalled them all and reinstalled with the installer, the plugin still doesn't work.

Expected behavior Plugin work

Screenshots 图片 图片

Additional information: OBS version: 29.0.2 (64 bit) Plugin version: 5.0.3 log file: https://paste.fastmirror.net/?5a7d437f99350504#GDEbLev8kQ1wps81FWaQGG9TnfbvA1CUgvxpgAc1XNq3 https://pastes.dev/AfIJwHSUnC If the link expires, click the arrow below to expand the log

OBS log 14:40:13.889: CPU Name: AMD Ryzen 5 3600 6-Core Processor 14:40:13.889: CPU Speed: 3600MHz 14:40:13.889: Physical Cores: 6, Logical Cores: 12 14:40:13.889: Physical Memory: 16298MB Total, 11825MB Free 14:40:13.889: Windows Version: 10.0 Build 22000 (release: 21H2; revision: 1455; 64-bit) 14:40:13.889: Running as administrator: true 14:40:13.889: Windows 10/11 Gaming Features: 14:40:13.889: Game Bar: Off 14:40:13.889: Game DVR: Off 14:40:13.889: Game Mode: Probably On (no reg key set) 14:40:13.889: Hardware GPU Scheduler: On 14:40:13.898: Sec. Software Status: 14:40:13.901: Current Date/Time: 2023-03-30, 14:40:13 14:40:13.901: Browser Hardware Acceleration: true 14:40:13.901: Hide OBS windows from screen capture: false 14:40:13.901: Qt Version: 6.3.1 (runtime), 6.3.1 (compiled) 14:40:13.901: Portable mode: false 14:40:14.028: OBS 29.0.2 (64-bit, windows) 14:40:14.028: --------------------------------- 14:40:14.030: --------------------------------- 14:40:14.030: audio settings reset: 14:40:14.030: samples per sec: 48000 14:40:14.030: speakers: 2 14:40:14.030: max buffering: 960 milliseconds 14:40:14.030: buffering type: dynamically increasing 14:40:14.033: --------------------------------- 14:40:14.033: Initializing D3D11... 14:40:14.033: Available Video Adapters: 14:40:14.038: Adapter 0: NVIDIA GeForce RTX 2060 SUPER 14:40:14.038: Dedicated VRAM: 4113563648 14:40:14.038: Shared VRAM: 4250398720 14:40:14.038: PCI ID: 10de:1f06 14:40:14.038: Driver Version: 31.0.15.3141 14:40:14.039: output 0: 14:40:14.039: name=27G2G3 14:40:14.039: pos={0, 0} 14:40:14.039: size={1920, 1080} 14:40:14.039: attached=true 14:40:14.039: refresh=165 14:40:14.039: bits_per_color=8 14:40:14.039: space=RGB_FULL_G22_NONE_P709 14:40:14.039: sdr_white_nits=80 14:40:14.039: nit_range=[min=0.500000, max=270.000000, max_full_frame=270.000000] 14:40:14.042: Loading up D3D11 on adapter NVIDIA GeForce RTX 2060 SUPER (0) 14:40:14.172: D3D11 loaded successfully, feature level used: b000 14:40:14.173: DXGI increase maximum frame latency success 14:40:14.174: D3D11 GPU priority setup success 14:40:15.590: --------------------------------- 14:40:15.590: video settings reset: 14:40:15.590: base resolution: 1920x1080 14:40:15.590: output resolution: 1920x1080 14:40:15.590: downscale filter: Area 14:40:15.590: fps: 60/1 14:40:15.590: format: NV12 14:40:15.590: YUV mode: Rec. 709/Full 14:40:15.590: NV12 texture support enabled 14:40:15.590: P010 texture support not available 14:40:15.593: Audio monitoring device: 14:40:15.593: name: 扬声器 (2- USB Audio Device) 14:40:15.593: id: {0.0.0.00000000}.{0e19a34b-0ff6-46ec-ac84-3358c981561e} 14:40:15.593: --------------------------------- 14:40:15.604: No AJA devices found, skipping loading AJA UI plugin 14:40:15.604: Failed to initialize module 'aja-output-ui.dll' 14:40:15.612: No AJA devices found, skipping loading AJA plugin 14:40:15.612: Failed to initialize module 'aja.dll' 14:40:15.613: Skipping module '../../obs-plugins/64bit/chrome_elf.dll', not an OBS plugin 14:40:15.618: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded 14:40:15.619: Failed to load 'en-US' text for module: 'decklink-captions.dll' 14:40:15.622: Failed to load 'en-US' text for module: 'decklink-output-ui.dll' 14:40:15.628: A DeckLink iterator could not be created. The DeckLink drivers may not be installed 14:40:15.628: Failed to initialize module 'decklink.dll' 14:40:15.668: [AMF] Unable to load 'amfrt64.dll', error code 126. 14:40:15.670: [AMF] AMF Test failed due to one or more errors. 14:40:15.670: Failed to initialize module 'enc-amf.dll' 14:40:15.693: Module '../../obs-plugins/64bit/input-overlay.dll' not loaded 14:40:15.693: Skipping module '../../obs-plugins/64bit/libcef.dll', not an OBS plugin 14:40:15.694: Skipping module '../../obs-plugins/64bit/libEGL.dll', not an OBS plugin 14:40:15.695: Skipping module '../../obs-plugins/64bit/libGLESv2.dll', not an OBS plugin 14:40:15.774: [obs-browser]: Version 2.19.0 14:40:15.774: [obs-browser]: CEF Version 103.0.5060.134 (runtime), 103.0.0-5060-shared-textures.2591+g4204d54+chromium-103.0.5060.134 (compiled) 14:40:15.808: NVENC supported 14:40:15.993: [NVENC] AV1 is not supported 14:40:15.997: [noise suppress]: NVIDIA denoiser disabled, redistributable not found or could not be loaded. 14:40:15.998: Failed to get NVVideoEffects.dll version info size 14:40:15.999: [NVIDIA VIDEO FX]: FX disabled, redistributable not found or could not be loaded. 14:40:16.054: [obs-websocket] [obs_module_load] you can haz websockets (Version: 5.1.0 | RPC Version: 1) 14:40:16.054: [obs-websocket] [obs_module_load] Qt version (compile-time): 6.3.1 | Qt version (run-time): 6.3.1 14:40:16.054: [obs-websocket] [obs_module_load] Linked ASIO Version: 101201 14:40:16.069: [obs-websocket] [obs_module_load] Module loaded. 14:40:16.077: Skipping module '../../obs-plugins/64bit/SDL2.dll', not an OBS plugin 14:40:16.080: [Source Record] loaded version 0.3.0 14:40:16.082: LoadLibrary failed for '../../obs-plugins/64bit/SRBeep.dll': The specified module could not be found. 14:40:16.082: (126) 14:40:16.082: Module '../../obs-plugins/64bit/SRBeep.dll' not loaded 14:40:16.088: [vlc-video]: Couldn't find VLC installation, VLC video source disabled 14:40:16.091: [win-capture-audio] Version 2.2.3 (74323e6) 14:40:16.112: --------------------------------- 14:40:16.112: Loaded Modules: 14:40:16.112: win-wasapi.dll 14:40:16.112: win-mf.dll 14:40:16.112: win-dshow.dll 14:40:16.112: win-capture.dll 14:40:16.112: win-capture-audio.dll 14:40:16.112: vlc-video.dll 14:40:16.112: text-freetype2.dll 14:40:16.112: source-record.dll 14:40:16.112: rtmp-services.dll 14:40:16.112: obs-x264.dll 14:40:16.112: obs-websocket.dll 14:40:16.112: obs-vst.dll 14:40:16.112: obs-transitions.dll 14:40:16.112: obs-text.dll 14:40:16.112: obs-qsv11.dll 14:40:16.112: obs-outputs.dll 14:40:16.112: obs-filters.dll 14:40:16.112: obs-ffmpeg.dll 14:40:16.112: obs-browser.dll 14:40:16.112: image-source.dll 14:40:16.112: frontend-tools.dll 14:40:16.112: decklink-output-ui.dll 14:40:16.112: decklink-captions.dll 14:40:16.112: coreaudio-encoder.dll 14:40:16.112: --------------------------------- 14:40:16.112: ==== Startup complete =============================================== 14:40:16.165: All scene data cleared 14:40:16.165: ------------------------------------------------ 14:40:16.178: [win-wasapi: '桌面音频'] update settings: 14:40:16.178: device id: default 14:40:16.178: use device timing: 1 14:40:16.179: [Loaded global audio device]: '桌面音频' 14:40:16.179: [win-wasapi: '麦克风/Aux'] update settings: 14:40:16.179: device id: {0.0.1.00000000}.{e4664ee9-9a93-4ba4-b395-709283aea527} 14:40:16.179: use device timing: 0 14:40:16.179: [noise suppress: '噪声抑制'] NVAFX redist is not installed. 14:40:16.179: [Loaded global audio device]: '麦克风/Aux' 14:40:16.180: - filter: '噪声抑制' (noise_suppress_filter_v2) 14:40:16.180: Source ID 'input-overlay' not found 14:40:16.180: Failed to create source '输入叠加 2'! 14:40:16.180: [window-capture: 'wows'] update settings: 14:40:16.180: executable: WorldOfWarships64.exe 14:40:16.180: method selected: WGC 14:40:16.180: method chosen: WGC 14:40:16.180: 14:40:16.180: Source ID 'input-overlay' not found 14:40:16.180: Failed to create source '输入叠加'! 14:40:16.181: [window-capture: 'OSULAZER'] update settings: 14:40:16.181: executable: osu!.exe 14:40:16.181: method selected: Automatic 14:40:16.181: method chosen: BitBlt 14:40:16.181: 14:40:16.182: [window-capture: '窗口采集(DeepRock)'] update settings: 14:40:16.182: executable: FSD-Win64-Shipping.exe 14:40:16.182: method selected: WGC 14:40:16.182: method chosen: WGC 14:40:16.182: 14:40:16.182: Source ID 'input-overlay' not found 14:40:16.182: Failed to create source 'Input Overlay 2'! 14:40:16.182: Source ID 'input-overlay' not found 14:40:16.182: Failed to create source 'Input Overlay'! 14:40:16.183: [duplicator-monitor-capture: '显示器采集'] update settings: 14:40:16.183: display: 27G2G3 (1920x1080) 14:40:16.183: cursor: true 14:40:16.183: method: WGC 14:40:16.216: WASAPI: Device '27G2G3 (NVIDIA High Definition Audio)' [48000 Hz] initialized 14:40:16.227: WASAPI: Device '麦克风阵列 (3- USB Microphone)' [48000 Hz] initialized 14:40:16.271: adding 42 milliseconds of audio buffering, total audio buffering is now 42 milliseconds (source: 麦克风/Aux) 14:40:16.271: 14:40:17.218: [window-capture: 'Battlefield1'] update settings: 14:40:17.218: executable: bf1.exe 14:40:17.218: method selected: WGC 14:40:17.218: method chosen: WGC 14:40:17.218: 14:40:17.218: [window-capture: '窗口采集'] update settings: 14:40:17.218: executable: Titanfall2.exe 14:40:17.218: method selected: WGC 14:40:17.218: method chosen: WGC 14:40:17.218: 14:40:17.219: [duplicator-monitor-capture: '显示器采集 2'] update settings: 14:40:17.219: display: 27G2G3 (1920x1080) 14:40:17.219: cursor: true 14:40:17.219: method: DXGI 14:40:17.221: Switched to scene 'MC' 14:40:17.223: ------------------------------------------------ 14:40:17.223: Loaded scenes: 14:40:17.223: - scene '战地': 14:40:17.223: - source: '游戏源' (game_capture) 14:40:17.223: - source: 'Battlefield1' (window_capture) 14:40:17.223: - source: '分组' (group) 14:40:17.223: - source: 'Input Overlay' (input-overlay) 14:40:17.223: - source: 'Input Overlay 2' (input-overlay) 14:40:17.223: - source: '应用音频输出捕获' (audio_capture) 14:40:17.223: - scene '战舰': 14:40:17.223: - source: '显示器采集' (monitor_capture) 14:40:17.223: - filter: 'Source Record' (source_record_filter) 14:40:17.223: - source: '游戏源' (game_capture) 14:40:17.223: - source: 'wows' (window_capture) 14:40:17.223: - source: '分组 3' (group) 14:40:17.223: - source: 'Input Overlay 2' (input-overlay) 14:40:17.223: - source: '输入叠加 2' (input-overlay) 14:40:17.223: - source: '输入叠加' (input-overlay) 14:40:17.223: - source: '应用音频输出捕获' (audio_capture) 14:40:17.223: - scene 'OSUL': 14:40:17.223: - source: '显示器采集' (monitor_capture) 14:40:17.223: - filter: 'Source Record' (source_record_filter) 14:40:17.223: - source: '游戏源' (game_capture) 14:40:17.223: - source: 'OSULAZER' (window_capture) 14:40:17.223: - source: 'Input Overlay' (input-overlay) 14:40:17.223: - source: 'Input Overlay 2' (input-overlay) 14:40:17.223: - source: '应用音频输出捕获' (audio_capture) 14:40:17.223: - scene '深岩': 14:40:17.223: - source: '显示器采集' (monitor_capture) 14:40:17.223: - filter: 'Source Record' (source_record_filter) 14:40:17.223: - source: '窗口采集(DeepRock)' (window_capture) 14:40:17.223: - source: '游戏源' (game_capture) 14:40:17.223: - source: '分组 2' (group) 14:40:17.223: - source: 'Input Overlay' (input-overlay) 14:40:17.223: - source: 'Input Overlay 2' (input-overlay) 14:40:17.223: - source: '应用音频输出捕获' (audio_capture) 14:40:17.223: - scene 'LOL': 14:40:17.223: - source: '窗口采集' (window_capture) 14:40:17.223: - source: '分组 3' (group) 14:40:17.223: - source: 'Input Overlay 2' (input-overlay) 14:40:17.223: - source: '输入叠加 2' (input-overlay) 14:40:17.223: - source: '输入叠加' (input-overlay) 14:40:17.223: - source: '应用音频输出捕获' (audio_capture) 14:40:17.223: - scene 'Celeste': 14:40:17.223: - source: '显示器采集' (monitor_capture) 14:40:17.223: - filter: 'Source Record' (source_record_filter) 14:40:17.223: - source: '分组 3' (group) 14:40:17.223: - source: 'Input Overlay 2' (input-overlay) 14:40:17.223: - source: '输入叠加 2' (input-overlay) 14:40:17.223: - source: '输入叠加' (input-overlay) 14:40:17.223: - source: '应用音频输出捕获' (audio_capture) 14:40:17.223: - scene 'MC': 14:40:17.223: - source: '显示器采集 2' (monitor_capture) 14:40:17.223: - source: '分组 2' (group) 14:40:17.223: - source: 'Input Overlay' (input-overlay) 14:40:17.223: - source: 'Input Overlay 2' (input-overlay) 14:40:17.223: - source: '应用音频输出捕获' (audio_capture) 14:40:17.223: ------------------------------------------------

Additional context I'm not sure if this is related to #296, but it looks like their solution doesn't work for me. I'm using translation software because English is not my first language. Please ignore grammatical errors.

univrsal commented 1 year ago

Someone on the forums is having the same issue, you can try opening the input-overlay.dll with Dependencies, this is what it should look like:

This error can also be caused by missing MSVC runtime, you can download the most recent and older versions here

LTHPKBTE commented 1 year ago

Someone on the forums is having the same issue, you can try opening the input-overlay.dll with Dependencies, this is what it should look like:

This error can also be caused by missing MSVC runtime, you can download the most recent and older versions here

图片 MSVC runtime appears to be installed.

anchaides commented 1 year ago

I was having a similar issue when trying to load the plugin in the portable version, However in my case it was that since I was trying to compile the module from source to add my own changes I was not copying SDL2.dll That doesn't appear to be the issue here . As the message reported there, is different from the one I saw.

In my case it was: ./libobs/util/platform-windows.c:116: blog(LOG_INFO, "LoadLibrary failed for '%s': %s (%lu)", path,

This happens once the API has returned error code 126, meaning a dependency was missing. However in your case I notice you see

14:40:15.693: Module '../../obs-plugins/64bit/input-overlay.dll' not loaded.

with no error message or error code associated with it. In this particular case, obs omits printing an specific error if the windows API, when called returns error code 127 meaning "Not printing errors for modules that are not meant to be dynamically loaded"

`h_library = LoadLibraryW(wpath);

bfree(wpath);

if (wpath_slash) SetDllDirectoryW(NULL);

if (!h_library) {
    DWORD error = GetLastError();

    /* don't print error for libraries that aren't meant to be
     * dynamically linked */
    if (error == ERROR_PROC_NOT_FOUND)
        return NULL;

    char *message = NULL;`

This is an error code you'd expect to see when the loaded module is not part of wpath. This must be what you are seeing because any other error would have shown you a windows API error code.

if this function returns NULL that's when the message you see gets printed.

mod.module = os_dlopen(path); if (!mod.module) { blog(LOG_WARNING, "Module '%s' not loaded", path); return MODULE_FILE_NOT_FOUND; } if os_dlopen returns NULL and no additional error message is printed, it follows LoadLibraryW returns a 127 error code. However it looks like the DLL is there. So probably something got messed up when you reinstalled the plugin.

LTHPKBTE commented 1 year ago

I try to use windbg to debug, and the log it feeds back is as follows:

ModLoad: 00007ffc`df900000 00007ffc`df93e000   C:\Program Files\obs-studio\obs-plugins\64bit\input-overlay.dll
ModLoad: 00000000`6f360000 00000000`6f4c0000   C:\Program Files\obs-studio\bin\64bit\SDL2.dll
(309c.40e8): Unknown exception - code c0000139 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
ntdll!RtlRaiseStatus+0x3d:
00007ffd`1fc8f86d 65488b0c2560000000 mov   rcx,qword ptr gs:[60h] gs:00000000`00000060=????????????????
Module '../../obs-plugins/64bit/input-overlay.dll' not loaded
Failed to load module file '../../obs-plugins/64bit/input-overlay.dll', file not found

What situation will cause this error? How should I proceed to diagnose what the problem is? Since I'm not a techie, I haven't figured out any workaround.

univrsal commented 1 year ago

I think I know what the problem is. You have the plugin SRBeep installed, which also uses SDL2, so the two plugins are in conflict. Try uninstalling it (inlcuding the SDL2.dll) then reinstall input overlay and see if that changes anything.

LTHPKBTE commented 1 year ago

No change after uninstalling SRBeep, same log given by windbg. The OBS logs are as follows: https://paste.fastmirror.net/?459a192ed0d0cdc1#2HjKphhfU9pfDYrpzpHBE89RzVp1bHYw4dcbgMKyPMFT The windbg log is as follows: https://paste.fastmirror.net/?1fbcfe8c5ee91bd0#4wqydKzEL2rmkFuP5Y56xyArQZPecTTKKsZJLttX6xAT

---------------------------------
ModLoad: 00007ffc`ef100000 00007ffc`ef13e000 C:\Program Files\obs-studio\obs-plugins\64bit\input-overlay.dll
ModLoad: 00000000`6f360000 00000000`6f4c0000 C:\Program Files\obs-studio\bin\64bit\SDL2.dll
(4b38.48a0): Unknown exception - code c0000139 (first chance)
Module '../../obs-plugins/64bit/input-overlay.dll' not loaded
Failed to load module file '../../obs-plugins/64bit/input-overlay.dll', file not found
univrsal commented 1 year ago

Neither of those links load for me

LTHPKBTE commented 1 year ago

Neither of those links load for me

windbg : https://pastes.dev/ril8j5AP6R https://paste2.org/tCstXyph OBS : https://pastes.dev/6XTUrvnaV5 https://paste2.org/hYZXPAj9

univrsal commented 1 year ago

It's trying to load SDL2 from C:\Program Files\obs-studio\bin\64bit\SDL2.dll but it should be looking for it in C:\Program Files\obs-studio\obs-plugins\64bit\ which is where the plugin (C:\Program Files\obs-studio\obs-plugins\64bit\input-overlay.dll) is. Can you try and see if the files C:\Program Files\obs-studio\bin\64bit\SDL2.dll and C:\Program Files\obs-studio\obs-plugins\64bit\SDL2.dll exist?

I assume C:\Program Files\obs-studio\bin\64bit\SDL2.dll does not exist and C:\Program Files\obs-studio\obs-plugins\64bit\SDL2.dll should exist. So you might want to try and copy SDL2.dll to C:\Program Files\obs-studio\bin\64bit\ and see if that changes anything.

LTHPKBTE commented 1 year ago

C:\Program Files\obs-studio\bin\64bit\SDL2.dll: exist, 1.33 MB (‎Modified July ‎25‎, ‎2019, version 2.0.10.0) C:\Program Files\obs-studio\obs-plugins\64bit\SDL2.dll: exist, 2.39 MB (Modified March 11, 2023, version 2.26.1.0) Deleting C:\Program Files\obs-studio\bin\64bit\SDL2.dll solved the problem. Thank you for your answer.