Advanced Scene Switcher

Advanced Scene Switcher 1.37.2

I am using two .mp4 video files. I had only 2 macros, the when I added a third to continue on, then the video output was quickly switching among the 3 videos.
I am having some success using the media Tab in the center of ASS, but when I try to use 2 individuals macros nothing happens. I tried going to OBS Version 3.1.0 but no luck. Is there earlier version of ASS I could try?
You can find all previous versions of the plugin here:

hi :)
i'm trying to set up adv-SS to automatically switch between games & my desktop. however, i think i may have set up the macros incorrectly as it's only half-working.

switching from my game scene to my desktop scene works. it plays the 300ms fade transition & everything is fine.
however, when it's the other way around (desktop scene ➔ game scene), it doesn't switch. i know this because it doesn't play the 300ms fade transition, & it records my whole desktop audio rather than just game audio.

i've attached a screenshot of the setup.

thankyou :]
I don't fully understand what you want the trigger for the scene switch to be.
If it is just "if game capture is capturing something switch to game scene and to desktop scene otherwise" you might want to try this macro instead:

1749292596596.png


You can import the example macro using this code:

Code:
AAAOVnic1VdtT+NGEP4r1n5qqwTF4aXANy6lPaTjjjbcqVWFrM16bK+y2bX2xRxC/PfO2I7jJFwgpVJbpAhnPPPMzLPzsnlkCy6scez8z0em+QLYOZveSy+KyAnQ4NiA5daEkp1nXDkYsJIHB1NewTsoeCWNZeejVtrTsVwpUJ1AFCDmE6NT6aXR7krfbGoYPSm4zhHD24Df3VyWl19BfNJTz63v9Jw35YVoULKPxv9k9MovRVYY6yfSiiD9ZcVV4KTb15gExFh0wUwotCvtwaL2KuCdSo+MkKH3MDoYn238DZh/KOnVE7rV0tc8VWBdHU+M0tSI+RS8lzp3hGUhlw59dFEU3P0W9LvgPZk0xKDshsjekiJPPrgPfNZjtZB5ofDjr7IV+7c2rCizS/xb+IohMvTH2uNck9c+GWWy/e5zI8O3Ys1JE1GrtPIfcQsRhX2wZvEzBbTLpI6YbIi3qxQVeFo5N6wreEjCIc9OZyeH45Mh8j8aHglxODw9PjoZZsfjOB6dnmY/np2wjVOozZuS6hxOSyU9nsSNcbKpH2yPktokPjx8GrTPR0cnT3ctwCXG1oDssD0bdbbj8RHZLo/8vfFzeHDrXdYI0f6u470v8ibPFdxsileM1p4d5AvQvl9nwijFSwfpdlusl4/oy9j1Q6TqxwEDzWeK7JvqW+NT0snkOEoSwUsfLNWFMrkUdQOkwdYdeW1SmUmq9UfmJSljwN5yqZtGcUB5uOd7bfRSb6HYmWBFbdaqDpbz7Rf8F03a2J7oFLj4t/mqh23i6smL+vXXKSgQTQVtJ0EEM7RGynRTZ7e1Rryi+G9yN2Azhb30WXupbjv0Zs62s5miu21BkD7oav9/RWEKbo7b5L/CotRl8F+4lZQnEXlH0qon6Db0NTjHc4iW2pQubuSLNlVqM8h4UAhXx8sYzZ2l8UNUPW8XD5YJsviY7QThLs3os5dnHO46yaRahG87ptfxbt8enP82wMEPL1uP9wr79whH+V4Wf+xtYeu1+3p9xZ3H+eoFXyTlctGsA4y3ABYy/QCZ7+OUij8k8cglFujxRYi6S9cAuHO+sCFxwobZDBt0b4gml4J7DCKz4IoXIUZrEVioJNwnNMSrHSU92l0XSGZC+0dtHtwrMnC08pPlhNrbfGbNvQObNCsrqYwKi81EtmFmXMzpaq7TPlYBeFvGybXfTMCu8xQA+KQEjEF7HC+vQOh2568BwsaMMhVE13QTwuvbdxMUWh59kU7OpILvWX3zbC/39OuimYl4+kZV0E3BT/oibUd+f4I9B/1epinoNwK3mAgZfeT1GfwzYNPmMvIWuKm3QEhkG3GdRpc6fRsg7Z+o2ZBR+2tif7y73tZj8cHh6CBmT38BLT7yaQ==
 
If it is just "if game capture is capturing something switch to game scene and to desktop scene otherwise" you might want to try this macro instead:

yes, this is almost correct, and thankyou! it's much better my setup. didn't realize you could add "else" actions.
only difference is that i added another condition so that it could only switch if both game capture is hooked & window is fullscreened, with an "and window" condition.

however, the issue still persists, and i think i know why.
since the desktop scene doesn't have a game capture source, it can't switch to the game scene.
the macro scans for any game capture hooks, but since there isn't a game capture source in the scene, there's nothing to detect. therefore the scene never switches.

i'm not sure how to do a workaround for this... any ideas?
maybe i could add a hidden game capture source in the desktop scene, but i don't like the performance impact it might bring.
 
however, the issue still persists, and i think i know why.
since the desktop scene doesn't have a game capture source, it can't switch to the game scene.
the macro scans for any game capture hooks, but since there isn't a game capture source in the scene, there's nothing to detect. therefore the scene never switches.

