How to automatically switch game capture and display capture.

viun

New Member
It's a post that I answered questions from another thread, but I'm posting it here for a lot of people to see.
(My English can be awkward because I am not a native speaker.)


1. Install Advanced Scene Switcher plug-in.​

You can download here. https://obsproject.com/forum/resources/advanced-scene-switcher.395/

2. Open OBS and create two scenes for display capture and game capture.​

obs1.png

Of course, please add the correct source for each scene.

3. Add an existing game capture to the "Desktop Scene".​

obs2.png
obs3.png

**DON'T MAKE NEW ONE!** Simply add an existing one.
We only need the status that the game capture has been detected.

One of the macros we're going to create is a macro that goes to another screen when game capture is disabled.

When you create new one, the game capture of the other scene will not be activated. Therefore, please use the existing one so that the macro does not work after switching scene.

4. Open Advanced Scene Switcher, and Make Macros​

You can find plug-in at Tools - Advanced Scene Switcher
Then Go to Macro tab, and Make two macros.

Macro 1.
obs4.png

obs4_2.png

I don't recommend it. However, some games stop framing when you doing alt-tab. So if you want to switch to alt-tab, This condition can be helpful.

Macro 2.
obs5.png

*important* this one must be checked in the "Perform actions only on condition change".

Then go to the General tab and click Start.
obs6.png


DONE. Enjoy it!


Let me know if there's a better way!
In addition to game and display capture switching, I think we can use this method to create various functions.
Hopefully someone can create a plugin with this feature.
 

Edit (2025.04.29)​

Since the Advanced Scene Switcher 1.29.0 update, setting things up has become much easier and more effective.

First, set up your scenes like this:​

1.png

2.png


Then, configure your macros like this:​

3.png

4.png


With this setup, you can smoothly switch to the desktop using Alt+Tab no matter what game you're playing.
It also uses fewer resources, making it more efficient overall.
 
Does both game and desktop need both display capture and game capture? Not sure if I am getting this to work on my end
 

Edit (2025.04.29)​

Since the Advanced Scene Switcher 1.29.0 update, setting things up has become much easier and more effective.

First, set up your scenes like this:​

View attachment 113168
View attachment 113169

Then, configure your macros like this:​

View attachment 113171
View attachment 113172

With this setup, you can smoothly switch to the desktop using Alt+Tab no matter what game you're playing.
It also uses fewer resources, making it more efficient overall.
Plugin appears to have updated or something because both the wording is different for my "Switch Program Scene To" vs yours and I don't have any scenes appearing in the drop down despite having two scenes named identically as yours.
1761692928048.png
 
I had to change Viun's approach a bit, because I wanted to add several games but one of them uses hardware gamma and that is not applied to a Live Stream which results in the stream being too dark, so I had to add a 'Color Correction' filter and change the gamma.
Also, the Games Scene can't have 'Display Capture', the point is to use 'Game Capture' for games.

Scenes:
1. Create "Games" and add 'Game Capture' for all the games.
2. Create "Desktop", add 'Display Capture' and 'Game Capture' (add existing) with all the existing games.

Macros:
Game On: tick 'Perform actions only on condition change'
1. IF 'Game capture' "God of War" hooked a game
2. OR 'Game capture' "next game" hooked a game
3. Repeat step 2 with all games
4. AND 'Window' is fullscreen and focused
5. 'Switch scene' 'Program' to 'Scene with name' "Games" (this step in the lower pane)

Game Off: tick 'Perform actions only on condition change'
1. IF NOT 'Game capture' "God of War" hooked a game
2. OR NOT 'Game capture' "next game"hooked a game
3. Repeat step 2 with all games
4. OR 'Game capture' "God of War" hooked a game
5. OR 'Game capture' "next game" hooked a game
6. Repeat step 5 with all games
7. AND NOT 'Window' is fullscreen and focused
8. 'Switch scene' 'Program' to 'Scene with name' "Desktop" (this step in the lower pane)
 
I didn't realize there is an 'Else' condition, so my previous post is totally inefficient. I can do it with one scene and one macro.

Scene: "Games + Desktop", add 'Display Capture' and 'Game Capture' for all the games
Macro: "Games + Desktop" and tick 'Perform actions only on condition change'
1. IF 'Game capture' "God of War" hooked a game
2. OR 'Game capture' "next game" hooked a game
3. Repeat step 2 with all games
4. AND 'Window' is fullscreen and focused
THEN (middle pane)
5. 'Scene Item Visibility' on "Games + Desktop" 'Hide' ' Display Capture'
ELSE (lower pane)
6. 'Scene Item Visibility' on "Games + Desktop" 'Show' ' Display Capture'

obs-asw.jpg
 
The steps are logically arranged, from installing the plugin and creating scenes to configuring macros, so even beginners can follow along.
The tip of reusing existing sources instead of creating new game captures is a very important point, helping to avoid errors and save time.
The explanation of macros and the "Perform actions only on condition change" option also shows that you have a deep understanding of this plugin.
This approach is not only applicable to game and display capture but also opens up many other automation possibilities in OBS.
I believe many streamers will encounter this exact problem, and your article will help them a lot.
Hopefully, in the future, there will be a plugin with this feature built-in, but for now, your solution is perfectly fine.
Post by free online games
 
Back
Top