Advanced Scene Switcher

Advanced Scene Switcher 1.37.2

maybe I just don't understand the "or" usecase correctly?

The goal is: on Scene XYZ
AND Source ABC is visible
OR Source DEF is visible
OR Source GHI is visible

So it will fire if on that scene, with 1 of those 3 sources showing(also setup so only one source can be visible at a time).

But what I get is, like it only looks at the sources, if ones visible, they all fire regardless what scene I am on, even though each one has a different scene set, I would think since thats the first thing to look for, it should ignore the whole macro if im not on that scene...
Just wanted to mention, instead of "if current scene is" i changed it to "if current scene matches", removed the wild cards in the matches, just put in the exact name, and they stopped firing together... If anyone finds themselves in the same situation.
 
I want to use the scene switcher to loop between a set of scenes repeatedly until I stop it. Here's what I came up with, but it just stays on Visuals 2 until I hit run macro again.View attachment 107291
I know there's probably a different way to do it that will make it work, but I've been playing around with the addon for an hour and cant figure out a way to restart the macro.
Look into the "Sequence" action. You can add one or more macros to execute based on a certain condition. Every time the action is created, it will execute the next macro in your sequence. HTH
1725187336545.png
 
Look into the "Sequence" action. You can add one or more macros to execute based on a certain condition. Every time the action is created, it will execute the next macro in your sequence. HTH
View attachment 107341
That works too, and might be desirable in some cases. Only one place to change the timing, and everything takes the same time.

But it doesn't do anything directly. It only runs other macros. You need to set up a separate macro to do each thing that you want to do in sequence, and then put those *macros* into the Sequence action. So Bob's example would need 3 macros to do it this way:
  • Scene A
    • Condition: none
    • Action:
      • Switch to Scene A
  • Scene B
    • Condition: none
    • Action:
      • Switch to Scene B
  • Sequence
    • Condition
      • Scene not changed for X time
    • Action
      • Sequence:
        • Scene A
        • Scene B
The first two macros don't run at all on their own, without a condition, but only when they're run by some other macro or manually.
The Sequence macro resets itself, just by nature of what it's doing and what it's looking for, and any other scene switch also resets it. Also, if you've been sitting on ANY scene for X time, it'll run the sequence. Maybe you want that, maybe you don't.

There are lots of ways to do anything, all of which have different quirks and side-effects. Know those too, and design them as much as (or sometimes more than) the direct behavior.
 
That works too, and might be desirable in some cases. Only one place to change the timing, and everything takes the same time.

But it doesn't do anything directly. It only runs other macros. You need to set up a separate macro to do each thing that you want to do in sequence, and then put those *macros* into the Sequence action. So Bob's example would need 3 macros to do it this way:
  • Scene A
    • Condition: none
    • Action:
      • Switch to Scene A
  • Scene B
    • Condition: none
    • Action:
      • Switch to Scene B
  • Sequence
    • Condition
      • Scene not changed for X time
    • Action
      • Sequence:
        • Scene A
        • Scene B
The first two macros don't run at all on their own, without a condition, but only when they're run by some other macro or manually.
The Sequence macro resets itself, just by nature of what it's doing and what it's looking for, and any other scene switch also resets it. Also, if you've been sitting on ANY scene for X time, it'll run the sequence. Maybe you want that, maybe you don't.

There are lots of ways to do anything, all of which have different quirks and side-effects. Know those too, and design them as much as (or sometimes more than) the direct behavior.
Thanks for providing more detail if using sequences. Definitely agree that there are many ways to do things. I actually have a similar scenario as the OP and implemented that two macros and defining conditions for each. I only came upon the "Sequence" action much later in my use of scene switcher and thought...I wish I knew about this feature :) .. all good...we are just trying to help out each other using the powerful plugin...
 
Hey! I'm trying to set up a very simple macro where a media source is hidden after it finishes playing, and then it unhides another source on the same scene.

The macro works perfectly if I run it manually, but I can't get it to run automatically. I'm sure I'm doing something fundamental wrong, but it feels like Advanced Scene Switcher isn't registering when media playback ends.

