Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

kdarroch

Member
So is there a way to have a default condition for the Advanced Scene Switcher when OBS starts?

I want certain macros paused and others active. will be different from when OBS was closed.

Like I said a so called default state for each macro when OBS starts

Kirk
 

AaronD

Active Member
So is there a way to have a default condition for the Advanced Scene Switcher when OBS starts?

I want certain macros paused and others active. will be different from when OBS was closed.

Like I said a so called default state for each macro when OBS starts

Kirk
In several rigs now, I have an "Init" macro with the condition of "plugin running", which is always true, and the "only on change" box checked. That makes it run once on startup and never again. Put your (un)pause and whatever other settings you want in there.

For a more complex rig with two copies of OBS, I have a Wait action to allow the other copy to start as well, and establish the connection between them, before init'ing things that also trigger that connection. (both copies are started from the same script, so the timing is predictable enough to make that work)
 

Warmuptill

Active Member
So is there a way to have a default condition for the Advanced Scene Switcher when OBS starts?

I want certain macros paused and others active. will be different from when OBS was closed.

Like I said a so called default state for each macro when OBS starts

Kirk
Maybe this condition type is what you are looking for:

PluginState.png


I am probably stating the obvious, but please note that all of those checks require the plugin to be active.
There is no "do something while the plugin is not yet active" option.

If you want to ensure a macro containing this type of check is the first macro executed on OBS startup / plugin startup move the macro to the very top of the macro list.
 

lextehrex

New Member
Can you share the rest of the log and the settings you are using?
In general I would suggest to avoid using this setting in combination with macros.
It is mostly left in there for backwards comparability reasons.
I'll just disable that setting then. Find the full log for that session attached as well as the adv-ss settings. Other than the macro, no other settings are changed, so should be defaults.
 

Attachments

  • 2023-03-05 15-43-58.txt
    680.4 KB · Views: 19
  • adv-ss-Main-2023.03.07.23.18.05.txt
    18.9 KB · Views: 21

AaronD

Active Member
If you want to ensure a macro containing this type of check is the first macro executed on OBS startup / plugin startup move the macro to the very top of the macro list.
Yeah, that too. :-) I arrange my macros in (rough) order of execution anyway - Init first, then normal operation, then shutdown / cleanup - so I've satisfied that point anyway. Good to mention though.

I'll probably end up with a group called "Subroutines" that never run on their own, above everything (kinda like a C program), but they probably don't count because they *don't* run on their own. So the first one that has a chance to run is still Init, and it does. Once.
 
Out of curiosity, are the other tabs (the ones hidden by when the "Hide tabs which can be represented via macros" checkbox is checked) going to be removed at some point? I've begun the process of moving all my stuff from other tabs to the Macro tab ahead of such an eventuality. It's not yet complete because I'm lazy on the network side and not into the notion of writing JSON for scene changes. That said, I know I should because I already see the benefits of doing so.

Thanks for any insights into the matter!

--Katt. =^.^=
 
I didn't think that was necessary. Is there more functionality available by directly modifying the settings file, than can be done with the GUI?

In the one case I'm describing that needs network support, I need to be able to tell another computer to change scenes when a scene is being set on the one doing most of the automation. The only way I can see in the Macros section is via WebSockets, which does use the JSON interface.

Thankfully, I've managed to figure much of it out by way of writing commands for SAMMI (though it's mainly for changing scenes in studio mode for one panel I use for working sources off-program while streaming). I need to use raw WebSocket calls there because there isn't any "studio-mode" support in SAMMI to speak of, so I have to improvise by sending JSON messages to set studio mode and to select scenes in studio mode (there is a separate command to select scenes in studio mode). But I digress.

Though I will confess, like I said previously, I'm lazy. Furthermore, JSON makes my head hurt a little, but I'll live. All I was wanting to know is when or if I can anticipate some of the support I've used in the past to possibly (if ever) go away.

--Katt. =^.^=
 

AaronD

Active Member
In the one case I'm describing that needs network support, I need to be able to tell another computer to change scenes when a scene is being set on the one doing most of the automation. The only way I can see in the Macros section is via WebSockets, which does use the JSON interface.

