nowrep / obs-vkcapture

OBS Linux Vulkan/OpenGL game capture
GNU General Public License v2.0
502 stars 24 forks source link

Plugin loaded, OBS_USE_EGL is set, source can't be added #213

Closed hikkamorii closed 1 month ago

hikkamorii commented 1 month ago

Describe the bug linux-vkcapture.so is loaded, OBS logs show "game" connecting, but there is no "Game Capture" source. OBS_USE_EGL is set to 1.

Screenshots or video Screenshot_20240530_123251

System (please complete the following information):

OBS log:

12:33:51.664: Platform: Wayland
12:33:51.664: CPU Name: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
12:33:51.664: CPU Speed: 1999.791MHz
12:33:51.665: Physical Cores: 14, Logical Cores: 28
12:33:51.665: Physical Memory: 31926MB Total, 24181MB Free
12:33:51.665: Kernel Version: Linux 6.9.1-1-default
12:33:51.665: Distribution: "openSUSE Tumbleweed" "20240524"
12:33:51.665: Desktop Environment: KDE (KDE)
12:33:51.665: Session Type: wayland
12:33:51.667: Qt Version: 6.7.0 (runtime), 6.7.0 (compiled)
12:33:51.667: Portable mode: false
12:33:51.738: OBS 29.1.3 (linux)
12:33:51.738: ---------------------------------
12:33:51.738: ---------------------------------
12:33:51.738: audio settings reset:
12:33:51.738:   samples per sec: 48000
12:33:51.738:   speakers:        2
12:33:51.738:   max buffering:   960 milliseconds
12:33:51.738:   buffering type:  dynamically increasing
12:33:51.755: ---------------------------------
12:33:51.755: Initializing OpenGL...
12:33:51.755: Using EGL/Wayland
12:33:51.755: Initialized EGL 1.5
12:33:51.776: Loading up OpenGL on adapter AMD AMD Radeon RX 570 Series (radeonsi, polaris10, LLVM 18.1.6, DRM 3.57, 6.9.1-1-default)
12:33:51.776: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 24.0.7, shading language 4.60
12:33:51.817: ---------------------------------
12:33:51.817: video settings reset:
12:33:51.817:   base resolution:   1920x1080
12:33:51.817:   output resolution: 1920x1080
12:33:51.817:   downscale filter:  Bicubic
12:33:51.817:   fps:               60/1
12:33:51.817:   format:            NV12
12:33:51.817:   YUV mode:          Rec. 709/Partial
12:33:51.819: NV12 texture support not available
12:33:51.819: P010 texture support not available
12:33:51.821: Audio monitoring device:
12:33:51.821:   name: Default
12:33:51.821:   id: default
12:33:51.821: ---------------------------------
12:33:51.841: Failed to load 'en-US' text for module: 'decklink-captions.so'
12:33:51.860: Failed to load 'en-US' text for module: 'decklink-output-ui.so'
12:33:51.877: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
12:33:51.877: Failed to initialize module 'decklink.so'
12:33:52.208: [pipewire] Available captures:
12:33:52.208: [pipewire]     - Desktop capture
12:33:52.208: [pipewire]     - Window capture
12:33:52.260: obs_register_source: Tried to register obs_source_info with size 408 which is more than libobs currently supports (400)
12:33:52.260: [linux-vkcapture] plugin loaded successfully (version 1.5.0)
12:33:52.285: [obs-browser]: Version 2.21.1
12:33:52.285: [obs-browser]: CEF Version 103.0.5060.134 (runtime), 103.0.0-5060-shared-textures_143.2591+g4204d54+chromium-103.0.5060.134 (compiled)
12:33:52.441: VAAPI: API version 1.21
12:33:52.444: FFmpeg VAAPI H264 encoding supported
12:33:52.454: FFmpeg VAAPI HEVC encoding supported
12:33:52.574: [obs-websocket] [obs_module_load] you can haz websockets (Version: 5.2.3 | RPC Version: 1)
12:33:52.574: [obs-websocket] [obs_module_load] Qt version (compile-time): 6.7.0 | Qt version (run-time): 6.7.0
12:33:52.574: [obs-websocket] [obs_module_load] Linked ASIO Version: 102800
12:33:52.582: [obs-websocket] [obs_module_load] Module loaded.
12:33:52.684: [vlc-video]: VLC 3.0.20 Vetinari found, VLC video source enabled
12:33:52.702: [Stroke Glow Shadow] loaded version 1.0.2
12:33:52.702: ---------------------------------
12:33:52.702:   Loaded Modules:
12:33:52.702:     obs-stroke-glow-shadow.so
12:33:52.702:     vlc-video.so
12:33:52.702:     text-freetype2.so
12:33:52.702:     sndio.so
12:33:52.702:     rtmp-services.so
12:33:52.702:     obs-x264.so
12:33:52.702:     obs-websocket.so
12:33:52.702:     obs-vst.so
12:33:52.702:     obs-transitions.so
12:33:52.702:     obs-outputs.so
12:33:52.702:     obs-libfdk.so
12:33:52.702:     obs-filters.so
12:33:52.702:     obs-ffmpeg.so
12:33:52.702:     obs-browser.so
12:33:52.702:     linux-vkcapture.so
12:33:52.702:     linux-v4l2.so
12:33:52.702:     linux-pulseaudio.so
12:33:52.702:     linux-pipewire.so
12:33:52.702:     linux-jack.so
12:33:52.702:     linux-capture.so
12:33:52.702:     linux-alsa.so
12:33:52.702:     image-source.so
12:33:52.702:     frontend-tools.so
12:33:52.702:     decklink-output-ui.so
12:33:52.702:     decklink-captions.so
12:33:52.702: ---------------------------------
12:33:52.702: ==== Startup complete ===============================================
12:33:52.742: All scene data cleared
12:33:52.742: ------------------------------------------------
12:33:52.751: pulse-input: Server name: 'PulseAudio (on PipeWire 1.0.6) 15.0.0'
12:33:52.751: pulse-input: Audio format: s32le, 48000 Hz, 3 channels
12:33:52.752: pulse-input: Started recording from 'alsa_output.pci-0000_00_1b.0.analog-surround-21.monitor' (default)
12:33:52.752: [Loaded global audio device]: 'Desktop Audio'
12:33:52.753: pulse-input: Server name: 'PulseAudio (on PipeWire 1.0.6) 15.0.0'
12:33:52.753: pulse-input: Audio format: s16le, 48000 Hz, 1 channels
12:33:52.753: pulse-input: Started recording from 'alsa_input.usb-Razer_Inc_Razer_Seiren_Mini_UC2211L03400201-00.pro-input-0'
12:33:52.753: [Loaded global audio device]: 'Siren'
12:33:52.753:     - filter: 'Compressor' (compressor_filter)
12:33:52.753:     - filter: 'Noise Gate' (noise_gate_filter)
12:33:52.753:     - filter: '3-Band Equalizer' (basic_eq_filter)
12:33:52.926: pulse-input: Server name: 'PulseAudio (on PipeWire 1.0.6) 15.0.0'
12:33:52.926: pulse-input: An error occurred while getting the source info!
12:33:52.967: [rtmp-services plugin] Remote update of URL "https://obsproject.com/obs2_update/rtmp-services/v5/package.json" failed: 
12:33:53.011: pulse-am: Server name: 'PulseAudio (on PipeWire 1.0.6) 15.0.0'
12:33:53.012: pulse-am: Audio format: s32le, 48000 Hz, 3 channels
12:33:53.012: pulse-am: Started Monitoring in 'alsa_output.pci-0000_00_1b.0.analog-surround-21'
12:33:53.012: v4l2-input: Start capture from /dev/video2
12:33:53.012: v4l2-input: Unable to open device
12:33:53.012: v4l2-input: Initialization failed, errno: No such file or directory
12:33:53.012: PipeWire initialized
12:33:53.014: PipeWire initialized
12:33:53.014: PipeWire initialized
12:33:53.033: Switched to scene 'Screen Recording'
12:33:53.033: ------------------------------------------------
12:33:53.033: Loaded scenes:
    XXX XXX
    XXX XXX
