nowrep / obs-vkcapture

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

OpenGL capture not working after update of steam..? #198

Closed gegoxaren closed 4 months ago

gegoxaren commented 4 months ago

Describe the bug obs-gamecapture will not capture OpenGL games.

System (please complete the following information):

OBS log:

$ com.obsproject.Studio 
qt.qpa.qgnomeplatform: Could not find color scheme  ""
debug: Found portal inhibitor
debug: Attempted path: share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /app/share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: share/obs/obs-studio/locale.ini
debug: Attempted path: /app/share/obs/obs-studio/locale.ini
debug: Attempted path: share/obs/obs-studio/locale/sv-SE.ini
debug: Attempted path: /app/share/obs/obs-studio/locale/sv-SE.ini
info: Using preferred locale 'sv-SE'
debug: Attempted path: share/obs/obs-studio/themes/Yami.qss
debug: Attempted path: /app/share/obs/obs-studio/themes/Yami.qss
warning: [Safe Mode] Unclean shutdown detected!
warning: [Safe Mode] User elected to launch normally.
info: Platform: Wayland
info: CPU Name: AMD FX(tm)-8350 Eight-Core Processor
info: CPU Speed: 1399.720MHz
info: Physical Cores: 4, Logical Cores: 8
info: Physical Memory: 15941MB Total, 2495MB Free
info: Kernel Version: Linux 6.1.0-18-rt-amd64
info: Flatpak Branch: stable
info: Flatpak Arch: x86_64
info: Flatpak Runtime: runtime/org.kde.Platform/x86_64/6.5
info: App Extensions:
info:  - com.obsproject.Studio.Plugin.OBSVkCapture
info:  - com.obsproject.Studio.Plugin.VerticalCanvas
info:  - com.obsproject.Studio.Plugin.WebSocket
info:  - com.obsproject.Studio.Plugin.waveform
info:  - org.freedesktop.LinuxAudio.Plugins.swh
info:  - com.obsproject.Studio.Locale
info: Runtime Extensions:
info:  - org.freedesktop.Platform.GL.default
info:  - org.freedesktop.Platform.openh264
info:  - org.freedesktop.Platform.VulkanLayer.MangoHud
info:  - org.freedesktop.Platform.VulkanLayer.OBSVkCapture
info:  - org.kde.KStyle.Adwaita
info:  - org.kde.PlatformTheme.QGnomePlatform
info:  - org.kde.WaylandDecoration.QAdwaitaDecorations
info:  - org.kde.WaylandDecoration.QGnomePlatform-decoration
info:  - org.kde.Platform.Locale
info:  - org.freedesktop.Platform.GL.default
info: Flatpak Framework Version: 1.14.4
info: Desktop Environment: GNOME (gnome)
info: Session Type: wayland
info: Qt Version: 6.5.3 (runtime), 6.5.3 (compiled)
info: Portable mode: false
info: OBS 30.0.2 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
    samples per sec: 48000
    speakers:        2
    max buffering:   960 milliseconds
    buffering type:  dynamically increasing
info: ---------------------------------
info: Initializing OpenGL...
info: Using EGL/Wayland
info: Initialized EGL 1.5
info: Loading up OpenGL on adapter AMD AMD Radeon RX 570 Series (radeonsi, polaris10, LLVM 15.0.7, DRM 3.49, 6.1.0-18-rt-amd64)
info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 23.3.5 (git-ace31d82e0), shading language 4.60
info: ---------------------------------
info: video settings reset:
    base resolution:   1920x1080
    output resolution: 1920x1080
    downscale filter:  Lanczos
    fps:               30/1
    format:            NV12
    YUV mode:          sRGB/Partial
info: NV12 texture support not available
info: P010 texture support not available
info: Audio monitoring device:
    name: Standard
    id: default
