nowrep / obs-vkcapture

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

vkcapture doesn't work on Age of Empires 2 Definite Edition without workaround #148

Closed emaxoda closed 1 year ago

emaxoda commented 1 year ago

Like the title say if I try to capture this game it won't capture anything unless I restart OBS with the game running and then i get the capture going, there's nothing useful on the steam logs other than getting the capture to work with the workaround.

steamlogs.txt

obs-normal.txt

obs-restart.txt

nowrep commented 1 year ago

Can you try running the game with env OBS_VKCAPTURE=1 %command% instead of obs-gamecapture?

emaxoda commented 1 year ago

Running the game with that env variable indeed works as it should. Should I switch my the games to using the variable instead of obs-gamecapture or is it a case specific thing? Edit: I saw in the readme it's for vulkan only so I'll keep using obs-gamecapture on OpenGL games and the environment variable on vulkan ones

nowrep commented 1 year ago

Yes, if the game uses both OpenGL and Vulkan it can cause issues. I'm not exactly sure what's happening in this case, but I think there are two connections from the game and the OpenGL connection wins (the order from your log is: vulkan -> vulkan destroy -> opengl -> vulkan). And if you restart OBS the Vulkan connection wins because the OpenGL connection is no longer presenting?

Maybe the plugin should send keepalive pings and disconnect non-responding clients.

nowrep commented 1 year ago

149 should workaround/fix this.

emaxoda commented 1 year ago

it fixes the problem i was having while using obs-gamecapture EDIT: by the way I know this is not the channel but I saw you have a branch on obs called amf-linux-tex, I've been using your pull request for amf on linux for a long time now, what's the difference between those two?

nowrep commented 1 year ago

by the way I know this is not the channel but I saw you have a branch on obs called amf-linux-tex, I've been using your pull request for amf on linux for a long time now, what's the difference between those two?

It uses texture encode aka "zero copy", so instead of downloading the rendered scene from GPU to CPU and then uploading it back to GPU when encoding it keeps the data on GPU.

emaxoda commented 1 year ago

i've been using the commits since I asked, so thanks for all the work you do!