Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

Warmuptill

Active Member
Good day. I'm asking this question again because we've got a large OBS deployment and have a specific but simple use case. We use the plugin to simply start and stop streaming on a schedule. Most of the schedules are fairly simple and short. However, we are now seeing more complicated schedules. There new ability to export and import macros will be helpful, but I'm looking for an easy way to build complicated schedule to import. Again, the schedule itself is just composed of DAY OF WEEK, START TIME, STOP TIME. So either having a separate function just for this simple task or having a macro writer for this purpose would be helpful. I currently have a schedule with 30+ Start and Stop times. Thanks.
Thanks for the suggestion! :)
Can you describe how you would imagine such a separate function to look like?
I am having a bit of trouble imagining how this new condition / action would look like.

is there a way to make advss run an elevated program? (admin mode)
Unfortunately I don't think that this is possible at the moment using advanced scene switcher. (unless of course OBS is running in admin mode)

What are your thoughts on the Filter box, having a disable all filters on source setting? Im working with a bunch of filters, and have to keep doing like 8-9 boxes for on, 8-9 for off, etc. Just becomes a hassle... but like I said in discord, I could be doing the whole thing wrong/hard way. I dont see a scenario where enable all would work, but who knows.

They tried suggesting the beta, for else, but wasnt quite working right for me (and my beginner level of knowledge)
Thanks for the suggestion! :)
I will look into it!

Not sure if its possible, anyway to cycle through multiple actions? Like, say the top box is setup with a hot key... If I have 4 different filters, could I cycle through each one, each time I hit the hotkey?
Although you already mentioned that you found a workaround just to mention it:
You can use the "Sequence" action type for those scenarios.

1696181171874.png


Let's say you have Macros A, B, and C.
Each time you press the hotkey, one of the three Macros is executed in the order you have specified them.

Hope that helps! :)


Sorry for getting back to those posts so late.
I only had very limited internet access the last few weeks.
 
Thanks for the suggestion! :)
Can you describe how you would imagine such a separate function to look like?
I am having a bit of trouble imagining how this new condition / action would look like.


Unfortunately I don't think that this is possible at the moment using advanced scene switcher. (unless of course OBS is running in admin mode)


Thanks for the suggestion! :)
I will look into it!


Although you already mentioned that you found a workaround just to mention it:
You can use the "Sequence" action type for those scenarios.

View attachment 98180

Let's say you have Macros A, B, and C.
Each time you press the hotkey, one of the three Macros is executed in the order you have specified them.

Hope that helps! :)


Sorry for getting back to those posts so late.
I only had very limited internet access the last few weeks.
I would make it very simple Day, Start Time, Stop Time. With the ability to add as many rows as needed and the ability to import a schedule from a file with those same headers.
 

BioFUSION

Member
Unfortunately I don't think that this is possible at the moment using advanced scene switcher. (unless of course OBS is running in admin mode)
See, now that is an acceptable answer, he didnt call me names, disparage why I needed to do it, just a simple answer.

NOW, for others out there, maybe you want to run an elevated program, I have found the answer, but I dont want to clutter up warmuptill's thread with this any longer. DM and i'll share.
 

AaronD

Active Member
didnt call me names
I didn't do that. You did. Reported that one post alone, as abuse.

maybe you want to run an elevated program
The vast majority of the time, elevated privileges mean you're doing something else wrong. Maybe Windows forces you to do that (Windoze specifically, has lots of problems), but nevertheless, elevated privileges, whether that's admin or root or whatever your system calls it, is a massive red flag for getting hacked later. If you can avoid it AT ALL, even if it makes a Rube-Goldberg machine, do.
 

Warmuptill

Active Member
What are your thoughts on the Filter box, having a disable all filters on source setting? Im working with a bunch of filters, and have to keep doing like 8-9 boxes for on, 8-9 for off, etc. Just becomes a hassle... but like I said in discord, I could be doing the whole thing wrong/hard way. I dont see a scenario where enable all would work, but who knows.

They tried suggesting the beta, for else, but wasnt quite working right for me (and my beginner level of knowledge)
A build with the option to select "all filters" is available here:
1696329100186.png

Note that you have to be logged into GitHub to be able to download it.
Let me know if you run into any issues! :)
 

BillRayDrums

New Member

Bombastiko

New Member
Hello! Is there a way to control media request like volume with a macro? I was trying it with audio, but it does not appear there.
Has anyone an idea, how I can control media request with a macro?
 

