Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

Crump

New Member
Can anybody help me concoct a macro for my replay buffer? I would like a way to fully enable/disable a Display Capture source depending on if an Auto Game Capture source is active or not in order to not constantly render Display Capture underneath everything and use up resources. Not really sure where to start with this or if it's even possible, since I'm not entirely sure if OBS can fully disable a specific source.
 

Crump

New Member
Can anybody help me concoct a macro for my replay buffer? I would like a way to fully enable/disable a Display Capture source depending on if an Auto Game Capture source is active or not in order to not constantly render Display Capture underneath everything and use up resources. Not really sure where to start with this or if it's even possible, since I'm not entirely sure if OBS can fully disable a specific source.
I obviously found the page on the wiki explaining how to automatically switch to another scene with Display Capture when no output is detected in your Game Capture scene, but how would you get it to switch back to game capture when an eligible output is detected? There's no option for "has output", I imagine because when a scene isn't loaded it'll never have output. I'm sure I could manually add every exe I want it to detect and switch to, but is there an easier way to do that or just auto switching scenes every X seconds/minutes to check if there's ouput (second option sounds awful because it'd interrupt recording)
 

l1i1l

Member
Hi, @Warmuptill .

I noticed one problem: if you use a transition between scenes, your plugin changes the transition time set in the OBS transition panel to the value specified in the applied macro. And after that, all transitions (even those launched manually) begin to use the new value, which is not good.

The problem will be solved if after using the macro, the transition time value in the OBS panel automatically returns to the state that was before.
 

AaronD

Active Member
Hi, @Warmuptill .

I noticed one problem: if you use a transition between scenes, your plugin changes the transition time set in the OBS transition panel to the value specified in the applied macro. And after that, all transitions (even those launched manually) begin to use the new value, which is not good.

The problem will be solved if after using the macro, the transition time value in the OBS panel automatically returns to the state that was before.
Does this setting solve your problem?:
1730813063199.png

As shown here will probably cause it, but I think the other one will fix it.
 

Warmuptill

Active Member
Trying to run the script -- tried importing the macro, after loading the script into the Script tool in OBS.
Not seeing anything work.
Just in case others are wondering what the issue was.
The new zoom level will only be applied when zooming back out and back in first.
Changing the zoom level while already zoomed in is not supported by the script at the moment.

how would you get it to switch back to game capture when an eligible output is detected? There's no option for "has output"
You can simply inverse the condition by using "if not" instead of "if", or "and not" instead of "and", etc. .
I imagine because when a scene isn't loaded it'll never have output.
I think OBS will automatically "disable" the Display source it if not used by any active scene. (Preview or Program)
I don't really know for sure how the Game Capture source behaves in that regard, but I assume it might be similar.
(You could open a "projector" of the source to work around that, but that defeats the purpose of what you are trying to do)

So relying on "has output" might not make sense for what you are trying to achieve.

You might be able to check if the source output has / has not changed in a while instead.
But seeing as your intention is to save resources this might also not really be a good approach, as this can be a rather expensive operation.

Unfortunately, at the moment I don't really have any obvious solution, which would help you save resources.
Hi, @Warmuptill .

I noticed one problem: if you use a transition between scenes, your plugin changes the transition time set in the OBS transition panel to the value specified in the applied macro. And after that, all transitions (even those launched manually) begin to use the new value, which is not good.

The problem will be solved if after using the macro, the transition time value in the OBS panel automatically returns to the state that was before.
I can confirm that the setting pointed out by Aaron should do the trick :)
When you only check "Set transition overrides" the settings in the "Scene Transitions" dock will not be touched.
 

l1i1l

Member
I can confirm that the setting pointed out by Aaron should do the trick :)
When you only check "Set transition overrides" the settings in the "Scene Transitions" dock will not be touched.
Oh, yes, it works! I haven't looked at the general settings for a long time, since almost everything works properly there by default.

Thanks again for your plugin and quick consultation.
 

RobertWilliams

New Member
Feature request:

In selecting the file for the video / scene / matches pattern, add a third option (in addition to "Use Existing file" and "Create screenshot") to select an area within the "check only in area" selected. My current work around is to select the area to match and then take a screenshot. After taking the screenshot, I make the select area bigger.