Has anyone else had a similar issue?

1725375349644.png
 
Hey! I'm trying to set up a very simple macro where a media source is hidden after it finishes playing, and then it unhides another source on the same scene.

The macro works perfectly if I run it manually, but I can't get it to run automatically. I'm sure I'm doing something fundamental wrong, but it feels like Advanced Scene Switcher isn't registering when media playback ends.

Has anyone else had a similar issue?

View attachment 107398
I think what you have set up should work assuming the state is really "Ended".
One reason it might not work is that the macro already "fired" and the state "Replay 1" never changed since.
Having "Perform actions only on condition change" will result in this situation.

Can you maybe share a verbose log of the issue?
This should hopefully clear things up.

Alternatively, if you are willing to try a development build, a version of the plugin which adds the option to "wait for playback to end" to the "Media" action type is available here:
1725392460682.png

Note that you will have to be logged into GitHub to be able to download it.
If that should be an issue let me know.

Please also make sure to back up your settings beforehand just in case anything goes wrong.
 
Last edited:
Hey! I'm trying to set up a very simple macro where a media source is hidden after it finishes playing, and then it unhides another source on the same scene.

The macro works perfectly if I run it manually, but I can't get it to run automatically. I'm sure I'm doing something fundamental wrong, but it feels like Advanced Scene Switcher isn't registering when media playback ends.

Has anyone else had a similar issue?

View attachment 107398
Another possible workaround is to look for Playing and Time remaining shorter than X. Then if you don't actually want to fire early, start with Wait X.

I use that condition, firing that much early, to start a transition that lasts that long. Makes it look much better that way.
 
Hello,

Is there a way to install "ADVANCED SCENE SWITCHER" into OBS STUDIO FLATPAK? I was trying the tutorial on how to manually install plugins into OBS Flatpak, but it's not working, so I think I missed something. I switched to flatpak to solve the issue with DROIDCAM crashing OBS studio when trying to use phone audio, now I need to get some plugins installed.
 
Hello,

Is there a way to install "ADVANCED SCENE SWITCHER" into OBS STUDIO FLATPAK? I was trying the tutorial on how to manually install plugins into OBS Flatpak, but it's not working, so I think I missed something. I switched to flatpak to solve the issue with DROIDCAM crashing OBS studio when trying to use phone audio, now I need to get some plugins installed.
There *is*, but I think you're much better off to fix the crash and keep it native. Don't use containers for OBS!

If you can't get DCam to be stable, native, then look at another way to get video from the phone. I use IP Webcam, which is free and requires nothing on OBS's end. Just point a browser source to the address that IPWC shows on the phone screen.

IP Webcam has ads, but they're only on the unattended phone screen and not on the stream. Works for me!
 
Hi, I am new to the forum so please over look my naïvety on this question.

The Setup:
I have used the plugin to setup many macros to show videos at random from a playlist every 30 minutes using the date function. At the end of the video the scene switches to a be right back scene(brb) for 30 seconds then switches a commercial scene. At the end of the commercial it then switches back to the BRB if the next 30 min macro has not fired off. I have also put in the macros if the commercial is still running to go ahead and switch to the video. The videos are random in length some as short as 22 min and some as long as 80 min. I have it set so if the video runs over 30 min the scene stays on that video till the end, skipping the normal scheduled video, and then picks up at the next schedule 30 min time after doing the BRB / commercial scene swaps.

The problem:
Since the videos have random lengths, sometimes the commercials get cutoff to switch to the videos. I have commercial videos between 7 minutes and 3.5 minutes long to randomly play.

Looking for:
Is there a way to setup "if x amount of time before the hour do this" ? I would combine this with the "and if the media source state matches ended". For example, I would setup the condition as: if 38 minutes before the next hour switch to scene to show a 7 minute commercial. This would also allow or if 8 minutes before the hour switch to scene to show a 7 minute commercial. Etc. Essentially looking for a more generic hour time reference instead of an exact hour.