info: ---------------------------------
warning: No AJA devices found, skipping loading AJA UI plugin
warning: Failed to initialize module 'aja-output-ui.so'
warning: No AJA devices found, skipping loading AJA plugin
warning: Failed to initialize module 'aja.so'
warning: Failed to load 'en-US' text for module: 'decklink-captions.so'
warning: Failed to load 'en-US' text for module: 'decklink-output-ui.so'
libDeckLinkAPI.so: kan inte öppna delad objektfil: Filen eller katalogen finns inte
warning: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
warning: Failed to initialize module 'decklink.so'
info: [pipewire] Available captures:
info: [pipewire]     - Desktop capture
info: [pipewire]     - Window capture
warning: v4l2loopback not installed, virtual camera disabled
info: [obs-browser]: Version 2.22.2
info: [obs-browser]: CEF Version 103.0.5060.134 (runtime), 103.0.0-5060-shared-textures.2594+g17f8588+chromium-103.0.5060.134 (compiled)
warning: LIBVA_DRIVER_NAME variable is set, this could prevent FFmpeg VAAPI from working correctly
info: VAAPI: API version 1.18
info: FFmpeg VAAPI H264 encoding supported
info: FFmpeg VAAPI HEVC encoding supported
info: [obs-websocket] [obs_module_load] you can haz websockets (Version: 5.3.4 | RPC Version: 1)
info: [obs-websocket] [obs_module_load] Qt version (compile-time): 6.5.3 | Qt version (run-time): 6.5.3
info: [obs-websocket] [obs_module_load] Linked ASIO Version: 102800
info: [obs-websocket] [obs_module_load] Module loaded.
warning: Failed to load 'sv-SE' text for module: 'linux-vkcapture.so'
info: [linux-vkcapture] plugin loaded successfully (version 1.4.9)
warning: Failed to load 'sv-SE' text for module: 'obs-websocket-compat.so'
info: [obs-websocket 4.9.1-compat] you can haz websockets (version 4.9.1-compat)
info: [obs-websocket 4.9.1-compat] qt version (compile-time): 6.4.3 ; qt version (run-time): 6.5.3
info: [obs-websocket 4.9.1-compat] [obs_module_load] Linked ASIO Version: 101201
info: [obs-websocket 4.9.1-compat] module loaded!
info: [Vertical Canvas] loaded version 1.4.1
warning: Failed to load 'sv-SE' text for module: 'waveform.so'
info: [phandasm_waveform]: Registered v1.8.0 x64
info: [phandasm_waveform]: Using CPU capabilities: AVX FMA3 SSE2
info: ---------------------------------
info:   Loaded Modules:
info:     waveform.so
info:     vertical-canvas.so
info:     obs-websocket-compat.so
info:     linux-vkcapture.so
info:     text-freetype2.so
info:     rtmp-services.so
info:     obs-x264.so
info:     obs-websocket.so
info:     obs-webrtc.so
info:     obs-vst.so
info:     obs-transitions.so
info:     obs-qsv11.so
info:     obs-outputs.so
info:     obs-libfdk.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     obs-browser.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-pipewire.so
info:     linux-jack.so
info:     linux-capture.so
info:     image-source.so
info:     frontend-tools.so
info:     decklink-output-ui.so
info:     decklink-captions.so
info: ---------------------------------
info: [Vertical Canvas] Loaded configuration file
warning: QLayout: Attempting to add QLayout "" to CanvasDock "contextContainer", which already has a layout
info: NV12 texture support not available
info: P010 texture support not available
info: [obs-websocket] [obs_module_post_load] WebSocket server is enabled, starting...
info: [obs-websocket] [WebSocketServer::Start] Not locked to IPv4 bindings
info: [obs-websocket] [WebSocketServer::ServerRunner] IO thread started.
info: [obs-websocket] [WebSocketServer::Start] Server started successfully on port 4455. Possible connect address: 192.168.1.236
info: ==== Startup complete ===============================================
info: All scene data cleared
info: ------------------------------------------------
info: pulse-input: Server name: 'PulseAudio (on PipeWire 0.3.65) 15.0.0'
info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.usb-Native_Instruments_Komplete_Audio_1_0000984D-00.analog-stereo.monitor' (default)
info: pulse-input: Server name: 'PulseAudio (on PipeWire 0.3.65) 15.0.0'
info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_input.usb-Native_Instruments_Komplete_Audio_1_0000984D-00.analog-stereo'
info: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: Ljuduppspelningsenhet (PulseAudio))

info: adding 42 milliseconds of audio buffering, total audio buffering is now 64 milliseconds (source: Ljudinmatningsenhet (PulseAudio))