i'm not sure how to do a workaround for this... any ideas?
maybe i could add a hidden game capture source in the desktop scene, but i don't like the performance impact it might bring.
Yes, that might indeed be what is causing the issues you are facing.
To work around it you could open up a projector of the game capture source by right-clicking on the source and clicking "Open Source Projector"
This would ensure that the source is always "active".

I can't really comment with certainty on what the overhead would be.
But I assume it can't be that high when it is not actively capturing anything.
 
BTW if I use the horizontal "Media" tab, (State Ended and Switch To) I can get it to work. When I try using Macros with same logic, it doesn't.
 
Moving some Macros from one set of scenes to another via import/export, and everytime I delete an imported macro OBS crashes. Dont know if u can recreate it, but its sure getting to me.
 
Moving some Macros from one set of scenes to another via import/export, and everytime I delete an imported macro OBS crashes. Dont know if u can recreate it, but its sure getting to me.
Thanks for reporting the bug!
I think that issue might already be fixed on the master branch.

A build can be found here:
You will have to be logged into GitHub to be able to download it at the bottom of the page.

Let me know if that resolved the problem! :)
I will release an update containing this fix (soon).
 
after installing this version, it let me delete 2 macros.... then obs crashed.
In that case, can you please share the crash log?
Does the crash still happen if you enable this option on the General tab?
1749591777672.png



Update:
I think I was able to identify a possible root cause for the crashes you observed.
A build with a fix will be available here in a few minutes:

I will try to release an update during the weekend.
Thanks for letting me know about the issue! :)
 
Last edited:
Hello I'm having trouble setting up macro for switching Display sources.
I have a setup for Sunshine/Moonlight streaming where a virtual display is disconnected/connected from the PC upon ending/starting a session.

This results to display id changing everytime I disconnect/connect the virtual display for example:
  • \\\?\DISPLAY\#SMKD1CE\#1&15ecd195&1&UID261\#\{e6f07b5f\-ee97\-4a90\-b076\-33f57bf4eaa7\}
  • \\\?\DISPLAY\#SMKD1CE\#1&15ecd195&1&UID256\#\{e6f07b5f\-ee97\-4a90\-b076\-33f57bf4eaa7\}

UID seems to be the one that's changing but I dont know a way of getting this "new" information after a new display is connected. Its also random and not incrementing

Is there a way to loop through all of the "Display (List)" values and select whatever's the newest connected display?
 
Hello I'm having trouble setting up macro for switching Display sources.
I have a setup for Sunshine/Moonlight streaming where a virtual display is disconnected/connected from the PC upon ending/starting a session.

This results to display id changing everytime I disconnect/connect the virtual display for example:
  • \\\?\DISPLAY\#SMKD1CE\#1&15ecd195&1&UID261\#\{e6f07b5f\-ee97\-4a90\-b076\-33f57bf4eaa7\}
  • \\\?\DISPLAY\#SMKD1CE\#1&15ecd195&1&UID256\#\{e6f07b5f\-ee97\-4a90\-b076\-33f57bf4eaa7\}

UID seems to be the one that's changing but I dont know a way of getting this "new" information after a new display is connected. Its also random and not incrementing

Is there a way to loop through all of the "Display (List)" values and select whatever's the newest connected display?
I can't really think of an elegant way to do this with the options currently available in the plugin.

Does the name of the virtual display in the settings of the display capture source stay the same after it has been disconnected / reconnected?

If so, I have implemented the option to select the user facing name of the settings value instead of the underlying value used by OBS for lists in a build, which will be available here in a few minutes:
1750196050895.gif


You will have to be logged into GitHub to be able to download this test build at the bottom of the page.
If that should not be an option for you, I will try to share it via other means.

I hope that this build will be able to solve the issue.
I could only perform limited testing so far, so, if you run into issues please let me know about them! :)
 
Wow awesome for trying to add it and yeah the display name stays the same.

Ive tried a couple of questionable solutions like making the 2 macros call each other until a display is found for a give range of UID but it does not work 100% of the time. Or making a macro do a sequence of itself or something like that which causes an infinite loop that crashes obs

Anyways I'll try the test build and let you know, thanks!
 
You will have to be logged into GitHub to be able to download this test build at the bottom of the page.
If that should not be an option for you, I will try to share it via other means.

I hope that this build will be able to solve the issue.
I could only perform limited testing so far, so, if you run into issues please let me know about them! :)
The test build was perfect!
Its so seamless now compared to what macro frankenstein I came up with
 
Hello ,

I'm not able to open the Advanced scene switcher using the installer.exe, so I used the ZIP file to extract the whole files, but I'm not able to install the plugin properly and once I copied all the advanced scene switcher to my obs-plugin file I encountered this.

1750241407697.png



Can anyone help me please
 
Hello ,

I'm not able to open the Advanced scene switcher using the installer.exe, so I used the ZIP file to extract the whole files, but I'm not able to install the plugin properly and once I copied all the advanced scene switcher to my obs-plugin file I encountered this.

View attachment 114116


Can anyone help me please
You probably did not install the plugin properly.
At least the plugin's data/locale folder seems to be missing.

If you want to manually install the plugin download the advanced-scene-switcher-*-windows-x64.zip archive.
Extract the contents of this archive into your OBS installation directory, so that the contents of the data folder will be merged into OBS' data folder and the contents of the obs-plugins folder will be merged into OBS' obs-plugins folder
 
Not sure what happened, but recently I started getting the a crash randomly after starting to stream, it's related to grabbing the screen shot for the pattern functions. I've tried all the encoders, it even does it on software encoding.
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?
 
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)
 
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?
 
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

Back
Top