I thought about trying to use the duration time modifier but not sure how. Since the video lengths are random putting in if media length for at least or exactly 22 minutes does not seem like it would help with the videos longer than an 45 min or and hour.

My brain is fried from this logical puzzle and open to suggestions.
 
Hi, I am new to the forum so please over look my naïvety on this question.

The Setup:
I have used the plugin to setup many macros to show videos at random from a playlist every 30 minutes using the date function. At the end of the video the scene switches to a be right back scene(brb) for 30 seconds then switches a commercial scene. At the end of the commercial it then switches back to the BRB if the next 30 min macro has not fired off. I have also put in the macros if the commercial is still running to go ahead and switch to the video. The videos are random in length some as short as 22 min and some as long as 80 min. I have it set so if the video runs over 30 min the scene stays on that video till the end, skipping the normal scheduled video, and then picks up at the next schedule 30 min time after doing the BRB / commercial scene swaps.

The problem:
Since the videos have random lengths, sometimes the commercials get cutoff to switch to the videos. I have commercial videos between 7 minutes and 3.5 minutes long to randomly play.

Looking for:
Is there a way to setup "if x amount of time before the hour do this" ? I would combine this with the "and if the media source state matches ended". For example, I would setup the condition as: if 38 minutes before the next hour switch to scene to show a 7 minute commercial. This would also allow or if 8 minutes before the hour switch to scene to show a 7 minute commercial. Etc. Essentially looking for a more generic hour time reference instead of an exact hour.

I thought about trying to use the duration time modifier but not sure how. Since the video lengths are random putting in if media length for at least or exactly 22 minutes does not seem like it would help with the videos longer than an 45 min or and hour.

My brain is fried from this logical puzzle and open to suggestions.
You might have to lay this out graphically. I'm having a hard time following it too. Gantt Charts and Sequence Diagrams (search terms) both have tools already to help you create them, probably for free, and if you do it right, they'll preserve whatever dependencies you set between events as you change things around. (BRB1, then commercial, then BRB2, for example, as you play with the length of the commercial relative to the other periodic things)

Once you have a clear and (mostly) obvious visual, it should be relatively easy to convert that into a set of logic.
 
It's been some time since I have done a flow chart but this is what I think is the logic flow. The top picture is how it is working now.
Flow Now.png
Commercial Decision.png
 
Last edited:
The setup as it is now, it takes 3 macros per half hour block and two macros to handle the brb and commerical scene.
It was hard to get screen shots of all the conditions on the 3 macros so I had to split them between shots of the top and then the bottom.
OBS Scene Switcher 1.png
OBS Scene Switcher 1 b.png
OBS Scene Switcher 2.png
OBS Scene Switcher 2b.png
OBS Scene Switcher 3.png
OBS Scene Switcher 4C.png
OBS Scene Switcher 4C 2.png
 
It's been some time since I have done a flow chart but this is what I think is the logic flow. The top picture is how it is working now.
View attachment 107442View attachment 107443
The setup as it is now, it takes 3 macros per half hour block and two macros to handle the brb and commerical scene.
It was hard to get screen shots of all the conditions on the 3 macros so I had to split them between shots of the top and then the bottom.
View attachment 107445View attachment 107446View attachment 107447View attachment 107448View attachment 107449View attachment 107450View attachment 107451
A gantt chart looks very much like a piano roll, and more of what I had in mind. At what time (not condition yet) do you want each thing to happen?

You can tie things to a wall clock, or to another event, or to a timer that is itself tied to a wall clock or other event. A video that takes <so long> to play, is effectively a timer too, as far as the logic goes, except the time seems to be variable in your case, depending on which video plays. So you might need several of these charts, the difference being on which side of some threshold(s) the video lengths happen to be.
 
Hi, I am new to the forum so please over look my naïvety on this question.