AaronD

Active Member
Hello! Is there a way to control media request like volume with a macro? I was trying it with audio, but it does not appear there.
Has anyone an idea, how I can control media request with a macro?
There are these two actions:
1696969320095.png

Does either of those work for you?
 

Wikibobapedia

New Member
I'm trying to set up variables for a podcast. The help file (https://github.com/WarmUpTill/SceneSwitcher/wiki/Variables#creating-a-new-variable) is not making any sense to me. When creating a variable, what do I enter as "current value"? After creating the variable, why do I not see "set" (first grey box) anywhere in the dropdown? How is the variable set up so that OBS knows to switch scenes? I don't see anywhere in the instructions where this is done other than entering text into the box. How is this different than just doing "switch scene"? Is there a step by step for this? The help file does not explain it clearly enough for me to understand.
 

VastleCania

New Member
I'm trying to get a number from Firebot into OBS and use it as part of an Advanced Scene Switcher macro. Specifically, it's to set the color of a Color Source, but the purpose is not too important. I'm doing it this way because Firebot's "Set Color Source Color" action is broken and does not accept variables.

I've gotten the Websocket request from Firebot to trigger a macro, so that part is good! Is there any way to get a value from the Websocket request into an action?

Alternatively, is there a way to read a Text file as part of a macro? I can write to a text file in Firebot but I don't know how to read it as part of a Macro.

Or really any way to get a specific variable from Firebot and into Advanced Scene Switcher that isn't either of the above?

I've run into a wall here and I'm looking for any standard or outside-of-the-box solutions.
 

Warmuptill

Active Member
When creating a variable, what do I enter as "current value"?
The name of the scene you want to switch to in a given macro.

After creating the variable, why do I not see "set" (first grey box) anywhere in the dropdown?
As mentioned in the other thread.
The entry you are looking for is named "Set to fixed value".
1697130490640.png


How is the variable set up so that OBS knows to switch scenes?
The variable will be used in the "Switch scene" macro in the action which switches the scene.
1697130594453.png


How is this different than just doing "switch scene"?
As mentioned in the other thread, if you have multiple macros switching the scene in the same interval, when multiple microphones are above their respective configured volume threshold, you will have the undesired effect of first switching to scene1, then immediately switching to scene 2, ... and finally switching to the "Table" scene (as it was call in your scene collection).

Instead in this scenario you only want to switch scenes once to the "Table" scene.
This is achieved by using the variable.

Is there a step by step for this? The help file does not explain it clearly enough for me to understand.
I don't think so, unfortunately.
The offer still stands of you contacting me directly so we set up a quick call in which you share your sceen so we can set up the macros together. :)

I've gotten the Websocket request from Firebot to trigger a macro, so that part is good! Is there any way to get a value from the Websocket request into an action?
Yes there is. :)
You can achieve this using the "Variable" action, to assign the message, which was received using the Websocket condition, to a variable:

1697131219148.png


You can use the variable value in the action like this:
1697131395222.png


Hope that helps! :)
 

Bairespm

Member
Hi @Warmuptill , in order to evaluate whether or not a dsk is displayed, I need to be able to choose in the conditions. I attach an image so that you can understand me. Please could you add it, example : if OBS Hotkey Source [Escena 2] Show on DSK1 else OBS Hotkey Source [Escena 3] hide on DSK2
thanks for you time

1697141817018.png
 
Last edited:

matt4starwars

New Member
Pretty new to OBS, but my searches haven't yielded all of the results that I'm looking to accomplish. I've been back through the forum a bit, but so far, I haven't found everything that I need. So, bear with me, but I'm trying to sort through a couple of issues that I think ASS can help me solve.

