Question / Help Record part of screen, swap btwn 4 apps (with cropped Display Capture), w. transitions?

mijen67

New Member
Hi,
I've just discovered that "Window Capture" doesn't include child windows. I need to do a session where I record from 4 different apps switching between these during the recording, and I guess I'll have to use "Display Capture", feel free to correct me if this is wrong.
I use 1280x720 of a 1920x1280 display.

I've created a scene with a source = display capture, added a filter = crop/pad where I adjust the capture part to include only 1280x720 (canvas and output are set to same value).

I've duplicated above scene, so that I have one per view I need, e.g. one per app, with adjustments not to see menus, borders etc, and also one for different zooms apps.

Now, I would like to use a transition during switching between the apps. I can do this manually by trying to initiate bringing next app to front and at the same time, or just a little before, clicking on relevant scene.
However, isn't there a more elegant way of doing this?
 

koala

Active Member
Don't use the crop filter, if you intend to crop different parts from the same display capture. If you use the crop filter for this, you need to add multiple display capture sources for the same monitor, with different crop settings. This will result in black screens sooner or later, since the multpile display captures for the same monitor stomp on each other.

Instead, remove all but one display capture source for your monitor. Remove the crop filter. There is a different crop method that isn't global: press and hold the ALT key and drag the edges of the display capture source to match your desired window. Cropped edges turn green.
For the next app, add the existing display source a second time with the "add existing" option. This way you are adding a reference, not a new capture. The previous crop isn't there, so you can do a different crop with dragging the edges.

Next to source and scene organization in general:
OBS supports transitions between scenes. So create one empty new scene for each of your apps and create the corresponding cropped display source accordingly as I described above. Name the scene as the app, so you can identify them.
Now you have one (bland) scene for every app, containing a single source. You transition between them by simply changing the scene, and you can configure the transitions by right-clicking the scenes->Transition override.

Next is your branding or whatever global stuff you want to appear in every scene. Create and arrange that stuff in one of your existing app scenes. This will result in one or more additional sources in that scene. Select all these sources in the sources list (ctrl-click for multiselect), except the display capture source with your app, then right-click and choose "Group selected items". This way, you get your global stuff in one group. Name this group "Branding" or whatever. Add this group to your other app scenes, either by copy+paste (Reference) or by adding a group, then choosing the existing group with the "add existing" option.
Now you have one scene for each of your apps, and in addition any branding or global stuff that don't change. You switch between the apps by switching the scene.

Instead of a group, it's also possible to create a "template" scene with the global stuff and add that scene as source to other scenes, but this is inferior to using groups. You never actually switch to that scene. Groups allow more flexibility, and you can directly change the branding without having to switch to the template scene. If you edit the group in one scene, it is magically changed in the other scenes as well, because the group is a reference and not a duplicate. So you don't need to have some template or master scene or group.

If you have multiple monitors, explore the Multiview (View->Multiview). It might visually help switching between scenes.
 

mijen67

New Member
Don't use the crop filter, if you intend to crop different parts from the same display capture. If you use the crop filter for this, you need to add multiple display capture sources for the same monitor, with different crop settings. This will result in black screens sooner or later, since the multiple display captures for the same monitor stomp on each other.

Very useful and detailed feedback, thanks!

Will definitely abandon the global cropping and go local cropping instead.
Will also try the grouping approach for the common stuff.

One thing remains though. Can OBS force an application to be in front of the others (corresponding to when I mouse-click on the edge of an app)? If not the transition and the switching of app in front may not be in sync?
 

koala

Active Member
There is the other way round. Look into Tools->Automatic scene switcher. With this function, you define window titles and corresponding scenes. Whenever some Windows window contains one of the given titles, OBS switches to the scene you set. It's also possible to define a default scene OBS will switch to if no title matches for some time. You don't need to configure full windows titles - an identifying keyword is sufficient.

So in the end, you just use your apps, open and close apps and their windows while OBS silently follows and switches to the corresponding scene.

In case this scene switcher isn't enough for you, there is an "Advanced scene switcher" plugin as well: https://obsproject.com/forum/resources/advanced-scene-switcher.395/
It is useful if you have all your apps open at the same time and need to switch upon the foreground window title. There is also more control over the transition used.
 
Last edited:

mijen67

New Member
I've chosen an alternative solution which does not require tools nor extra plugins.

I've created the following scenes + sources:

Scene: Display1280x720
Source: "Display Capture" with filter: Crop/Pad: relative: left:100, top:200, right:540, bottom: 160.
I'll place my app windows here, i.e. 100x200px from upper-left.

Scene: App1Window (replace "App1" with appropriate app name)
Source: "Window Capture" renamed to "App1win"

Scene: App2Window (replace "App2" with appropriate app name)
Source "Window Capture" renamed to "App2win"

Now I can get the nice transitions.
Say I want to go from App1 to App2 I'll do the following:
App1Window, (transitions to App1 with nice OBS transition).
Focus app (os dependent).
Display1280x720 (to include menus that are child windows).

When I want to go from App2 to App1 I'll do the following:
App2Window,
Focus app,
Display1280x720

Before this I've set the general Scene Transition to "Cut" and for scenes "App1Window" and "App2Window" I set Transition Override to e.g. Luma Wipe.

Once things are running I disable preview to avoid loading my laptop too much.

If you want zooms to certain areas of the app window, just create another scene with a Window Capture with red rectangle in preview moved to zoom area. Or if app uses child window create another scene with Display Capture using existing source.

It's amazing how flexible OBS is.

Feel free to propose improvements to above strategy!
 
Top