The Setup:
I have used the plugin to setup many macros to show videos at random from a playlist every 30 minutes using the date function. At the end of the video the scene switches to a be right back scene(brb) for 30 seconds then switches a commercial scene. At the end of the commercial it then switches back to the BRB if the next 30 min macro has not fired off. I have also put in the macros if the commercial is still running to go ahead and switch to the video. The videos are random in length some as short as 22 min and some as long as 80 min. I have it set so if the video runs over 30 min the scene stays on that video till the end, skipping the normal scheduled video, and then picks up at the next schedule 30 min time after doing the BRB / commercial scene swaps.

The problem:
Since the videos have random lengths, sometimes the commercials get cutoff to switch to the videos. I have commercial videos between 7 minutes and 3.5 minutes long to randomly play.

Looking for:
Is there a way to setup "if x amount of time before the hour do this" ? I would combine this with the "and if the media source state matches ended". For example, I would setup the condition as: if 38 minutes before the next hour switch to scene to show a 7 minute commercial. This would also allow or if 8 minutes before the hour switch to scene to show a 7 minute commercial. Etc. Essentially looking for a more generic hour time reference instead of an exact hour.

I thought about trying to use the duration time modifier but not sure how. Since the video lengths are random putting in if media length for at least or exactly 22 minutes does not seem like it would help with the videos longer than an 45 min or and hour.

My brain is fried from this logical puzzle and open to suggestions.
Are you able to set each media to show a "blank screen" at the end of video?

1725498601541.png


Then use a video condition to catch the end of the video. Here is an example of check for a "black" screen.
1725498678362.png
 
A gantt chart looks very much like a piano roll, and more of what I had in mind. At what time (not condition yet) do you want each thing to happen?

You can tie things to a wall clock, or to another event, or to a timer that is itself tied to a wall clock or other event. A video that takes <so long> to play, is effectively a timer too, as far as the logic goes, except the time seems to be variable in your case, depending on which video plays. So you might need several of these charts, the difference being on which side of some threshold(s) the video lengths happen to be.
Thanks AaronD! Sometimes I just need to bounce ideas off someone to unstick my thoughts. I came up with a solution to my problem and now testing it.
Created three new macros for Passing to Commercials for 15min, 8min, and 5min. I am now using the Date function but disabling the date and inputting the start times of 00:22:00 with a repeat every 30 minutes. I also split the Pass back to BRB in to a long version and short version for house keeping.
 
Hello,

Is there a way to install "ADVANCED SCENE SWITCHER" into OBS STUDIO FLATPAK? I was trying the tutorial on how to manually install plugins into OBS Flatpak, but it's not working, so I think I missed something. I switched to flatpak to solve the issue with DROIDCAM crashing OBS studio when trying to use phone audio, now I need to get some plugins installed.
You can use this command to install the flatpak version of the plug-in:
flatpak install com.obsproject.Studio.Plugin.SceneSwitcher

But note that some functionality will not work due to the restrictions imposed by the flatpak sandbox.
 
Hi, I’m new in this site so thank you in advance for your support.
I’ve been using this plugin for a while in a multi station environment (5PCs each of them with OBS and this plugin). The goal is to automate the scene switch based on what controller the user/player is using.
Each scene matches the controller in used, showing the controller layout and the buttons pressed.
The logic behind is something like this:
If PS5 controller is connected, change scene to PS5 controller.
If XBOX controller is connected, change scene to Xbox controller.
If both controllers are connected, change scene to Dual Controllers (2players)
If no controllers are connected, check for keyboard activity to recognise a gaming pattern (thinking about pressing and/or holding W,S,A,D keys as it’s the standard keys for gaming). If activity matched or recognised, change scene to keyboard&mouse.
if no keyboard activity recognised, set scene to default (an empty scene were only captures the screen).

I’ve used the USB action and the XBOX is not recognised whatsoever, in fact, I presume is only recognising media devices like video and audio, for example, webcam, capture card, mics, and the PS5 controller as is recognised as a media device due the mic within the controller.

So, due this limitation I’ve created a ps script to recognise the logic previously mentioned and it works like a charm, the problem is that I need to keep running the script on a loop or as a scheduled task for this to work.

I was wondering if there is other way to achieve this directly with OBS and/or Advanced Scene Switcher without the need of external scripts.

Thank you in advance.
 
Back
Top