Thankfully, I've managed to figure much of it out by way of writing commands for SAMMI (though it's mainly for changing scenes in studio mode for one panel I use for working sources off-program while streaming). I need to use raw WebSocket calls there because there isn't any "studio-mode" support in SAMMI to speak of, so I have to improvise by sending JSON messages to set studio mode and to select scenes in studio mode (there is a separate command to select scenes in studio mode). But I digress.

Though I will confess, like I said previously, I'm lazy. Furthermore, JSON makes my head hurt a little, but I'll live. All I was wanting to know is when or if I can anticipate some of the support I've used in the past to possibly (if ever) go away.

--Katt. =^.^=
Okay. I see the need now. You must be doing far more than I am with my two synchronized copies of OBS. I've been able to boil everything down into 3 categories, with a regex on the scene name to select which category to use this time. So there are only 3 possible things that I could send through the WebSocket.

All of my logic is in OBS; the streaming platform, online meeting, recording, or whatever just take what they get. I googled SAMMI and found what I think is the website, but I don't see anything beyond superficial hype and a call to action. What does it do that OBS and Adv. SS don't?
 
Okay. I see the need now. You must be doing far more than I am with my two synchronized copies of OBS. I've been able to boil everything down into 3 categories, with a regex on the scene name to select which category to use this time. So there are only 3 possible things that I could send through the WebSocket.

All of my logic is in OBS; the streaming platform, online meeting, recording, or whatever just take what they get. I googled SAMMI and found what I think is the website, but I don't see anything beyond superficial hype and a call to action. What does it do that OBS and Adv. SS don't?

First of all, when I tell people about this plugin, I outright say that calling this by its name, "Advanced Scene Switcher", doesn't even do this plugin justice. It's downright INSANE what this plugin can do. I love this plugin so much. However, I haven't tried the regex support mainly because it uses Rust regexes and I'm far more familiar with Unix and Perl flavors of regexes.

As for SAMMI, which was formerly LioranBoard, I mainly use it since I can't afford or justify purchasing an Elgato Stream Deck at present. Some use the automation features it offers; I presently don't. I just use it along with a couple of Android tablets to organize my scenes into a layout I can use to select scenes as well as doing pre- and mid-stream setup. All that said, you may not have a usage case for SAMMI in your case, but that's okay. I'm just saying is that SAMMI forced me to learn some of the JSON messaging to communicate with WebSocket so I could use to not fumble with Studio Mode.

--Katt. =^.^=
 

rusty1

Member
I want to set my variable equal to the height of a media source. I planned to do this by setting the condition value from the 'Scene item transform'. It's listed in the overview as a supported condition type. But I get the error message "Getting variable values from Scene item transform condition is not supported!" I'm running on Intel Mac OBS 29.0.2.
 

Attachments

  • Screen Shot 2023-03-09 at 8.48.40 PM.png
    Screen Shot 2023-03-09 at 8.48.40 PM.png
    192.2 KB · Views: 50
  • Screen Shot 2023-03-09 at 8.56.13 PM.png
    Screen Shot 2023-03-09 at 8.56.13 PM.png
    141.4 KB · Views: 51

mg4k

New Member
Hello, Just wanted to check if I'm doing this right. I wanted a hotkey to trigger a scene change. Using the If > Hotkey command and then setting the hotkey in OBS does bring up the conflict warning (since I have a hotkey set for the action and then this hotkey) but works as intended. Is this fine or is there a better way of doing this?
 

AaronD

Active Member
Hello, Just wanted to check if I'm doing this right. I wanted a hotkey to trigger a scene change. Using the If > Hotkey command and then setting the hotkey in OBS does bring up the conflict warning (since I have a hotkey set for the action and then this hotkey) but works as intended. Is this fine or is there a better way of doing this?
A lot of serious programmers like to eliminate all warnings as well as errors. Warnings are there for a reason too, even though it technically works that way, so we either adjust the code to get rid of them, or temporarily turn specific ones off for a specific section of code where we know what we're doing and why. In your case, an easy way to get rid of the warning is to move the original direct action into the macro.

