How to record multiple windows and switch automatically between them

AndreiBarbu

New Member
Hello everyone! Happy new year!

I am very new to OBS.

I would like to record at least two windows while switching between. For example, I would like to use Chrome, then switch to Visual Studio Code using the Windows Taskbar and OBS to detect that automatically.

I've been able to create two scenes and use hotkeys to switch between scenes, but I find that inefficient because beside that, I also need to select it from Taskbar.

My goal is to record only specific windows which are on the same screen and on that screen to have another not-recorded tool that I will use as notes/scripts.

Your help is highly appreciated. Thank you!
 

koala

Active Member
There is the automatic scene switcher in OBS. It switches scenes within OBS according to the title of the foreground app. You define rules which window title should make OBS switch to what scene. If you change the foreground app, OBS automatically changes the scene.

For your use case, create 2 scenes: one with a window capture of Chrome, the other with a window capture of Visual Studio Code.
Then open Tools->Automatic Scene switcher. You are able to define assignments between window title matches (you can enter partial matches, for Chrome with any window, just enter "- Google Chrome" as match) and scenes. To add a rule, press the +, afterwards the button "Start" to start the matcher.

Now, if you switch the app, for example with ALT-TAB, OBS automatically switches the scene if some scene switcher rule matches and you don't need to do this manually. If you switch to a window with no matching rule, for example the app with your notes, the scene isn't changed (as long as you don't define a default rule in the switcher).
 

AndreiBarbu

New Member
Hello @koala ! Thank you for letting me know. I can confirm that it works. Initially I followed the steps and it didn't work, I tried multiple times. After closing and reopening OBS, it worked.

Additionally, I wanted to let you know that one friend on MacBook achieved my goal without Automatic Scene Switcher. He just did it by adding 2 Sources in the same Scene (separate, not to existing). For me, doing this on Windows 11 is just overlapping the two windows, not switching between them. We both use 28.1.2 version. I also tried on my brother's Windows 10 who had an older version 25. something and the behavior is the same as for me, on Windows 11. Is this the expected behavior or a bug?

Thank you!
 

AndreiBarbu

New Member
Hello again, @koala ! You suggested to use "- Google Chrome" but every time I was starting a new recording, it was not recognizing, for example, the fact that I have a new tab. To make it work, I used the following as per https://obsproject.com/forum/threads/automatic-scene-switcher-help-needed.118190/

1672739599442.png


Hope this will persist.

Could you please confirm that it requres ".* "also? Thank you!
 

koala

Active Member
The switcher works with regular expressions, so .* - Google Chrome is correct. Sorry for my incomplete answer.
 
Top