Advanced Scene Switcher

Advanced Scene Switcher 1.30.2

KaroHolmberg

New Member
First of all, I think Advanced Scene Switcher is awesome, but for some reason I started to have critical issues with it not executing the content of macros. I can point at least some of the symptoms:
  1. If scene is switched -> Sending global hotkeys to camera takes about 20-40 seconds (although everything should happen in about 5 seconds)
  2. If scene is switched -> Global hotkeys are not sent at all
  3. Although macro is active and running (rules are blinking green) -> macro content is not executed
    1. Macro is executed after I manually click on the button "run macro"
Let's start from the beginning:

I am running a dj-based stream with multiple cameras. The whole thing is based on an automated "base-roll"-macro that launches scenes after another. Each scene is active for some minutes.

I am using ObsBot cameras (Tiny 2's, and one Meet 2). ObsBot software allows me to use hotkeys for activating a specific camera, launching PTZ-presets-slots (three can be stored per camera), and also to execute "zoom preset" separately. I have assigned them as follows:
  • Numpad 1-4: Camera 1-4
  • Numpad 5-6: Wide & Narrow Zoom-position
  • Numpad 7-9: PTZ-preset 1-3
(Note: I am using Numpad-hotkeys because those are not used by any program that I have - and I don't have to use keyboard modifiers with the hotkey).

Example: Activating an overview-camera (#2) pointing to my home bar (preset 3) for a close-up (NarrowZoom) - my macro goes like this:
When Scene "MyBar", then ->
  • send Numpad2 for 1.3 seconds
  • delay 1.3 seconds
  • send Numpad9 for 1.3 seconds
  • delay 1.3 seconds
  • send numpad6 for 1.3 seconds
One of the odd parts is, that I need to send the same key for over a second for it to be recognized within the ObsBot software (and corresponding action to happen) - although, If I press the same key from keyboard -> ObsBot reacts immediately. I have found out, that if there is no-delay between hotkeys sent -> those might not get recognized at all. To have all hotkeys "go through", I need to have a delay in between. Although this has worked before, why is it like this?

As stated, the stream is based in one "base-macro" which runs through the whole 6-12+ hour stream. It launches scenes between 60-240 seconds. Base-macro does not have any camera-control hot-keys, just controlling the scene switching. Base-macro is made to recognize all scenes that have a word "trigger" in them. When trigger-scene is activated -> Base-roll macro starts (again). Base-macro's last line also activates a trigger-macro, so it basically loops itself as long as stream is running.

The base-roll macro has a lot of different rules that prevent it from running is some "special scenes" are active - but the actual macro is also very long. When I click on the macro on the macro list, it takes something like 20-30 seconds to load it and show the content (this is quite irritating btw).

At the same time I am running a dozen of other macros which, for example:
- Send global hotkeys based on the current scene that the base-macro activates ( = assigns camera, activates a pan/tilt preset, and activates a possible zoom-position)
- Activates event add-scenes (e.g. every 80 minutes or so)
- Activates my social media page infos (every 90 minutes or so)
- Activates streaming-info's (every 180 minutes or so)
- Multiple macros that recognize any of those "interruption scenes" and after 90 seconds -> activate a scene named "Trigger.Something".

Now, even though the base-macro runs and scenes are switched -> those other macros do not send the global hotkeys to ObsBot software and camera angles and stuff do not change.

Any ideas why it does not work as should, why hotkeys are not send. Should I try to make it more simpler? What would be the best method for simplyfying it?

(I can have a teams/zoom/discord call to showcase this, if it helps)
 

Warmuptill

Active Member
First of all, I think Advanced Scene Switcher is awesome, but for some reason I started to have critical issues with it not executing the content of macros. I can point at least some of the symptoms:
  1. If scene is switched -> Sending global hotkeys to camera takes about 20-40 seconds (although everything should happen in about 5 seconds)
  2. If scene is switched -> Global hotkeys are not sent at all
  3. Although macro is active and running (rules are blinking green) -> macro content is not executed
    1. Macro is executed after I manually click on the button "run macro"
Let's start from the beginning:

I am running a dj-based stream with multiple cameras. The whole thing is based on an automated "base-roll"-macro that launches scenes after another. Each scene is active for some minutes.

I am using ObsBot cameras (Tiny 2's, and one Meet 2). ObsBot software allows me to use hotkeys for activating a specific camera, launching PTZ-presets-slots (three can be stored per camera), and also to execute "zoom preset" separately. I have assigned them as follows:
  • Numpad 1-4: Camera 1-4
  • Numpad 5-6: Wide & Narrow Zoom-position
  • Numpad 7-9: PTZ-preset 1-3
(Note: I am using Numpad-hotkeys because those are not used by any program that I have - and I don't have to use keyboard modifiers with the hotkey).

Example: Activating an overview-camera (#2) pointing to my home bar (preset 3) for a close-up (NarrowZoom) - my macro goes like this:
When Scene "MyBar", then ->
  • send Numpad2 for 1.3 seconds
  • delay 1.3 seconds
  • send Numpad9 for 1.3 seconds
  • delay 1.3 seconds
  • send numpad6 for 1.3 seconds
One of the odd parts is, that I need to send the same key for over a second for it to be recognized within the ObsBot software (and corresponding action to happen) - although, If I press the same key from keyboard -> ObsBot reacts immediately. I have found out, that if there is no-delay between hotkeys sent -> those might not get recognized at all. To have all hotkeys "go through", I need to have a delay in between. Although this has worked before, why is it like this?

As stated, the stream is based in one "base-macro" which runs through the whole 6-12+ hour stream. It launches scenes between 60-240 seconds. Base-macro does not have any camera-control hot-keys, just controlling the scene switching. Base-macro is made to recognize all scenes that have a word "trigger" in them. When trigger-scene is activated -> Base-roll macro starts (again). Base-macro's last line also activates a trigger-macro, so it basically loops itself as long as stream is running.

The base-roll macro has a lot of different rules that prevent it from running is some "special scenes" are active - but the actual macro is also very long. When I click on the macro on the macro list, it takes something like 20-30 seconds to load it and show the content (this is quite irritating btw).

At the same time I am running a dozen of other macros which, for example:
- Send global hotkeys based on the current scene that the base-macro activates ( = assigns camera, activates a pan/tilt preset, and activates a possible zoom-position)
- Activates event add-scenes (e.g. every 80 minutes or so)
- Activates my social media page infos (every 90 minutes or so)
- Activates streaming-info's (every 180 minutes or so)
- Multiple macros that recognize any of those "interruption scenes" and after 90 seconds -> activate a scene named "Trigger.Something".

Now, even though the base-macro runs and scenes are switched -> those other macros do not send the global hotkeys to ObsBot software and camera angles and stuff do not change.

Any ideas why it does not work as should, why hotkeys are not send. Should I try to make it more simpler? What would be the best method for simplyfying it?

(I can have a teams/zoom/discord call to showcase this, if it helps)
Without more information it is difficult to say what the problem might be.
Would you mind replicating the issue with verbose logging enabled and export your current settings to a file?
As you seem to have a rather complex macro setup it would also be good if you could point at at which timestamp the problem occurred.

Just guessing:
Could it be that another macro is currently executing its actions and thus the subsequent macros have to wait for it to complete?
If that should be the problem, you might want to consider running those "blocking" macros in parallel to other macros.

Another reason for macro actions not being executed, even though the conditions are all met, could be that the macro is configured to only execute its actions on condition change.

The base-roll macro has a lot of different rules that prevent it from running is some "special scenes" are active - but the actual macro is also very long. When I click on the macro on the macro list, it takes something like 20-30 seconds to load it and show the content (this is quite irritating btw).
This should have been improved with the 1.30 releases.
Which version of the plugin are you using?
 

HighMoon

New Member
Sorry about that!

Would you mind sharing your settings for the plugin?
What type of source are you trying to perform the pattern matching on?
Is the source active / visible during the crash?
I've attach the settings, I'm doing a game capture window, counter strike 2. I'm checking the screen for messages and game items. It's a total of 8 screen checks, fairly small areas. It doesn't crash as often if I decrease the number of them that are active. For a long time until recently it didn't crash at all. I've recently change my driver from the game ready to the stream stable version. The source is visible and active when it happens.
 

Attachments

  • adv-ss-Counter Strike 2 - Free Palestine-2025.06.23.19.05.19.txt
    50.6 KB · Views: 8

KaroHolmberg

New Member
This should have been improved with the 1.30 releases.
Which version of the plugin are you using?
Yes. This is a good point. I hade 1.29.something. I have updated and loading the macro to the screen is indeed improved. It still takes some seconds to load on the first go, but after the initial load it is shown immediately when clicked later. Good work :)

I might have found the issue. For some reason I had "Match Behavior" set so, that it caused a 45 second action-skip after performing an action. This naturally caused excluding secondary macros running in parallel.

I will be checking and testing with this new version that everything works.

--

One thing I am keen to test is shortening the hotkey-send length. As mentioned before, I had to make the macro send the hotkey for 1.3 seconds for it to be recognized, not sure why (maybe because the camera head is moving and cannot receive commands while doing so).

Thanks for the quick reply!
 

TCG248

New Member
i want to integrate autoSS with Discord reactive by fugitech but there's an issue.
i have the reactive and an image in a group. i want the group to auto hide and show when the reactive displays vs shows nothing.
how do I test for something and nothing to make 2 or 1 macro(s) that hides and/or unhides the group? i tried video if changed but that detects when they talk too.
there's 3 states to the browser source displaying nothing, showing silent, and showing talking (its brighter)
I don't want it to detect if its hidden cause browsers don't auto hide if nothing is displayed.
 

Warmuptill

Active Member
i want to integrate autoSS with Discord reactive by fugitech but there's an issue.
i have the reactive and an image in a group. i want the group to auto hide and show when the reactive displays vs shows nothing.
how do I test for something and nothing to make 2 or 1 macro(s) that hides and/or unhides the group? i tried video if changed but that detects when they talk too.
there's 3 states to the browser source displaying nothing, showing silent, and showing talking (its brighter)
I don't want it to detect if its hidden cause browsers don't auto hide if nothing is displayed.
I would suggest relying on the Video condition's "exactly matches" check to identify the "nothing" case.
  • Make sure the source is currently in the state you want to detect.
  • Then click the "Browse" button.
  • Next choose "Create Screenshot".
  • Finally, in the area selection, which should show a seemingly empty image, simply click OK.
Let me know if you have questions / doubts about this approach!
 

Warmuptill

Active Member
I've attach the settings, I'm doing a game capture window, counter strike 2. I'm checking the screen for messages and game items. It's a total of 8 screen checks, fairly small areas. It doesn't crash as often if I decrease the number of them that are active. For a long time until recently it didn't crash at all. I've recently change my driver from the game ready to the stream stable version. The source is visible and active when it happens.
Unfortunately, I have not been able to replicate the behavior on my end even with 30+ video condition checks running on a single game capture source.

While the Advanced Scene Switcher is involved in the call chain leading up to the crash, the fault ends up in libobs-d3d11.dll!gs_stagesurface_map+0x40 and finally d3d11.dll.
So, I am at a bit off a loss as to what I might be doing wrong here.

Maybe it is a bit far fetched, but since this is the first time I am seeing such a crash, could you maybe try updating your graphics drivers / dx11 (if that is an option)?
 

TCG248

New Member
I would suggest relying on the Video condition's "exactly matches" check to identify the "nothing" case.
  • Make sure the source is currently in the state you want to detect.
  • Then click the "Browse" button.
  • Next choose "Create Screenshot".
  • Finally, in the area selection, which should show a seemingly empty image, simply click OK.
Let me know if you have questions / doubts about this approach!
there is an issue with that, when they talk the whole image changes brightness being detected as a new image
 

Warmuptill

Active Member
there is an issue with that, when they talk the whole image changes brightness being detected as a new image
Can you elaborate / provide example screenshots?

I understood you request as "I want to detect if the browser source does not show anything at all and then do X, and if it does show something do Y"
So a macro like this might do the trick:
1750959553522.png


But I assume I must have misunderstood.
 
Last edited:

Gareth Allen

New Member
Hey is there a way to to get a setting from a scene item and assign that to a variable? I see an option in the 'Scene item transform' action to 'Set transform setting' but don't see an option to 'Get transform setting'.
 

Warmuptill

Active Member
Hey is there a way to to get a setting from a scene item and assign that to a variable? I see an option in the 'Scene item transform' action to 'Set transform setting' but don't see an option to 'Get transform setting'.
If you want to get all (non-default) settings of a source you can use this macro:
1750964292134.png


If you just want the value of a single setting you can use a macro like this:
1750964323505.png
 

Gareth Allen

New Member
Hey thanks for the quick reply. When I follow the above and change the text changes I get the following output:

{"font":{"face":"Montserrat","style":"Bold","size":85,"flags":1},"text":"Name Of Person"}

Unfortunately what I don't get is the width of the text which is what i'm looking for. I've tried using the Single Setting template you have provided, but when I change the text the width 'Setting value changed' macro doesn't trigger, so no change is made to the variable.

For context what I'm trying to do is depending on the size of the text (and a little bit of calculation after), crop the right hand side of an image source I have as a background.

1750965909210.png
 

Gareth Allen

New Member
Ahh actually, using your example of grabbing the property from the macro, I just had to change what the macro trigger was to Scene Item Transform

Brilliant plugin, thank you!

1750966594749.png
 
Top