univrsal / input-overlay

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

Installing input-overlay on a dual-NIC system causes it to bind to a NIC with no DHCP address #371

Closed prolix-oc closed 12 months ago

prolix-oc commented 12 months ago

Describe the bug On a desktop PC with multiple ethernet interfaces, this program will bind to the first NIC even if it is unused. For example, on my X99 Taichi there is both an Intel I211 and Intel I218-V NIC present, but input-overlay will attempt to bind its websocket server to the I218-V interface since it is technically NIC 0.

To Reproduce Steps to reproduce the behavior:

  1. Own a dual-NIC board
  2. Install input-overlay
  3. Check local machine IP in settings
  4. Observe a link-local IPv4 address

Expected behavior input-overlay should bind to the interface that OBS binds to.

Screenshots

I believe it's self-explanatory enough.

Additional information:

01:17:35.885: CPU Speed: 2300MHz
01:17:35.885: Physical Cores: 16, Logical Cores: 32
01:17:35.885: Physical Memory: 32689MB Total, 26839MB Free
01:17:35.885: Windows Version: 10.0 Build 22621 (release: 22H2; revision: 2215; 64-bit)
01:17:35.885: Running as administrator: true
01:17:35.885: Windows 10/11 Gaming Features:
01:17:35.885:   Game DVR: Off
01:17:35.885:   Game Mode: On
01:17:35.886: Sec. Software Status:
01:17:35.887:   Microsoft Defender Antivirus: enabled (AV)
01:17:35.887:   Windows Firewall: enabled (FW)
01:17:35.888: Current Date/Time: 2023-10-06, 01:17:35
01:17:35.888: Browser Hardware Acceleration: true
01:17:35.888: Hide OBS windows from screen capture: false
01:17:35.888: Qt Version: 6.4.3 (runtime), 6.4.3 (compiled)
01:17:35.888: Portable mode: false
01:17:36.093: OBS 29.1.3 (64-bit, windows)
01:17:36.093: ---------------------------------
01:17:36.144: ---------------------------------
01:17:36.144: audio settings reset:
01:17:36.144:   samples per sec: 48000
01:17:36.144:   speakers:        2
01:17:36.144:   max buffering:   21 milliseconds
01:17:36.144:   buffering type:  fixed
01:17:36.144: ---------------------------------
01:17:36.144: Initializing D3D11...
01:17:36.144: Available Video Adapters: 
01:17:36.151:   Adapter 0: NVIDIA GeForce RTX 3060
01:17:36.151:     Dedicated VRAM: 12718178304
01:17:36.151:     Shared VRAM:    17138870272
01:17:36.151:     PCI ID:         10de:2504
01:17:36.151:     Driver Version: 31.0.15.3699
01:17:36.152:     output 0:
01:17:36.152:       name=HDMI
01:17:36.152:       pos={0, 0}
01:17:36.152:       size={1920, 1080}
01:17:36.152:       attached=true
01:17:36.152:       refresh=60
01:17:36.152:       bits_per_color=8
01:17:36.152:       space=RGB_FULL_G22_NONE_P709
01:17:36.152:       sdr_white_nits=80
01:17:36.152:       nit_range=[min=0.000000, max=417.711792, max_full_frame=417.711792]
01:17:36.152:       dpi=96 (100%)
01:17:36.152:       id=\\?\DISPLAY#RTK1560#5&2fa78436&0&UID16640#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}
01:17:36.152:       alt_id=\\.\DISPLAY1
01:17:36.154: Loading up D3D11 on adapter NVIDIA GeForce RTX 3060 (0)
01:17:36.167: Enabling fixed audio buffering, total audio buffering is now 21 milliseconds
01:17:36.234: D3D11 loaded successfully, feature level used: b000
01:17:36.234: DXGI increase maximum frame latency success
01:17:36.234: Hardware-Accelerated GPU Scheduling enabled on adapter!
01:17:36.234: D3D11 GPU priority setup success
01:17:38.088: ---------------------------------
01:17:38.088: video settings reset:
01:17:38.088:   base resolution:   3840x1080
01:17:38.088:   output resolution: 3840x1080
01:17:38.088:   downscale filter:  Bicubic
01:17:38.088:   fps:               120/1
01:17:38.088:   format:            I420
01:17:38.088:   YUV mode:          Rec. 709/Full
01:17:38.088: NV12 texture support not available
01:17:38.088: P010 texture support not available
01:17:38.090: Audio monitoring device:
01:17:38.090:   name: Default
01:17:38.090:   id: default
01:17:38.090: ---------------------------------
01:17:38.093: No AJA devices found, skipping loading AJA UI plugin
01:17:38.093: Failed to initialize module 'aja-output-ui.dll'
01:17:38.094: No AJA devices found, skipping loading AJA plugin
01:17:38.094: Failed to initialize module 'aja.dll'
01:17:38.094: Skipping module '../../obs-plugins/64bit/chrome_elf.dll', not an OBS plugin
01:17:38.102: [CoreAudio encoder]: Adding CoreAudio AAC encoder
01:17:38.103: Failed to load 'en-US' text for module: 'decklink-captions.dll'
01:17:38.103: Failed to load 'en-US' text for module: 'decklink-output-ui.dll'
01:17:38.105: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
01:17:38.105: Failed to initialize module 'decklink.dll'
01:17:38.131: [AMF] Unable to load 'amfrt64.dll', error code 126.
01:17:38.133: [AMF] AMF Test failed due to one or more errors.
01:17:38.133: Failed to initialize module 'enc-amf.dll'
01:17:38.191: [input-overlay] Loading v5.0.4-HEAD (5f18f42) build time 2023.05.08 07:27
01:17:38.192: Skipping module '../../obs-plugins/64bit/libcef.dll', not an OBS plugin
01:17:38.192: Skipping module '../../obs-plugins/64bit/libEGL.dll', not an OBS plugin
01:17:38.192: Skipping module '../../obs-plugins/64bit/libGLESv2.dll', not an OBS plugin
01:17:38.192: [input-overlay] Starting websocket server on localhost:16899
01:17:38.193: [Move Transition] loaded version 2.9.1
01:17:38.194: Failed to get nvARPose.dll version info size
01:17:38.217: [obs-browser]: Version 2.21.1
01:17:38.217: [obs-browser]: CEF Version 103.0.5060.134 (runtime), 103.0.0-5060-shared-textures.2591+g4204d54+chromium-103.0.5060.134 (compiled)
01:17:38.217: [Composite Blur] loaded version 1.0.1
01:17:38.222: NVENC supported
01:17:38.385: [NVENC] AV1 is not supported
01:17:38.387: [noise suppress]: NVIDIA AUDIO FX version: 1.3.0.21
01:17:38.486: [noise suppress]: NVIDIA AUDIO FX enabled
01:17:38.490: [NVIDIA VIDEO FX]: NVIDIA VIDEO FX version: 0.7.2.0
01:17:38.522: [NVIDIA VIDEO FX]: enabled, redistributable found
01:17:38.523: [obs-ndi] obs_module_load: hello ! (version 4.11.0)
01:17:38.523: [obs-ndi] load_ndilib: Trying 'C:/Program Files/NDI/NDI 5 Tools/Runtime/Processing.NDI.Lib.x64.dll'
01:17:38.523: [obs-ndi] load_ndilib: Found NDI library at 'C:/Program Files/NDI/NDI 5 Tools/Runtime/Processing.NDI.Lib.x64.dll'
01:17:38.528: [obs-ndi] load_ndilib: NDI runtime loaded successfully
01:17:38.528: [obs-ndi] load_ndilib: NDIlib_v5_load found
01:17:38.696: [obs-ndi] obs_module_load: NDI library initialized successfully (NDI SDK WIN64 03:28:24 Aug 31 2023 5.6.0.0)
01:17:38.746: [obs-shaderfilter] loaded version 2.0.0
01:17:38.750: [obs-websocket] [obs_module_load] you can haz websockets (Version: 5.2.3 | RPC Version: 1)
01:17:38.750: [obs-websocket] [obs_module_load] Qt version (compile-time): 6.4.3 | Qt version (run-time): 6.4.3
01:17:38.750: [obs-websocket] [obs_module_load] Linked ASIO Version: 101201
01:17:38.758: [obs-websocket] [obs_module_load] Module loaded.
01:17:38.761: Skipping module '../../obs-plugins/64bit/SDL2.dll', not an OBS plugin
01:17:38.764: [Vertical Canvas] loaded version 1.2.5
01:17:38.765: [vlc-video]: Couldn't find VLC installation, VLC video source disabled
01:17:38.773: <StreamDeck> Plugin version 5.5.0.0
01:17:38.774: <StreamDeck> [Server] Listening on '127.0.0.1:28186'.
01:17:38.775: [StreamFX] Loading Version 0.12.0b299-g8b97c2b2
01:17:38.776: [StreamFX] <nvidia::cuda::cuda> Driver reported CUDA version: 12.2.0
01:17:38.829: [StreamFX] <nvidia::cuda::context> Initialized CUDA on device 'NVIDIA GeForce RTX 3060' (9ee0ec77-148f-5de1-141b-3a6a33ea0427, 00010f4a, 1).
01:17:38.831: [StreamFX] <nvidia::ar::ar> No supported NVIDIA SDK is installed to provide 'nvARPose.dll'.
01:17:38.831: [StreamFX] <filter::autoframing> Failed to make NVIDIA providers available due to error: Failed to load 'nvARPose.dll'.
01:17:38.831: [StreamFX] <filter::autoframing> All supported providers failed to initialize, disabling effect.
01:17:38.832: [StreamFX] Loaded Version 0.12.0b299-g8b97c2b2
01:17:38.832: ---------------------------------
01:17:38.832:   Loaded Modules:
01:17:38.832:     StreamFX.dll
01:17:38.832:     StreamDeckPlugin.dll
01:17:38.832:     win-wasapi.dll
01:17:38.832:     win-dshow.dll
01:17:38.832:     win-capture.dll
01:17:38.832:     vlc-video.dll
01:17:38.832:     vertical-canvas.dll
01:17:38.832:     text-freetype2.dll
01:17:38.832:     rtmp-services.dll
01:17:38.832:     obs-x264.dll
01:17:38.832:     obs-websocket.dll
01:17:38.832:     obs-vst.dll
01:17:38.832:     obs-transitions.dll
01:17:38.832:     obs-text.dll
01:17:38.832:     obs-shaderfilter.dll
01:17:38.832:     obs-qsv11.dll
01:17:38.832:     obs-outputs.dll
01:17:38.832:     obs-ndi.dll
01:17:38.832:     obs-filters.dll
01:17:38.832:     obs-ffmpeg.dll
01:17:38.832:     obs-composite-blur.dll
01:17:38.832:     obs-browser.dll
01:17:38.832:     obs-asio.dll
01:17:38.832:     move-transition.dll
01:17:38.832:     input-overlay.dll
01:17:38.832:     image-source.dll
01:17:38.832:     frontend-tools.dll
01:17:38.832:     decklink-output-ui.dll
01:17:38.832:     decklink-captions.dll
01:17:38.832:     coreaudio-encoder.dll
01:17:38.832: ---------------------------------
01:17:38.833: [Vertical Canvas] Loaded configuration file
01:17:38.888: NV12 texture support not available
01:17:38.888: P010 texture support not available
01:17:38.891: ==== Startup complete ===============================================
01:17:38.962: All scene data cleared
01:17:38.962: ------------------------------------------------
01:17:38.963: [win-wasapi: 'Desktop Audio'] update settings:
01:17:38.963:   device id: default
01:17:38.963:   use device timing: 1
01:17:38.969: [Loaded global audio device]: 'Desktop Audio'
01:17:38.969: [win-wasapi: 'Mic/Aux'] update settings:
01:17:38.969:   device id: default
01:17:38.969:   use device timing: 0
01:17:38.969: [Loaded global audio device]: 'Mic/Aux'
01:17:38.972: Switched to scene 'Scene'
01:17:38.972: ------------------------------------------------
01:17:38.972: Loaded scenes:
01:17:38.972: - scene 'Scene':
01:17:38.972:     - source: 'CapCard' (dshow_input)
01:17:38.972: - scene 'Vertical Scene':
01:17:38.972: ------------------------------------------------
01:17:39.006: WASAPI: Device 'HDMI (2- NVIDIA High Definition Audio)' [48000 Hz] initialized
01:17:39.140: Failed to create cookie manager: Failed to create cookie directory
01:17:39.197: WASAPI: Device 'Microphone (EMEET SmartCam S600)' [48000 Hz] initialized
01:17:39.467: ---------------------------------
01:17:39.467: [DShow Device: 'CapCard'] settings updated: 
01:17:39.467:   video device: Live Gamer ULTRA Stream_Engine - 1
01:17:39.467:   video path: 
01:17:39.467:   resolution: 1920x1080
01:17:39.467:   flip: 0
01:17:39.467:   fps: 120.00 (interval: 83333)
01:17:39.467:   format: YUY2
01:17:39.467:   buffering: disabled
01:17:39.467:   hardware decode: disabled
01:17:39.527: [obs-websocket] [WebSocketServer::onObsLoaded] WebSocket server is enabled, starting...
01:17:39.527: [obs-websocket] [WebSocketServer::Start] Not locked to IPv4 bindings
01:17:39.528: [obs-websocket] [WebSocketServer::ServerRunner] IO thread started.
01:17:39.531: [obs-websocket] [WebSocketServer::Start] Server started successfully on port 4455. Possible connect address: 172.20.10.167
01:17:41.135: [obs-websocket] [WebSocketServer::onOpen] New WebSocket client has connected from [::ffff:172.20.10.163]:50682
01:17:42.134: [obs-websocket] [WebSocketServer::onOpen] New WebSocket client has connected from [::ffff:172.20.10.163]:50680
01:17:42.175: [obs-websocket] [WebSocketServer::onClose] WebSocket client '[::ffff:172.20.10.163]:50682' has disconnected with code '4008' and reason: You are already Identified with the obs-websocket server.
01:17:44.135: [obs-websocket] [WebSocketServer::onOpen] New WebSocket client has connected from [::ffff:172.20.10.163]:50683
01:17:45.136: [obs-websocket] [WebSocketServer::onOpen] New WebSocket client has connected from [::ffff:172.20.10.163]:50681
01:17:45.178: [obs-websocket] [WebSocketServer::onClose] WebSocket client '[::ffff:172.20.10.163]:50683' has disconnected with code '4008' and reason: You are already Identified with the obs-websocket server.

Additional context None needed, slightly frustrating that I'd now have to disable an interface that belongs to NewTek NDI Receiver in order to use this program, since the bindings are all wrong.

univrsal commented 12 months ago

The websocket listens on 0.0.0.0 which should bind to all interfaces, but apparently windows doesn't do that. Try this build and set the ip in the settings dialog, then restart obs https://github.com/univrsal/input-overlay/actions/runs/6431140462

image

prolix-oc commented 12 months ago

That seems to have done the trick. I was initially worried nothing would happen when I saw that it still showed the link-local address under the settings, but I just tested the connection from my main PC to the encoding PC and it works.

Thanks for the super quick fix, have a great morning!