An advantage of doing it that way is that Adv. SS can appear to respond to the scene switch *before* it happens, because you've put the response actions first in the same macro.
 

Warmuptill

Active Member
Out of curiosity, are the other tabs (the ones hidden by when the "Hide tabs which can be represented via macros" checkbox is checked) going to be removed at some point?
Yes, at some point in the future I would like to remove the old tabs.
But that point in time is not decided nor near yet. :)
And I will of course make it clear once that will be the case.

In the one case I'm describing that needs network support, I need to be able to tell another computer to change scenes when a scene is being set on the one doing most of the automation. The only way I can see in the Macros section is via WebSockets, which does use the JSON interface.
I don't think you need to use json to do this unless you want to interact with the advanced scene switcher from external tools.

Something like this should do the trick:
  • OBS instance receiving the scene switch messages:
    Receive.PNG
  • OBS instance sending out the scene switch messages:
    Send.PNG
Let me know if you have any questions or run into any problems! :)

I want to set my variable equal to the height of a media source. I planned to do this by setting the condition value from the 'Scene item transform'. It's listed in the overview as a supported condition type. But I get the error message "Getting variable values from Scene item transform condition is not supported!" I'm running on Intel Mac OBS 29.0.2.
I apologize - that must have been a misunderstanding / mistake of mine.
The scene item transform condition does not support assigning its value to variables.
(The screenshot shows the available condition types in general not the ones support this specific variable functionality)

Nevertheless it is not much work enabling this so I went ahead and did it.

Transform.PNG


A build with this functionality will be available here in a few minutes:
(You will have to be logged into GitHub to be able to download it)

Let me know if you run into any issues!

Hello, Just wanted to check if I'm doing this right. I wanted a hotkey to trigger a scene change. Using the If > Hotkey command and then setting the hotkey in OBS does bring up the conflict warning (since I have a hotkey set for the action and then this hotkey) but works as intended. Is this fine or is there a better way of doing this?
As mentioned by @AaronD you can probably combine both hotkey assignments into a single macro to avoid the conflict.
But if your current setup works, that is of course not necessary. :)
 

rusty1

Member
Yes, at some point in the future I would like to remove the old tabs.
But that point in time is not decided nor near yet. :)
And I will of course make it clear once that will be the case.


I don't think you need to use json to do this unless you want to interact with the advanced scene switcher from external tools.

Something like this should do the trick:
Let me know if you have any questions or run into any problems! :)


I apologize - that must have been a misunderstanding / mistake of mine.
The scene item transform condition does not support assigning its value to variables.
(The screenshot shows the available condition types in general not the ones support this specific variable functionality)

Nevertheless it is not much work enabling this so I went ahead and did it.

View attachment 92325

A build with this functionality will be available here in a few minutes:
(You will have to be logged into GitHub to be able to download it)

Let me know if you run into any issues!


As mentioned by @AaronD you can probably combine both hotkey assignments into a single macro to avoid the conflict.
But if your current setup works, that is of course not necessary. :)
Thank you so much! It works! You're a legend.
 

rusty1

Member
Is there a way to write math, either in the 'set to fixed value' of a variable, or in the 'Set settings' text fields. I would love to calculate an aspect ratio by dividing one variable by another ${videoWidth} / ${videoHeight} .
There's no way to do that currently, is there?
 
Last edited:

Warmuptill

Active Member
Is there a way to write math, either in the 'set to fixed value' of a variable, or in the 'Set settings' text fields. I would love to calculate an aspect ratio by dividing one variable by another ${videoWidth} / ${videoHeight} .
There's no way to do that currently, is there?
Not at the moment - I will try to look into this tomorrow.
 

rusty1

Member
Not at the moment - I will try to look into this tomorrow.
This plugin is incredible. Over the past two years of using OBS, it's completely taken over my workflow. If you were to incorporate math into variables or text fields, I see that opening a new world of possibilities for dynamic design. Thank you for everything.
 
Top