error: ext_screencopy_manager_v1 not available
info: Switched to scene 'Scen'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Stream Start.':
info:     - source: 'Bild' (image_source)
info:     - source: 'Ljudinmatningsenhet (PulseAudio)' (pulse_input_capture)
info:         - filter: 'Brusreducering' (noise_suppress_filter_v2)
info:         - filter: 'Uppåtgående kompressor' (upward_compressor_filter)
info:         - filter: 'Begränsare' (limiter_filter)
info:     - source: 'Text (FreeType 2)' (text_ft2_source_v2)
info:     - source: 'Start Time' (text_ft2_source_v2)
info:     - source: 'Waveform Visualizer 2' (phandasm_waveform_source)
info:     - source: 'Scrollin text' (text_ft2_source_v2)
info:         - filter: 'Rullning' (scroll_filter)
info: - scene 'Scen':
info:     - source: 'Ljudinmatningsenhet (PulseAudio)' (pulse_input_capture)
info:         - filter: 'Brusreducering' (noise_suppress_filter_v2)
info:         - filter: 'Uppåtgående kompressor' (upward_compressor_filter)
info:         - filter: 'Begränsare' (limiter_filter)
info:     - source: 'Ljuduppspelningsenhet (PulseAudio)' (pulse_output_capture)
info:         - filter: 'Begränsare' (limiter_filter)
info:         - filter: 'Ducking' (compressor_filter)
info:     - source: 'Bild' (image_source)
info:     - source: 'waiting for game capture' (text_ft2_source_v2)
info:     - source: 'Game Capture' (vkcapture-source)
info:     - source: 'Waveform Visualizer' (phandasm_waveform_source)
info:     - source: 'Waveform Visualizer 2' (phandasm_waveform_source)
info:     - source: 'Scrollin text' (text_ft2_source_v2)
info:         - filter: 'Rullning' (scroll_filter)
info: - scene 'Stream has ended.':
info:     - source: 'stream over' (text_ft2_source_v2)
info: - scene 'plz wait - tech problems':
info:     - source: 'Text (FreeType 2) 2' (text_ft2_source_v2)
info:     - source: 'Scrollin text' (text_ft2_source_v2)
info:         - filter: 'Rullning' (scroll_filter)
info: - scene 'water':
info:     - source: 'Text (FreeType 2) 3' (text_ft2_source_v2)
info:     - source: 'Scrollin text' (text_ft2_source_v2)
info:         - filter: 'Rullning' (scroll_filter)
info: - scene 'Vertical Scene':
info: ------------------------------------------------
info: [obs-websocket 4.9.1-compat] WSServer::start: Not locked to IPv4 bindings
info: [obs-websocket 4.9.1-compat] server started successfully on port 4444
info: [obs-websocket 4.9.1-compat] IO thread started.

Game log:

/bin/sh\0-c\0/home/gego/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=1000410 -- /home/gego/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/home/gego/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/WRATH/wrath-steam'  OBS_VKCAPTURE_QUIET=0 OBS_VKCAPTURE_GLVULKAN=1  obs-gamecapture  %commad%\0
chdir "/home/gego/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/WRATH"
ERROR: ld.so: object '/home/gego/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/gego/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/gego/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/gego/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
WARNING: discarding _NET_WM_PID 10416 as invalid for X11 window - use specialized XCB_X11_TO_PID function!
WARNING: discarding _NET_WM_PID 10416 as invalid for X11 window - use specialized XCB_X11_TO_PID function!
Parent starting mainline.
Starting child process.

[S_API] SteamAPI_Init(): Loaded '/home/gego/.var/app/com.valvesoftware.Steam/.local/share/Steam/linux64/steamclient.so' OK.
Setting breakpad minidump AppID = 1000410
SteamInternal_SetMinidumpSteamID:  Caching Steam ID:  76561197962845918 [API loaded no]