12:33:53.033: ------------------------------------------------
12:33:53.343: [pipewire] Screencast session created
12:33:53.343: [pipewire] Screencast session created
12:33:53.343: [pipewire] Screencast session created
12:33:53.419: [pipewire] Asking for window
12:33:53.419: [pipewire] Asking for desktop
12:33:53.419: [pipewire] Asking for desktop
12:33:53.552: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: Desktop Audio)
12:33:53.552: 
12:33:53.595: adding 21 milliseconds of audio buffering, total audio buffering is now 42 milliseconds (source: Siren)
12:33:53.595: 
12:33:54.948: [pipewire] Failed to start screencast, denied or cancelled by user
12:33:55.113: [pipewire] Failed to start screencast, denied or cancelled by user
12:33:55.247: [pipewire] Failed to start screencast, denied or cancelled by user
12:33:59.884: [linux-vkcapture] Client 1 connected (pid=13624)

Game log:

λ 130 ~/ ! OBS_VKCAPTURE_QUIET=0 obs-gamecapture vkcube
[obs-vkcapture] Init Vulkan 1.5.0 (64bit)
[2024-05-30 12:33:59.816] [MANGOHUD] XXX XXX
[2024-05-30 12:33:59.816] [MANGOHUD] XXX XXX
Selected GPU 0: AMD Radeon RX 570 Series (RADV POLARIS10), type: DiscreteGpu
[obs-vkcapture] DRM format modifier support not available
nowrep commented 1 month ago

It seems like you built the plugin against older OBS version. Try to rebuild it and it should work.

12:33:52.260: obs_register_source: Tried to register obs_source_info with size 408 which is more than libobs currently supports (400)
hikkamorii commented 1 month ago

I didn't build it myself, it's a community package from Open Build Service. I've noticed however that there is obs package by the same maintainer as obs-vkcapture, which was in fact newer. After changing vendor for obs, everything works. Thanks for the tip!