sandboxie-plus / Sandboxie

Sandboxie Plus & Classic
https://Sandboxie-Plus.com
GNU General Public License v3.0
13.97k stars 1.56k forks source link

OBS can't capture sandboxed games #2945

Open ghost opened 1 year ago

ghost commented 1 year ago

Describe what you noticed and did

  1. Launch OBS (Open Broadcaster Software) outside Sandboxie
  2. Add a source (Mode: Capture any fullscreen application OR Capture specific window)
  3. Launch a game from one of boxes (tested both Standard and Application Compartment with the same result)
  4. Once the game is launched wait a few seconds and then alt+tab back to OBS to see if the game is seen in the preview window
  5. The preview window always displays black
  6. In-game recorded videos and in-game taken screenshots are always black

So far I've tested it with Unreal Gold, Unreal Tournament, Arma: Cold War Assault and Söldner: Secret Wars. The same games launched outside Sandboxie are captured correctly by OBS. Standard Applications of a box such as sandboxed Windows Explorer and Registry Editor can be captured by OBS correctly. Tested with "Ask for UAC Elevation" and "Emulate Admin Rights" Sandboxie presets.

How often did you encounter it so far?

Always

Affected program

Open Broadcaster Software 27.2.4 (64-bit)

Download link

https://obsproject.com/

Where is the program located?

The program is installed only outside the sandbox.

Expected behavior

OBS can capture sandboxed games.

What is your Windows edition and version?

Windows 7 x64

In which Windows account you have this problem?

An account with UAC protection completely turned off.

Please mention any installed security software

Microsoft Security Essentials

What version of Sandboxie are you running?

Sandboxie Plus 1.9.3 64-bit

Is it a new installation of Sandboxie?

I have been using the same version for some time.

Is it a regression?

No response

In which sandbox type you have this problem?

All sandbox types (I tried them all).

Can you reproduce this problem on a new empty sandbox?

I can confirm it also on a new empty sandbox.

Did you previously enable some security policy settings outside Sandboxie?

No response

Crash dump

No response

Trace log

No response

Sandboxie.ini configuration

No response

bastik-1001 commented 1 year ago

Does OBS fail to capture anything, running under Sandboxie, like the browser window or the explorer window or is it "just" that games won't be captured? I just ask, even though the title mentions games.

There are feature requests to block screen recordings, so whenever this is applicable to every application, any required change can be used to get closer to fulfill those requests.

ghost commented 1 year ago

For me OBS can capture sandboxed Windows Explorer and Registry Editor. It's the sandboxed games that OBS can't capture for me.

DavidXanatos commented 1 year ago

can you find some small free game for which the is fails so I can test with?

ghost commented 1 year ago

can you find some small free game for which the is fails so I can test with?

Here you go: Söldner: Secret Wars. The game launched outside Sandboxie can be captured by OBS. If the game is sandboxed then OBS cannot capture it. By the way, the game has led to discovery of another issue - #2969.

ghost commented 1 year ago

I suspect that OBS might require App Compatibility Template the same way RTSS (RivaTuner Statistics Server) does in order to work properly with sandboxed games.

ghost commented 1 year ago

I've just tested Soldner with OBS both launched within the same box. OBS can see Soldner. It seems my assumption in the previous post might be correct and OBS launched from OS might require a special template like RTSS does in order to work with Sandboxie.

ghost commented 1 year ago

As an addition to the ticket, it turns out it is possible for sandboxed OBS to capture a game launched in view mode when both are launched from the same sandbox. The same game launched in fullscreen cannot be captured by OBS. OBS in OS (outside sandbox) cannot capture the sandboxed game regardless of window or fullscreen mode.

769687520 commented 1 year ago

作为问题的补充,事实证明,当两者从同一个沙盒启动时,沙盒 OBS 可以捕获在视图模式下启动的游戏。全屏启动的同一游戏无法被 OBS 捕获。 操作系统中的OBS(沙盒外)无论是窗口还是全屏模式都无法捕获沙盒游戏。

Indeed, I have also noticed this issue. If you run it all inside the sandbox, you can catch it, but not outside the sandbox!

ghost commented 1 year ago

To sum it up:

  1. Unsandboxed OBS cannot capture any sandboxed game
  2. Sandboxed OBS can capture a sandboxed game launched in window mode. The game has to be stored in the same box as OBS.
  3. Sandboxed OBS cannot capture a sandboxed game launched in fullscreen mode.
ghost commented 1 year ago

Looks like the latest version of Sandboxie (1.12.0b) introduces an improvement in this regard. Now it is possible to capture any sandboxed application via sandboxed OBS (both have to stored in the same box) regardless of the application being run in fullscreen or window mode. However, unsandboxed OBS still can't capture any sandboxed application.