Thank you for considering my request.
 

Warmuptill

Active Member
Feature request:

In selecting the file for the video / scene / matches pattern, add a third option (in addition to "Use Existing file" and "Create screenshot") to select an area within the "check only in area" selected. My current work around is to select the area to match and then take a screenshot. After taking the screenshot, I make the select area bigger.

Thank you for considering my request.
In 1.28.0 the "Create screenshot" button was changed to instead of always capturing the complete source output to prompt the user to select which area of the screenshot they want to keep.
 
I am using the lastes 1.28 version (and saw the same thin on 1.27):

I am using a macro to create a variable, then also populate a source text object with the value.
This was working for the laat week or two, until yesterday.

As soon as I actually trigger the source text object to be populated with a new value, OBS crashes -- with the window that says it "stopped working" and only gives me the option to "close the program.

When I open OBS again, the variables do not have the new values populated to the source text... but insteas the old values.

Any thoughts?
 

AaronD

Active Member
I am using the lastes 1.28 version (and saw the same thin on 1.27):

I am using a macro to create a variable, then also populate a source text object with the value.
This was working for the laat week or two, until yesterday.

As soon as I actually trigger the source text object to be populated with a new value, OBS crashes -- with the window that says it "stopped working" and only gives me the option to "close the program.

When I open OBS again, the variables do not have the new values populated to the source text... but insteas the old values.

Any thoughts?
I don't have an answer, but more of an organizational tip:

In such a long and complex thread as this, with lots of independent subthreads interwoven at random, it helps a LOT to reply to a specific post and not the thread in general, unless you really are starting a brand new issue. Replying to this thread in general has become like creating a whole new topic in the overall forum, and makes it almost as difficult to follow the history of a specific issue.

Thanks!
 
I thought I was posting a comment in the "discusssion" area about the Advanced Scene Switcher -- lIke i see a lot of people do.
Plus, I figured I would hit up "the community" of users of AdvSS, without necessarily bothering Warmuptill.
 
If anyone is interested, I went back to my previous methof writing the variable value to a file, then having the source text object "read from file". Seems to work fine.

So I guess there is a bug with the feauture of writing a variable value directly to a source object.
 

AaronD

Active Member
I thought I was posting a comment in the "discusssion" area about the Advanced Scene Switcher -- lIke i see a lot of people do.
You are. If it's meant to be independent of an existing issue, then that's fine. It just appeared to be a continuation of one that I remembered recently, but wasn't in the last couple of posts. If that's true, then you'd effectively be asking for help without context, because the context rots that fast in here without that reminder.

Plus, I figured I would hit up "the community" of users of AdvSS, without necessarily bothering Warmuptill.
I don't think you can avoid that. Just post in here anyway.
 

Warmuptill

Active Member
I am using a macro to create a variable, then also populate a source text object with the value.
This was working for the laat week or two, until yesterday.
Can you please share the corresponding macro(s)?
And if it exists can you please also share a crash log?
Thank you!
When I open OBS again, the variables do not have the new values populated to the source text... but insteas the old values.
That is expected if obs does not shut down cleanly / crashes.
The settings are only saved on shutdown / when closing the advanced scene switcher settings window.
 
Last edited:

Sambo3975

New Member
I'm running Linux Mint, and I can't get OBS to launch with this plugin installed. Here's my log:

