Advanced Scene Switcher

Advanced Scene Switcher 1.27.2

TattiD2

New Member
Hello!
I'm multistreaming on twitch, kick and youtube games, like diablo 2, counter-strike and deadlock. I have set up scene for every game, and when changing scene, the sources automatically go together with scene and don't have problem with that.
My problem is that especially since I'm multistreaming, changing game category and stream title is a lot of work. I would like a macro that would change the game title and category automatically when I'm changing scene. Is this possible to do with the advanced scene switcher, and is there an easy tutorial how to set it up?

Example:
Change scene to Diablo 2; automatically change game category to Diablo 2 and title 'D2 Hardcore sorceress'
Change scene to Counter-strike; automatically change game category to Counter-strike and title 'FACEIT 10 FIN/ENG'
Change scene to Deadlock; automatically change game category to Deadlock and title 'First timer trying out Deadlock'

I can set up the scenes and sources easily with obs and that is not the problem. I have to manually update the game category and title each time for twitch, kick and youtube and it is a lot of work. Looking for solution for this problem. Is it possible to do with advanced scene switcher and is there a tutorial how to do it?
 

Warmuptill

Active Member
Hello!
I'm multistreaming on twitch, kick and youtube games, like diablo 2, counter-strike and deadlock. I have set up scene for every game, and when changing scene, the sources automatically go together with scene and don't have problem with that.
My problem is that especially since I'm multistreaming, changing game category and stream title is a lot of work. I would like a macro that would change the game title and category automatically when I'm changing scene. Is this possible to do with the advanced scene switcher, and is there an easy tutorial how to set it up?

Example:
Change scene to Diablo 2; automatically change game category to Diablo 2 and title 'D2 Hardcore sorceress'
Change scene to Counter-strike; automatically change game category to Counter-strike and title 'FACEIT 10 FIN/ENG'
Change scene to Deadlock; automatically change game category to Deadlock and title 'First timer trying out Deadlock'

I can set up the scenes and sources easily with obs and that is not the problem. I have to manually update the game category and title each time for twitch, kick and youtube and it is a lot of work. Looking for solution for this problem. Is it possible to do with advanced scene switcher and is there a tutorial how to do it?
Unfortunately, the plugin only supports the Twitch API.
You can use the "Twitch" action type to change the category and title:
1724869654346.png


Support for the YouTube API is not implemented.

I am not aware of Kick providing any public API at all. (At least last time I checked)
 

AaronD

Active Member
Hello!
I'm multistreaming on twitch, kick and youtube games, like diablo 2, counter-strike and deadlock. I have set up scene for every game, and when changing scene, the sources automatically go together with scene and don't have problem with that.
My problem is that especially since I'm multistreaming, changing game category and stream title is a lot of work. I would like a macro that would change the game title and category automatically when I'm changing scene. Is this possible to do with the advanced scene switcher, and is there an easy tutorial how to set it up?

Example:
Change scene to Diablo 2; automatically change game category to Diablo 2 and title 'D2 Hardcore sorceress'
Change scene to Counter-strike; automatically change game category to Counter-strike and title 'FACEIT 10 FIN/ENG'
Change scene to Deadlock; automatically change game category to Deadlock and title 'First timer trying out Deadlock'

I can set up the scenes and sources easily with obs and that is not the problem. I have to manually update the game category and title each time for twitch, kick and youtube and it is a lot of work. Looking for solution for this problem. Is it possible to do with advanced scene switcher and is there a tutorial how to do it?
As I read your question again, I got to wondering if OBS can do this already, without Adv. SS, in connection with the Scene Collection or Profile.

Instead of having a single scene for each game, have a Scene Collection for each. If I understand correctly, Scene Collections are the complete set of visuals and settings that pertain to content production itself, and Profiles have to do with getting that content *out*. Each one is completely independent of the others, so you can have a completely different rig for each if you want. Adv. SS settings and macros are part of the Scene Collection.

I don't know if OBS stores the category and other details or not, let alone where they are, but it doesn't take much to try.
 

bobbbutttoast

New Member
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.
loop visuals.png

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.
 

AaronD

Active Member
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.
2 macros, no Waits, only one item in each list:
  • A to B
    • Condition:
      • Scene A active for at least X seconds
    • Action:
      • Switch to Scene B
  • B to A
    • Condition:
      • Scene B active for at least Y seconds
    • Action:
      • Switch to Scene A
Make sure you're using the Scene condition. Your screenshot is Source. Not the same thing.

It works by each macro creating the condition that the next in sequence is looking for. You can expand that concept as far as you want, and you can exit the sequence by making none of them true. In your case, just switch to some other scene, and the automation stops. Switch to one of these scenes, and it continues automatically from there.
 
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.
 

RobertWilliams

New Member
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
 

AaronD

Active Member
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.
 

RobertWilliams

New Member
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...
 
I had created many macros, but only some are shown available as hotkey on my OBS setting. How can I make a specific macro available as a hotkey?
 

ImpurestClub

New Member
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
 

Warmuptill

Active Member
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:

AaronD

Active Member
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.
 

Jason McPeak

New Member
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.
 

AaronD

Active Member
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!
 

alp35035

New Member
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.
 

AaronD

Active Member
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.
 

alp35035

New Member
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:

alp35035

New Member
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
 
Top