nowrep / obs-vkcapture

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

Can't launch games with obs-gamecapture %command% #130

Closed arnogon closed 1 year ago

arnogon commented 1 year ago

SteamOS 3.4.4 on Steam Deck. Installed OBS, OBS plugin and capture tools from Flathub. OBS now shows 'Game Capture', but games don't launch when I put obs-gamecapture %command% in the launch options.

nowrep commented 1 year ago

https://github.com/nowrep/obs-vkcapture#about-flatpak

arnogon commented 1 year ago

Okay. I have since built obs-gamecapture and put it somewhere in PATH. Now games do launch in desktop mode (with obs-gamecapture %command%), but OBS game capture still can't see them; and I still can't launch games with the launch options in game mode.

nowrep commented 1 year ago

Please post logs from both OBS and the game itself.

arnogon commented 1 year ago

2023-01-10 21-26-41.txt Where can I find the log for a game?

nowrep commented 1 year ago

PROTON_LOG=1 %command% if trying with Steam games - log will be in your home directory.

arnogon commented 1 year ago

2023-01-10 23-14-26.txt steam-637650.log In game mode the game doesn't launch and there's no Steam log. These are the logs when tested in desktop mode.

nowrep commented 1 year ago

I don't see the game being launched with capture enabled at all in the log. env OBS_VKCAPTURE=1 %command% please see README.

arnogon commented 1 year ago

The logs above were generated with launch options set as 'obs-gamecapture PROTON_LOG=1 %command%'. 2023-01-10 23-52-15.txt steam-637650.log These logs are generated with launch options 'env OBS_VKCAPTURE=1 PROTON_LOG=1 %command%'.. This time the game can be launch in game mode. Please let me know if there's any problem with my launch options.

nowrep commented 1 year ago

You are not running the game with capture enabled: Command: ['/run/media/mmcblk0p1/steamapps/common/FINAL FANTASY XV/ffxv_s.exe']

arnogon commented 1 year ago

You are not running the game with capture enabled: Command: ['/run/media/mmcblk0p1/steamapps/common/FINAL FANTASY XV/ffxv_s.exe']

I’m afraid I don’t understand. Should I change the launch options?

nowrep commented 1 year ago

Try with env VK_LOADER_DEBUG=all OBS_VKCAPTURE=1 PROTON_LOG=1 %command%, it will show why it's not loading vkcapture.

arnogon commented 1 year ago

steam-637650.log In Gaming Mode with env VK_LOADER_DEBUG=all OBS_VKCAPTURE=1 PROTON_LOG=1 %command%.

nowrep commented 1 year ago

Are you using flatpak steam? Also please just test with vkcube first OBS_VKCAPTURE=1 vkcube.

arnogon commented 1 year ago

Are you using flatpak steam? Also please just test with vkcube first OBS_VKCAPTURE=1 vkcube.

No not Flatpak, it's just the built-in Steam. 2023-01-11 17-05-34.txt Testing in Desktop Mode.

nowrep commented 1 year ago

Please post output of VK_LOADER_DEBUG=all OBS_VKCAPTURE=1 vkcube

arnogon commented 1 year ago

vkcube.log Tested in Gaming Mode.

nowrep commented 1 year ago

Alright so it's back to my first reply https://github.com/nowrep/obs-vkcapture/issues/130#issuecomment-1375609155

For capturing games outside Flatpak runtime, you need native build regardless of if you are using Flatpak OBS or not.

If you are on steam deck you should be able to just install obs-vkcapture-git from AUR.

arnogon commented 1 year ago

Alright so it's back to my first reply #130 (comment)

For capturing games outside Flatpak runtime, you need native build regardless of if you are using Flatpak OBS or not.

If you are on steam deck you should be able to just install obs-vkcapture-git from AUR.

As mentioned I'm now used my own build, so this shouldn't be a problem.

However I just found another problem: PATH in Gaming Mode is different from that in Desktop Mode so my obs-gamecapture wasn't actually there. With that fixed this is the new log. vkcube.log Does that make a difference?

Also I'm aware that I could install it from AUR, but root partition in SteamOS is read-only and I'd rather not break the seal.

nowrep commented 1 year ago

You also need to move the layer json to a path where the vulkan loader will find it. Just install it from AUR.

arnogon commented 1 year ago

Okay, moved the json file to the corresponding path, now OBS recognizes the program and has the correct dimensions for it. But the screen is still black. Here are the logs: 2023-01-11 19-51-24.txt vkcube.log

nowrep commented 1 year ago

Same issue as #127 - try adding OBS_VKCAPTURE_LINEAR=1.

arnogon commented 1 year ago

Thanks, now it works with some games. But for other games, OBS is still not picking the window. 2023-01-11 20-33-09.txt This particular game isn't run through Proton so PROTON_LOG=1 doesn't seem to generate log.

nowrep commented 1 year ago

If it's a Vulkan game, see why the layer didn't load. If it's an OpenGL game, you need to run it with obs-gamecapture ...

arnogon commented 1 year ago

How do I tell if a game is Vulkan or OpenGL? Also I ran it with obs-gamecapture too, but OBS didn’t see that either.

arnogon commented 1 year ago

portal2.log Managed to get the log. I think Portal 2 is Vulkan.

nowrep commented 1 year ago

You also need to install 32bit vkcapture.

arnogon commented 1 year ago

Is that something I can get from Flathub or should it be in my build as well?

nowrep commented 1 year ago

You need to build it yourself.

arnogon commented 1 year ago

I have now built obs_vkcapture_32.json, but don’t I need the 32-bit version of libVkLayer_obs_vkcapture.so as well? Right now I only have the 64-bit version and it’s provided by the Flatpak. I don’t think there’s a i386 version of the plugin on Flathub though.