Skip to content

Instantly share code, notes, and snippets.

@Leayal
Created February 4, 2023 11:26
Show Gist options
  • Save Leayal/6ad941ba0ce91702202ece349c529220 to your computer and use it in GitHub Desktop.
Save Leayal/6ad941ba0ce91702202ece349c529220 to your computer and use it in GitHub Desktop.
Compatibility settings to allow unsandboxed OBS process performing game capture hook to sandboxed game processes.

WARNING: I'm not a pro at security matters. So this might be an unsafe approach, I'm not sure. And this is limited to game capture only.

You can configure this by each Sandbox's setting.

You need to open these IPC paths (in the image below) for the game capture hook (which is injected into the game's process, which is running inside the sandbox) to be allowed to send captured frame data (as well as other data necessary for sync ops) to the OBS process outside the sandbox.

sandboxie-obs-compat-png

[Sample of IPC paths in ini setting, for copypasta geeks]

OpenIpcPath=*\BaseNamedObjects*\CaptureHook_Texture*
OpenIpcPath=*\BaseNamedObjects*\CaptureHook_KeepAlive*
OpenIpcPath=*\BaseNamedObjects*\CaptureHook_Exit*
OpenIpcPath=*\BaseNamedObjects*\CaptureHook_HookInfo*
OpenIpcPath=*\BaseNamedObjects*\CaptureHook_HookReady*
OpenIpcPath=*\BaseNamedObjects*\CaptureHook_Initialize*
OpenIpcPath=*\BaseNamedObjects*\CaptureHook_Restart*
OpenIpcPath=*\BaseNamedObjects*\CaptureHook_Stop*
OpenIpcPath=*\BaseNamedObjects*\CaptureHook_TextureMutex*
OpenIpcPath=*\BaseNamedObjects*\graphics_hook_dup_mutex*
OpenIpcPath=*\BaseNamedObjects*\CaptureHook_Pipe* 

Tested on OBS Studio v27.0 to v29.0.1 and Sandboxie-Plus v1.6.7. If the programs' version are newer or older, please test it and make adaption yourself.

[Geek references] Files from Github for finding the IPC paths and stuffs so that you can make adaption for OBS's future changes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment