obs-vkcapture icon indicating copy to clipboard operation
obs-vkcapture copied to clipboard

Feature request: mutiple OBS instances for the same captured game

Open AdelKS opened this issue 1 year ago • 4 comments

Hello!

Hope you have been doing well and would like to thank you again for this project.

I just tried to lunch two OBS instances for the same game to try something: one to do H264 CPU encoding (twitch) and the other for H265 GPU encoding (youtube, enables better quality). And it looks like obs-vkcapture is not quite ready to handle multiple clients on its socket: the first obs instance successfully binds, but the second cannot

info: [linux-vkcapture] plugin loaded successfully (version 1.4.5)
error: [linux-vkcapture] Cannot bind unix socket to : 98

Is it a hard thing to implement ?

Thanks!

Adel

AdelKS avatar Nov 23 '23 18:11 AdelKS

It's not going to work like that, yes.

I can add env variable (OBS_VKCAPTURE_SOCKET_PATH) that you would set for both the game and OBS instance and then it should work:

OBS_VKCAPTURE_SOCKET_PATH=/tmp/vkcpature1.sock obs
OBS_VKCAPTURE_SOCKET_PATH=/tmp/vkcpature2.sock obs

OBS_VKCAPTURE_SOCKET_PATH=/tmp/vkcpature1.sock obs-gamecapture %game1%
OBS_VKCAPTURE_SOCKET_PATH=/tmp/vkcpature2.sock obs-gamecapture %game2%

nowrep avatar Nov 23 '23 19:11 nowrep

Thank you for your feedback !

Unfortunately, in the use case I am having I need the same game instance to be captured twice. In the approach you suggest it would mean that obs-gamecapture would receive a list of socket paths instead of a single socket, for my use case to be handled.

OBS_VKCAPTURE_SOCKET_PATH=/tmp/vkcpature1.sock;/tmp/vkcpature2.sock obs-gamecapture %game1%

Another possibility for me is to look into obs plugins that enable multi-streaming, I wonder if there's a solid one.

AdelKS avatar Nov 23 '23 20:11 AdelKS

As I understand it, this issue is not really a limitation to obs-vkcapture, at least in my use case, and it's more related to obs needing to be able to do simulcast, but that is gonna take some more years from what it looks like haha (see https://github.com/obsproject/rfcs/pull/27 and https://github.com/obsproject/rfcs/pull/39#issuecomment-1738104282).

So implementing something in obs-vkcapture would be more of a "temporary" workaround, at least if my use case. But maybe it can be very useful/necessary for other use cases. Please feel free to close this issue at your discretion.

Also found this that I need to test https://sorayuki.github.io/obs-multi-rtmp/

AdelKS avatar Nov 23 '23 21:11 AdelKS

https://sorayuki.github.io/obs-multi-rtmp/ worked for me. This feature request isn't needed for my use case any longer.

Thanks! Feel free to close this issue.

AdelKS avatar Nov 28 '23 14:11 AdelKS