Code:
16:54:35.134: CPU Name: AMD Ryzen 7 3700X 8-Core Processor
16:54:35.134: CPU Speed: 3600.000MHz
16:54:35.134: Physical Cores: 8, Logical Cores: 16
16:54:35.134: Physical Memory: 32035MB Total, 29196MB Free
16:54:35.134: Kernel Version: Linux 5.15.0-124-generic
16:54:35.134: Distribution: "Linux Mint" "21.3"
16:54:35.134: Session Type: x11
16:54:35.134: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
16:54:35.135: Qt Version: 5.15.3 (runtime), 5.15.2 (compiled)
16:54:35.136: Portable mode: false
16:54:35.163: OBS 27.2.3+dfsg1-1 (linux)
16:54:35.163: ---------------------------------
16:54:35.163: ---------------------------------
16:54:35.163: audio settings reset:
16:54:35.163:     samples per sec: 48000
16:54:35.163:     speakers:        2
16:54:35.168: ---------------------------------
16:54:35.168: Initializing OpenGL...
16:54:35.243: Loading up OpenGL on adapter NVIDIA Corporation NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2
16:54:35.243: OpenGL loaded successfully, version 3.3.0 NVIDIA 535.183.01, shading language 3.30 NVIDIA via Cg compiler
16:54:35.255: ---------------------------------
16:54:35.255: video settings reset:
16:54:35.255:     base resolution:   2560x1440
16:54:35.255:     output resolution: 1920x1080
16:54:35.255:     downscale filter:  Bicubic
16:54:35.255:     fps:               60/1
16:54:35.255:     format:            NV12
16:54:35.255:     YUV mode:          709/Partial
16:54:35.255: NV12 texture support not available
16:54:35.267: Audio monitoring device:
16:54:35.267:     name: Default
16:54:35.267:     id: default
16:54:35.267: ---------------------------------
16:54:35.269: os_dlopen(/usr//lib/x86_64-linux-gnu/obs-plugins/advanced-scene-switcher-lib.so->/usr//lib/x86_64-linux-gnu/obs-plugins/advanced-scene-switcher-lib.so): libobs-frontend-api.so.30: cannot open shared object file: No such file or directory
16:54:35.269:
16:54:35.269: Module '/usr//lib/x86_64-linux-gnu/obs-plugins/advanced-scene-switcher-lib.so' not loaded

Any idea what could be causing this and how it can be fixed?
 

Warmuptill

Active Member
I'm running Linux Mint, and I can't get OBS to launch with this plugin installed. Here's my log:

Code:
16:54:35.134: CPU Name: AMD Ryzen 7 3700X 8-Core Processor
16:54:35.134: CPU Speed: 3600.000MHz
16:54:35.134: Physical Cores: 8, Logical Cores: 16
16:54:35.134: Physical Memory: 32035MB Total, 29196MB Free
16:54:35.134: Kernel Version: Linux 5.15.0-124-generic
16:54:35.134: Distribution: "Linux Mint" "21.3"
16:54:35.134: Session Type: x11
16:54:35.134: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
16:54:35.135: Qt Version: 5.15.3 (runtime), 5.15.2 (compiled)
16:54:35.136: Portable mode: false
16:54:35.163: OBS 27.2.3+dfsg1-1 (linux)
16:54:35.163: ---------------------------------
16:54:35.163: ---------------------------------
16:54:35.163: audio settings reset:
16:54:35.163:     samples per sec: 48000
16:54:35.163:     speakers:        2
16:54:35.168: ---------------------------------
16:54:35.168: Initializing OpenGL...
16:54:35.243: Loading up OpenGL on adapter NVIDIA Corporation NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2
16:54:35.243: OpenGL loaded successfully, version 3.3.0 NVIDIA 535.183.01, shading language 3.30 NVIDIA via Cg compiler
16:54:35.255: ---------------------------------
16:54:35.255: video settings reset:
16:54:35.255:     base resolution:   2560x1440
16:54:35.255:     output resolution: 1920x1080
16:54:35.255:     downscale filter:  Bicubic
16:54:35.255:     fps:               60/1
16:54:35.255:     format:            NV12
16:54:35.255:     YUV mode:          709/Partial
16:54:35.255: NV12 texture support not available
16:54:35.267: Audio monitoring device:
16:54:35.267:     name: Default
16:54:35.267:     id: default
16:54:35.267: ---------------------------------
16:54:35.269: os_dlopen(/usr//lib/x86_64-linux-gnu/obs-plugins/advanced-scene-switcher-lib.so->/usr//lib/x86_64-linux-gnu/obs-plugins/advanced-scene-switcher-lib.so): libobs-frontend-api.so.30: cannot open shared object file: No such file or directory
16:54:35.269:
16:54:35.269: Module '/usr//lib/x86_64-linux-gnu/obs-plugins/advanced-scene-switcher-lib.so' not loaded

Any idea what could be causing this and how it can be fixed?
Unfortunately, the minimum required OBS version for this plugin is currently OBS 30.1.2.

You still seem to be using OBS 27.
I think the last version of the advanced scene switcher supporting OBS 27 was 1.17.7.
 

AaronD

Active Member
I'm running Linux Mint, and I can't get OBS to launch with this plugin installed. Here's my log:

Code:
16:54:35.134: CPU Name: AMD Ryzen 7 3700X 8-Core Processor
16:54:35.134: CPU Speed: 3600.000MHz
16:54:35.134: Physical Cores: 8, Logical Cores: 16
16:54:35.134: Physical Memory: 32035MB Total, 29196MB Free
16:54:35.134: Kernel Version: Linux 5.15.0-124-generic
16:54:35.134: Distribution: "Linux Mint" "21.3"
16:54:35.134: Session Type: x11
16:54:35.134: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
16:54:35.135: Qt Version: 5.15.3 (runtime), 5.15.2 (compiled)
16:54:35.136: Portable mode: false
16:54:35.163: OBS 27.2.3+dfsg1-1 (linux)
16:54:35.163: ---------------------------------
16:54:35.163: ---------------------------------
16:54:35.163: audio settings reset:
16:54:35.163:     samples per sec: 48000
16:54:35.163:     speakers:        2
16:54:35.168: ---------------------------------
16:54:35.168: Initializing OpenGL...
16:54:35.243: Loading up OpenGL on adapter NVIDIA Corporation NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2
16:54:35.243: OpenGL loaded successfully, version 3.3.0 NVIDIA 535.183.01, shading language 3.30 NVIDIA via Cg compiler
16:54:35.255: ---------------------------------
16:54:35.255: video settings reset:
16:54:35.255:     base resolution:   2560x1440
16:54:35.255:     output resolution: 1920x1080
16:54:35.255:     downscale filter:  Bicubic
16:54:35.255:     fps:               60/1
16:54:35.255:     format:            NV12
16:54:35.255:     YUV mode:          709/Partial
16:54:35.255: NV12 texture support not available
16:54:35.267: Audio monitoring device:
16:54:35.267:     name: Default
16:54:35.267:     id: default
16:54:35.267: ---------------------------------
16:54:35.269: os_dlopen(/usr//lib/x86_64-linux-gnu/obs-plugins/advanced-scene-switcher-lib.so->/usr//lib/x86_64-linux-gnu/obs-plugins/advanced-scene-switcher-lib.so): libobs-frontend-api.so.30: cannot open shared object file: No such file or directory
16:54:35.269:
16:54:35.269: Module '/usr//lib/x86_64-linux-gnu/obs-plugins/advanced-scene-switcher-lib.so' not loaded

Any idea what could be causing this and how it can be fixed?
Unfortunately, the minimum required OBS version for this plugin is currently OBS 30.1.2.

You still seem to be using OBS 27.
I think the last version of the advanced scene switcher supporting OBS 27 was 1.17.7.
Be aware that if you decide to update OBS, the change from v27 to v28 not only breaks pretty much all of the plugins, but also wipes out their settings even if you downgrade back!
  • Some of their functions became native, so you don't need the old plugin anymore. The WebSocket server is one of those.
  • Some died because they were already abandoned but still continued to work until then.
  • Some, like this one, were rebuilt for the change and thus continue to work.
There is a way to upgrade without losing settings - essentially upgrade both OBS and all the plugins before trying to run it at all, and hope that you did it all right - but it's much more straightforward to document all of what you have, let it wipe out, and then rebuild it from your documentation.

It's generally recommended to keep things up to date, but do be aware of that version in particular!
 

tonyl

New Member
Hi,

Hotkeys for macros has stopped working for me, and I have no idea why.

I have macros for managing whether sources are enabled in scenes, and have them linked to hotkeys. It was all working fine until about a week ago, when now they don't.

The macros still work - I can run them manually. Hotkeys still work, e.g. for doing transitions. There are no conflicting hotkeys. I've removed and reassigned the hotkeys, and tried using other hotkeys. No upgrade have been done (at least not intentionally). I've restarted OBS and the computer. I've switched profiles.

I haven't yet looked at logs. I only just thought of that, and the computer is not with me.

Anything else I can try next time I am at the computer?

Thanks @Warmuptill for a great plugin.
 
Top