My basic setup is that I have 3 scenes (maybe in the same collection - definitely in the same profile - for now). I'd like to live stream all three to YouTube, simultaneously, on a schedule (say, every night from 7-9p). Where are the gotchas that I need to avoid in order to make this happen? I'll also preface this all that I'm sitting at work and my OBS instance is at the (non-work-related) facility, so I don't have it in front of me and I'm doing some of this from memory. So, in my newbie-ness, I may have some of the details/terminology wrong.
  • I tried setting up a schedule last night, and when I did it while I was standing there, it worked. I started it, it ran for 3 minutes, and then stopped. So, I set it up to run from 7-9 and walked away. When I returned after 9p, there was a message about needing to create a broadcast. Unfortunately, I didn't get a screenshot of the exact message, but in the end, nothing had happened. What am I missing with the broadcast setup that will allow it to work with ASS in an unattended manner that doesn't require the broadcast to be created each and every time?
  • Is it possible, through the macro somewhere, to change the name of the video that is created on YouTube? Ideally, I'd like to include the scene name and date in the title, but I don't see a macro action for altering the broadcast at all, which I'd expect I'd need to do. Is that possible?
  • I found a post a few weeks ago about using the multi, profile and collection launch parameters, and I should be able to use scene as well now that I found the full list (for the reference of others - https://obsproject.com/kb/launch-parameters). Anything else that I should be considering to get multiple instances doing something at the same time? Luckily, they're all on the same schedule, so I can use the same macros for each instance.
    • If I wanted a different schedule (say, on Monday, skip "scene 3"), could I use the "Scene" condition to stop that one from running?
Anything else that I should be considering? Other issues that you've run into in similar situations? I'm trying to make this as set-it-and-forget-it as possible, so any advice going forward would be appreciated.

Thanks!
 

AaronD

Active Member
Pretty new to OBS, but my searches haven't yielded all of the results that I'm looking to accomplish. I've been back through the forum a bit, but so far, I haven't found everything that I need. So, bear with me, but I'm trying to sort through a couple of issues that I think ASS can help me solve.

My basic setup is that I have 3 scenes (maybe in the same collection - definitely in the same profile - for now). I'd like to live stream all three to YouTube, simultaneously, on a schedule (say, every night from 7-9p). Where are the gotchas that I need to avoid in order to make this happen? I'll also preface this all that I'm sitting at work and my OBS instance is at the (non-work-related) facility, so I don't have it in front of me and I'm doing some of this from memory. So, in my newbie-ness, I may have some of the details/terminology wrong.
  • I tried setting up a schedule last night, and when I did it while I was standing there, it worked. I started it, it ran for 3 minutes, and then stopped. So, I set it up to run from 7-9 and walked away. When I returned after 9p, there was a message about needing to create a broadcast. Unfortunately, I didn't get a screenshot of the exact message, but in the end, nothing had happened. What am I missing with the broadcast setup that will allow it to work with ASS in an unattended manner that doesn't require the broadcast to be created each and every time?
  • Is it possible, through the macro somewhere, to change the name of the video that is created on YouTube? Ideally, I'd like to include the scene name and date in the title, but I don't see a macro action for altering the broadcast at all, which I'd expect I'd need to do. Is that possible?
  • I found a post a few weeks ago about using the multi, profile and collection launch parameters, and I should be able to use scene as well now that I found the full list (for the reference of others - https://obsproject.com/kb/launch-parameters). Anything else that I should be considering to get multiple instances doing something at the same time? Luckily, they're all on the same schedule, so I can use the same macros for each instance.
    • If I wanted a different schedule (say, on Monday, skip "scene 3"), could I use the "Scene" condition to stop that one from running?
Anything else that I should be considering? Other issues that you've run into in similar situations? I'm trying to make this as set-it-and-forget-it as possible, so any advice going forward would be appreciated.

Thanks!
If they're simultaneous with different content, then they probably need to be in different instances of OBS. And to keep those instances from running over each other, they need different settings. So that's probably a different profile even, not just a different scene collection.

Adv. SS settings are entirely in the scene collection, so if you want the same thing across all of them, you'll have to either duplicate your work, or set up the first collection and then duplicate that. Or you could export/import Adv. SS settings, since there's a button for that too.

Then there's the problem of using the same source in multiple instances. If you never do that, you're fine. If you do, then you may or may not might run into a problem. Historically, for performance reasons, pretty much every operating system restricted media access to one app at a time. The first app to request something, got it, and everything else would either be denied, or get something that is easy for the OS to create, like solid black, silence, etc. Some systems have removed that restriction now, others have not.

If yours hasn't, then you might use one of several plugins that are designed to send things between instances of OBS. You start the master first, which grabs all the sources, and then the master sends them to the slave(s). But only do that if you actually have to.

For the timing, you could have each instance independent with its own macro that looks for the same time. Or you could have a master/slave arrangement, where the master has the timing macro that not only starts itself but also sends a WebSocket message to the slave(s).

For the stream itself, and the error message, that's probably because of the way you set up the stream. I use a persistent stream key on YouTube. OBS is not logged into my account; it only has that key. Start throwing data at it, and it starts the stream. Stop throwing data at it, and it eventually times out. Start again, and it starts a new stream. Other methods might be "one and done", so that your short test worked, but then the long test didn't have anywhere to go because you already did the one and then it was done.

Play around and see if you can have OBS logged in, and still have the behavior that I have. If OBS is logged in, then Adv. SS can change some attributes of the stream itself...as long as YT decides to keep that API. They used to have a better one, then they killed it to get rid of spambots, and now it's back in a different, more limited form. The future is not guaranteed.
 

Warmuptill

Active Member
Hi @Warmuptill , in order to evaluate whether or not a dsk is displayed, I need to be able to choose in the conditions. I attach an image so that you can understand me. Please could you add it, example : if OBS Hotkey Source [Escena 2] Show on DSK1 else OBS Hotkey Source [Escena 3] hide on DSK2
thanks for you time

View attachment 98487
Just to make sure I understand correctly what you are trying to achieve:
  • Do you want to have a condition "if hotkey with existing keybind is pressed"?
  • Or do you want to have a condition "if downstream keyer is visible"?
  • Do you want "else" support (so a second action area to be used in case the conditions are *not* true)?
In case of the first point I don't think attaching to existing keybinds is possible, but you can always create a condition of type "Hotkey" and assign it the same keybind as the DSK hotkey.
1697212542861.png


The second point would have to be checked with the DSK plugin.
I am not sure if a API is offered for this plugin.

For the third point you can use the most recent beta release, which adds this functionality:
f3b571b2-2bcc-4509-9ee8-0d38c50d946f
 

Bairespm

Member
Just to make sure I understand correctly what you are trying to achieve:
  • Do you want to have a condition "if hotkey with existing keybind is pressed"?
  • Or do you want to have a condition "if downstream keyer is visible"?
  • Do you want "else" support (so a second action area to be used in case the conditions are *not* true)?
In case of the first point I don't think attaching to existing keybinds is possible, but you can always create a condition of type "Hotkey" and assign it the same keybind as the DSK hotkey.
View attachment 98511

The second point would have to be checked with the DSK plugin.
I am not sure if a API is offered for this plugin.

For the third point you can use the most recent beta release, which adds this functionality:
f3b571b2-2bcc-4509-9ee8-0d38c50d946f
@Warmuptill

Thanks for showing me the possibilities but it's not what I'm looking for.

I explain with an example

believe in a macro that says that if it is in scene 1 or scene 2, show dsk1.

but it turns out that I want to do a giveaway so I have to activate dsk2

If I do it, dsk2 remains above dsk1

then I need to be able to create a macro that if DSK2 is shown then DSK1 will be hidden

In other words I want to have the possibility that if one dsk is shown, another can be hidden.

The only way I see to achieve this is as an IF condition.

but currently it is only shown to create a hotkey, there is no possibility to choose. IF OBS SOURCE activate DSK2

so
disable DSK1

I attach an image so you can understand me better

1697218338086.jpeg
 
Last edited:

AaronD

Active Member
@Warmuptill

Thanks for showing me the possibilities but it's not what I'm looking for.

I explain with an example

believe in a macro that says that if it is in scene 1 or scene 2, show dsk1.

but it turns out that I want to do a giveaway so I have to activate dsk2

If I do it, dsk2 remains above dsk1

then I need to be able to create a macro that if DSK2 is shown then DSK1 will be hidden

In other words I want to have the possibility that if one dsk is shown, another can be hidden.

The only way I see to achieve this is as an IF condition.

but currently it is only shown to create a hotkey, there is no possibility to choose. IF OBS SOURCE activate DSK2

so
disable DSK1

I attach an image so you can understand me better

View attachment 98515
Instead of controlling the DSK directly and then trying to respond to what the DSK is doing, can you create something that does both actions? For example:
  • Giveaway
    • Conditions:
      • Hotkey?
    • Actions:
      • Hide DSK1
      • Show DSK2
And similar for your other DSK management. Then you don't control them directly, but use Adv. SS actions instead, for all of it.

This is yet another special case of controlling the thing that you want to respond to, instead of trying to respond to it. It's amazing how often that concept comes up.
 

Bairespm

Member
Instead of controlling the DSK directly and then trying to respond to what the DSK is doing, can you create something that does both actions? For example:
  • Giveaway
    • Conditions:
      • Hotkey?
    • Actions:
      • Hide DSK1
      • Show DSK2
And similar for your other DSK management. Then you don't control them directly, but use Adv. SS actions instead, for all of it.

This is yet another special case of controlling the thing that you want to respond to, instead of trying to respond to it. It's amazing how often that concept comes up.
mmmm I understand, but I don't want to use a hotkey, but I want adss to evaluate whether one dsk is activated automatically and the other is hidden. without the need to activate a hotkey
 

AaronD

Active Member
mmmm I understand, but I don't want to use a hotkey, but I want adss to evaluate whether one dsk is activated automatically and the other is hidden. without the need to activate a hotkey
Of course, the condition could be anything. Doesn't have to be a hotkey. My point was to not detect the DSK at all, but control it entirely. That's also a way for the macro to know that it changed...because the macro just changed it!

More generally, if you want to respond to X, where X is hard to detect but easy to control, don't. Instead, *control* X from there, and then just do the response unconditionally, because you just created the event that you were going to respond to.
 

matt4starwars

New Member
If they're simultaneous with different content, then they probably need to be in different instances of OBS. And to keep those instances from running over each other, they need different settings. So that's probably a different profile even, not just a different scene collection.

Adv. SS settings are entirely in the scene collection, so if you want the same thing across all of them, you'll have to either duplicate your work, or set up the first collection and then duplicate that. Or you could export/import Adv. SS settings, since there's a button for that too.

Then there's the problem of using the same source in multiple instances. If you never do that, you're fine. If you do, then you may or may not might run into a problem. Historically, for performance reasons, pretty much every operating system restricted media access to one app at a time. The first app to request something, got it, and everything else would either be denied, or get something that is easy for the OS to create, like solid black, silence, etc. Some systems have removed that restriction now, others have not.

If yours hasn't, then you might use one of several plugins that are designed to send things between instances of OBS. You start the master first, which grabs all the sources, and then the master sends them to the slave(s). But only do that if you actually have to.

For the timing, you could have each instance independent with its own macro that looks for the same time. Or you could have a master/slave arrangement, where the master has the timing macro that not only starts itself but also sends a WebSocket message to the slave(s).

For the stream itself, and the error message, that's probably because of the way you set up the stream. I use a persistent stream key on YouTube. OBS is not logged into my account; it only has that key. Start throwing data at it, and it starts the stream. Stop throwing data at it, and it eventually times out. Start again, and it starts a new stream. Other methods might be "one and done", so that your short test worked, but then the long test didn't have anywhere to go because you already did the one and then it was done.

Play around and see if you can have OBS logged in, and still have the behavior that I have. If OBS is logged in, then Adv. SS can change some attributes of the stream itself...as long as YT decides to keep that API. They used to have a better one, then they killed it to get rid of spambots, and now it's back in a different, more limited form. The future is not guaranteed.
So, a few things that I've done since my original post.
  • One, I am not reusing sources. These are three distinct locations and three different sets of feeds. So, that's not an issue for me.
  • I went into YouTube and made three distinct stream keys - one per location.
  • Inside OBS, I disconnected my YouTube account inside Settings.
  • I went into OBS and created 3 separate profiles - one per location. In each profile, I visited settings and applied a different stream key from the set that I now have inside YouTube.
I started three separate instances of OBS, each using a different profile, the "default" scene collection and the appropriate scene for each location. Using ASS, I have a timed macro set up to start a stream, wait 1m and end the stream. All three instances of OBS light up as if they're streaming, but I only get a single resulting stream and subsequent "DVRd" video when it's done.

That's where I stand at the moment. Is there anything else that I can do to get this running as I'd like? I found some references (and had a little luck) with scheduled streams. However, since this is a daily occurrence, I don't want to have to be responsible for going in every day and creating a new schedule to get them all running. I'd like this to just run. Something else that I'm missing? A setting, or a way to have YouTube waiting on three streams perpetually? Depending on how that works, I'd still like to have each stream have a different at least based on location/stream key. Date would be great, but knowing "A", "B" or "C" would be enough as well. That seems to be a YouTube setting at this point, but knowing where to set that differently as well would be beneficial.

Am I better off moving this to a different forum? Will the crowd checking on ASS be the best to help me out, or should I copy/paste this information to another page/board/forum in order to get maximum eyes and brains on the issue?

Thanks again!
 
Top