Parent startup finished.
DRM initialized.
Parent in command processing loop.
ERROR: ld.so: object '/home/gego/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
Game is WRATH using base gamedir kp1
gamename for server filtering: WRATH
WRATH Linux 19:54:22 Mar  2 2024 - release
Current nice level is below the soft limit - cannot use niceness
WARNING: base gamedir kp1/ not found!
Skeletal animation uses SSE code path
DPSOFTRAST available (SSE2 instructions detected)
Failed to init SDL joystick subsystem: Failed loading udev_device_get_action: /home/gego/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so: undefined symbol: _udev_device_get_action
execing wrath.rc
execing default.cfg
execing gamebuttons.cfg
execing gamebuttons_controller.cfg
execing gamebuttons_controller_preset0.cfg
execing wrath.cfg
execing autoexec.cfg
execing fonts/font.cfg
execing default.cfg
execing wrath.cfg
execing autoexec.cfg
Client using an automatically assigned port
Client opened a socket on address 0.0.0.0:0
Linked against SDL version 2.26.5
Using SDL library version 2.28.5
GL_VENDOR: AMD
GL_RENDERER: AMD Radeon RX 570 Series (radeonsi, polaris10, LLVM 17.0.6, DRM 3.49, 6.1.0-18-rt-amd64)
GL_VERSION: 4.6 (Compatibility Profile) Mesa 24.0.1 (git-3e361635b8)
vid.support.arb_multisample 1
vid.support.gl20shaders 1
Video Mode: fullscreen 1920x1200x32x0.00hz (8x AA)
GameController 0 opened (SDL_GameController 0 is "Steam Virtual Gamepad")
S_Startup: initializing sound output format: 48000Hz, 16 bit, 2 channels...
Wanted audio Specification:
    Channels  : 2
    Format    : 0x8010
    Frequency : 48000
    Samples   : 2048
Obtained audio specification:
    Channels  : 2
    Format    : 0x8010
    Frequency : 48000
    Samples   : 2048
Sound format: 48000Hz, 2 channels, 16 bits per sample
CDAudio_Init: No CD in player.
Can't get initial CD volume
CD Audio Initialized
ADDING LANGUAGE de
ADDING LANGUAGE en
ADDING LANGUAGE es
ADDING LANGUAGE fr
ADDING LANGUAGE ja
ADDING LANGUAGE ru
ADDING LANGUAGE tr
ADDING LANGUAGE zh
loading font fonts/credits in slot 14
loading font fonts/journal in slot 5
loading font fonts/journal in slot 15
couldn't exec start.cfg
Unknown command "------------"
Game 1000410 created interface STEAMAPPS_INTERFACE_VERSION008 / 
Game 1000410 created interface STEAMUSERSTATS_INTERFACE_VERSION012 / 
Game 1000410 created interface SteamController008 / 
Game 1000410 created interface SteamFriends017 / 
Game 1000410 created interface SteamInput006 / 
Game 1000410 created interface SteamUser023 / 
Game 1000410 created interface SteamUser023 / User
Game 1000410 created interface SteamUtils010 / 
Game 1000410 method call count for IClientUserStats::RequestCurrentStats : 1
Game 1000410 method call count for IClientAppManager::GetCurrentLanguage : 1
Game 1000410 method call count for IClientUtils::RecordSteamInterfaceCreation : 10
Game 1000410 method call count for IClientUtils::GetAppID : 13
Game 1000410 method call count for IClientFriends::GetPersonaName : 1
Game 1000410 method call count for IClientUser::GetSteamID : 2
Game 1000410 method call count for IClientUser::BLoggedOn : 1
Uploaded AppInterfaceStats to Steam

Other information:

This did work just the other day, now it dose not. I think Steam might have updated something between then and now...

It does capture Vulkan (DXVK) games, but not OpenGl games. I have tried Cry of Fear, WRATH, and Sven Coop, all three OpenGL games and they will not show anything in OBS, whilst Titanfall 2, Risk or Rain 2, and Borderlands GOTY (All running under DXVK) does show in OBS.

nowrep commented 4 months ago

Is this only Steam games? Does glxgears work?

nowrep commented 4 months ago

Also for Steam flatpak please see https://github.com/nowrep/obs-vkcapture/issues/185

gegoxaren commented 4 months ago

I think steam now overwrites LD_PRELOAD, as gamemoderun does not work either.

https://github.com/ValveSoftware/steam-for-linux/issues/10573

I manually set LD_PRELOAD=/usr/lib/extensions/vulkan/OBSVkCapture/lib/x86_64-linux-gnu/obs_glcapture/libobs_glcapture.so %command% as a launch option, and it did not work.

gegoxaren commented 4 months ago

I'm just an idiot.

I had a typo, in %command%... I wrote %commad%..

fritz-fritz commented 3 months ago

@nowrep Just wanted to add that I recently just had to manually add this LD_PRELOAD for a particular openGL program... it worked for glxgears without it. I hadn't encountered this before but hadn't tried it with this particular application to know if something changed.