Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

videored

New Member
Any way to tell this to mute absolutely everything in one particular scene without having to add each source from that scene individually to the macro?
 

AaronD

Active Member
Everything disappear with U22
You mean you upgraded across the v27/v28 boundary, and all your plugins went away? Or do you mean something else?

That specific upgrade is known to do that, as a consequence of the Qt5/6 boundary that corresponds to those versions of OBS. Plugins made for OBS v27 and before, and thus Qt5, are not compatible with Qt6, and thus OBS v28 and later. So they'll fail to load. Because they fail to load, and because OBS overwrites all the settings when it closes, it wipes out the settings that they used to have, even if you downgrade back to what it was.

I really wish OBS itself would have put up a big warning about crossing that boundary, and offered a way to preserve the plugin settings if not the plugins themselves. But it didn't. So people don't think anything special until they see that they've lost all of that, by which time it's too late to recover.

If you know, then you can back up everything explicitly (screenshot if necessary), update the plugins too, and put it all back afterwards. But you have to know, and OBS itself completely failed what I consider to be a responsibility to tell you.

(Still remember that it's free, and both made and supported by volunteers. Nothing is guaranteed like a commercial product is.)
 

videored

New Member
A lot of times I run into this issue where I cannot select a particular macro to run it at the end of another via the macro option, not only that but the macro will instead list ITSELF and skip the following macro that I want to actually run. Something like in this picture where I cannot pick "RAID: RAIDEN 2":

1679763909642.png


This has been happening since the update that added folders, in fact this and other similar issues (Most of which I think were fixed by now) pretty much made me outright ignore the folder system in order to avoid other bugs. Is there a way to consistently fix this particular issue without having to duplicate macros so the macro option will see them and without having to rearrange the macro order over and over?

I know I fixed this a few times but this issue has been so obnoxious (In an otherwise perfect plugin, my favorite in OBS) to the point I sometimes just try to code absolutely everything I need into one big ass macro (Which is annoying AF when I want to edit something and it takes OBS several seconds just to display the full macro) just so I can avoid this problem.
 

videored

New Member
Followup to my previous post. I did what I said there earlier and duplicated the first part of my raid macro so it would be at the bottom (I changed some names too but that's irrelevant) and behold, now the scenes can read the followup macro just fine
1679764505824.png
(RAIDEN 1 and RAID START are exactly the same macro)
Now the START macro can trigger the SCENE 2 macro, and SCENE 2 can trigger RAIDEN RESET too. Doing this is usually how I fix this issue, HOWEVER, if your macro order for something like this is actually important then this isn't going to be an acceptable fix.
 

Warmuptill

Active Member
A lot of times I run into this issue where I cannot select a particular macro to run it at the end of another via the macro option, not only that but the macro will instead list ITSELF and skip the following macro that I want to actually run. Something like in this picture where I cannot pick "RAID: RAIDEN 2":

View attachment 92676

This has been happening since the update that added folders, in fact this and other similar issues (Most of which I think were fixed by now) pretty much made me outright ignore the folder system in order to avoid other bugs. Is there a way to consistently fix this particular issue without having to duplicate macros so the macro option will see them and without having to rearrange the macro order over and over?

I know I fixed this a few times but this issue has been so obnoxious (In an otherwise perfect plugin, my favorite in OBS) to the point I sometimes just try to code absolutely everything I need into one big ass macro (Which is annoying AF when I want to edit something and it takes OBS several seconds just to display the full macro) just so I can avoid this problem.
Followup to my previous post. I did what I said there earlier and duplicated the first part of my raid macro so it would be at the bottom (I changed some names too but that's irrelevant) and behold, now the scenes can read the followup macro just fine View attachment 92677(RAIDEN 1 and RAID START are exactly the same macro)
Now the START macro can trigger the SCENE 2 macro, and SCENE 2 can trigger RAIDEN RESET too. Doing this is usually how I fix this issue, HOWEVER, if your macro order for something like this is actually important then this isn't going to be an acceptable fix.
Thank you very much for reporting the issue and sorry for causing you this much trouble!
I found the bug and will make sure to include in the next release.
Feel free to post here / message me / create an issue on GitHub right away if you running into issues!

I will release a first test release of the next version later today which will also contain this fix.
 

videored

New Member
Thanks! I was dealing with this for a while but never could tell just HOW was I able to fix it sometimes. Today I was finally able to figure out the steps to both replicate and fix the issue on my end so I finally decided to post about it here (Since it's a rather complicated issue to explain if I don't know very well just WHAT is going on). I'll make sure to mention future issues if I find anything else to report.

One little thing I'm not sure how to talk about and not sure if it's a bug or not either: When you select and action and press the + button in order to create a new action (And duplicate the one you selected) sometimes they swap places if you try to edit the newly created/duplicated action too fast. As in, you're trying to change the action type from whatever the original action it duplicated was to say... "Filter" and suddenly the action that was below (Where the duplicated action always goes after pressing the + button) moves up and the original action moves down. Not sure if the plugin is just TOO sensitive to the clicking of a newly created action that it reads as if you were dragging it upwards or what.
 

Warmuptill

Active Member
Thanks! I was dealing with this for a while but never could tell just HOW was I able to fix it sometimes. Today I was finally able to figure out the steps to both replicate and fix the issue on my end so I finally decided to post about it here (Since it's a rather complicated issue to explain if I don't know very well just WHAT is going on). I'll make sure to mention future issues if I find anything else to report.

One little thing I'm not sure how to talk about and not sure if it's a bug or not either: When you select and action and press the + button in order to create a new action (And duplicate the one you selected) sometimes they swap places if you try to edit the newly created/duplicated action too fast. As in, you're trying to change the action type from whatever the original action it duplicated was to say... "Filter" and suddenly the action that was below (Where the duplicated action always goes after pressing the + button) moves up and the original action moves down. Not sure if the plugin is just TOO sensitive to the clicking of a newly created action that it reads as if you were dragging it upwards or what.
I can't seem to reproduce this issue yet.
Which OS are you using?
 

Warmuptill

Active Member
I am preparing the release of a new version of the plugin and would appreciate if some users would give this following test release a try:
Please make sure to back up your settings beforehand just in case something is broken.
If you do find any issues please do report them!
Thank you! :)

The following changes are included in this test release:


Additions:​

  • Added the option to create dock widgets of macros to manually run or (un-)pause them.
    Dock
    You can enable this for a given selected macro on the macro tab using the settings button.
    DockExample
  • Added "Run" condition.
    This new condition type allows you to use external programs to trigger actions based on the exit code of a spawned process.
    RunCondition
  • Added support for different algorithms for the video condition's pattern matching option, which might improve the matching accuracy depending on the use case.
    PatternMethod
  • Added text recognition support (OCR) to video condition using "Tesseract". (Windows and MacOS only)
    OCR
    Enables variable support
  • Added variable support for most file selections.
    FileSelectionVariable
  • Improved "Http" action by adding support for variables and the option to specify headers when using the "Post" or "Get" action.
    Http
  • Added variable support for most number based selections, e.g. duration or area selections.
    DurationVariable
    The default value will be 0.0 if a given variable is not a valid number.
  • Added option to assign the value of mathematical expressions to a variable.
    MathVariable
  • Enabled assigning value of a "Scene item transform" condition to variables.

Changes:​

  • Set the default logic type of new non-root macro conditions to "Or".
  • Prevent accidental duration changes while scrolling through the settings.
  • Enable shrinking the status dock to smaller sizes.
    Dock
  • Improve preview frame visibility of cursor condition.
  • Create new groups at the top most selection index, instead of at the bottom of the macro list.
  • Allow drag and drop of macro segments while clicking on the header label.
  • Added macro list context menu options for add, rename, remove.
    ContextMenu
  • Enable deleting multiple macros at once.
  • No longer ask for confirmation when deleting empty groups.
  • Use theme based icons for status dock, group, and duration icon.
  • Minor layout related changes.

Fixes:​

  • Fixed macro selections being lost in the "Macro" action or condition if the referenced macros were renamed or (un-)grouped.
  • Fixed video condition preview dialog not showing matches in some circumstances.
  • Fixed "Hotkey" action not "holding" down keys for the specified duration. (Windows)
  • Reduced size of installer binary. (Windows)
 

LexXxusTV

New Member
You might be able to achieve this using the "Video" condition, assuming there some sort information available visually that this event has occurred.
For an example how on how to use the video condition you can check out this guide:

For more general information about the video condition have a look at this wiki page:

Hope that helps!
Let me know if you have any questions!
So far it's a no go for me.
I must be doing something wrong.
 

Attachments

  • adv-ss-LexXxusTV-2023.03.26.04.20.35.txt
    25.4 KB · Views: 22

Héraès

Member
It seems that I have to push macro shortcuts twice to apply actions. I've double-checked, it's [probably] not because of my macros.
Is there a reason for this ?
Important note : I'm using Input Director to move my mouse and keyboard on a second screen where OBS is. But other keyboard combinations (not registered as macro shortcuts) don't cause any similar issue (like changing scenes for example).
 
Hello (again!)

I'm trying to set up an auto Scene Item Transform - where I have one window capture (for YouTube videos) with two Crop filters, so if the video is the usual 1080 *or* an older 4:3 - I can hit a Stream Deck button to toggle the filters on/off (so only one is active) - and using your amazing plugin - I'm trying to set up a macro like:

If "filter (1080) is enabled, the window capture (cropped) will be perfectly aligned on the OBS layout where it's supposed to go; and if I toggle that off and the older 4:3 on, THAT cropped image will go to where it's supposed to go"

and I think I see how it's supposed to be done, BUT...

When I get to clicking the source I want to transform - the source disappears, as the transform numbers for that scene are all immediately turned to 0s - and I have to delete the macro and "Reset Transform" to get the image back.

If I use your "Get transform" - the image doesn't come back - and the transform info isn't transferred to that box with the "alignment; bottom; bounds; x; y; et al"

And I don't fully grasp how to enter in the numbers needed there on my own. I wrote down the numbers for when they all went to 0s, but typing in the few numbers did nothing...

Is this a glitch (turning to 0s) or do I just not know how to input the item transform info correctly into that box with the very simple coding terminology?

Feels like I'm close -

THanks!
 

Warmuptill

Active Member
It seems that I have to push macro shortcuts twice to apply actions. I've double-checked, it's [probably] not because of my macros.
Is there a reason for this ?
Important note : I'm using Input Director to move my mouse and keyboard on a second screen where OBS is. But other keyboard combinations (not registered as macro shortcuts) don't cause any similar issue (like changing scenes for example).
Can you give a simple example of a macro where this issue is happening so I can try to reproduce it on my end?

Hello (again!)

I'm trying to set up an auto Scene Item Transform - where I have one window capture (for YouTube videos) with two Crop filters, so if the video is the usual 1080 *or* an older 4:3 - I can hit a Stream Deck button to toggle the filters on/off (so only one is active) - and using your amazing plugin - I'm trying to set up a macro like:

If "filter (1080) is enabled, the window capture (cropped) will be perfectly aligned on the OBS layout where it's supposed to go; and if I toggle that off and the older 4:3 on, THAT cropped image will go to where it's supposed to go"

and I think I see how it's supposed to be done, BUT...

When I get to clicking the source I want to transform - the source disappears, as the transform numbers for that scene are all immediately turned to 0s - and I have to delete the macro and "Reset Transform" to get the image back.

If I use your "Get transform" - the image doesn't come back - and the transform info isn't transferred to that box with the "alignment; bottom; bounds; x; y; et al"

And I don't fully grasp how to enter in the numbers needed there on my own. I wrote down the numbers for when they all went to 0s, but typing in the few numbers did nothing...

Is this a glitch (turning to 0s) or do I just not know how to input the item transform info correctly into that box with the very simple coding terminology?

Feels like I'm close -

THanks!
Can you share an example of a scene item transform action you are using, that is causing problems?

In general note that, if a value is not specified in the scene item transform action it will be assumed that the default value will be set.
For example, the following transform will set the "x" value of the "pos" field to "0" as it was not specified.

Code:
{
    "alignment": 5,
    "pos": {
        "y": 100
    }
}

I would assume it would be easiest if you first pause the macros intended to set the scene item transform data.
Next you manually position the source in the desired area for the 4:3 area and click "Get transform" in the corresponding macro's scene item transform action.
Now you move the source to the desired area for the non-4:3 case and click "Get transform" in the scene item transform action of the non-4:3 macro.

Now your macros should "know" where to move the source.
Test it by clicking the "Run macro" button for each macro.
If everything works unpause your macros.

I hope that helps!

Do I have to have an active stream for this setting to be triggered?
I believe I have all the settings correct.

Thank you.
No, you don't have to steram / record for the Video condition type to function.

One important thing to note is that the source has to be "active" for the pattern matching to work.
Meaning if a source is not currently being rendered as it is not visible anywhere pattern matching will also not work.

In general I would suggest the following workflow (if possible):
0. Select the source you want to perform the pattern matching on.
1. Select the area you want to match of a given source.
2. Click the "Browse" button in the file selection area and choose "Create screenshot" to create a screenshot trimmed given area.
3. Optionally modify the image in external programs.
4. Click the "Show match" button to show a preview window of the pattern match.
5. Tweak the settings of the video condition (pattern matching mode and threshold value) to your liking.

Let me know if you have any questions!
 
Can you give a simple example of a macro where this issue is happening so I can try to reproduce it on my end?


Can you share an example of a scene item transform action you are using, that is causing problems?

In general note that, if a value is not specified in the scene item transform action it will be assumed that the default value will be set.
For example, the following transform will set the "x" value of the "pos" field to "0" as it was not specified.

Code:
{
    "alignment": 5,
    "pos": {
        "y": 100
    }
}

I would assume it would be easiest if you first pause the macros intended to set the scene item transform data.
Next you manually position the source in the desired area for the 4:3 area and click "Get transform" in the corresponding macro's scene item transform action.
Now you move the source to the desired area for the non-4:3 case and click "Get transform" in the scene item transform action of the non-4:3 macro.

Now your macros should "know" where to move the source.
Test it by clicking the "Run macro" button for each macro.
If everything works unpause your macros.

I hope that helps!


No, you don't have to steram / record for the Video condition type to function.

One important thing to note is that the source has to be "active" for the pattern matching to work.
Meaning if a source is not currently being rendered as it is not visible anywhere pattern matching will also not work.

In general I would suggest the following workflow (if possible):
0. Select the source you want to perform the pattern matching on.
1. Select the area you want to match of a given source.
2. Click the "Browse" button in the file selection area and choose "Create screenshot" to create a screenshot trimmed given area.
3. Optionally modify the image in external programs.
4. Click the "Show match" button to show a preview window of the pattern match.
5. Tweak the settings of the video condition (pattern matching mode and threshold value) to your liking.

Let me know if you have any questions!
Hi, thanks for the reply! I hadn't remembered to "stop" the scene switcher, so I got excited when I hit "Get Transform" at the bottom - as the "alignment" went to "5" but none of the other numbers changed - and then the other macros also said "5" there as well -

Okay - so here are some screen shots. This is a Mystery Science Theater 3000 knockoff ("Massive Rip-Off Theater 5-Hundo") - watching vids, making fun in real time, etc. Mix of old and new stuff - so I was hoping this transform macro would be able to automatically move the cropped browser into place depending on whether the filter for the 1080p cropped source of switched to the 4:3 ratio for the older videos. Without typing any numbers into the window with the alignment, bottom, bounds, et al - cuz I don't know what to do there - the "Get transform" button doesn't seem to be putting the location of the source in the box - like, say, the Move Transition does (which I use EXTENSIVELY)

MRT500 Screenshot.png
MRT500 Transform2.png
MRT500 Transform.png
 

Warmuptill

Active Member
the "Get transform" button doesn't seem to be putting the location of the source in the box - like, say, the Move Transition does (which I use EXTENSIVELY)
Sorry if I am stating the obvious or misunderstanding something, but the text area containing the transform data has a scroll bar.
The positional data should be part of the "pos" block towards the middle of the text field.

Does this value not change for you after moving the source and clicking the "Get transform" button again?
Or are you referring to something different with "location of the source"?

Sorry for coming back with so many questions instead of answers - I just want to be sure we are talking about the same thing :)

Transform1.PNG
 

Balian

New Member
Hi. Would it be possible to remotely command obs from another computer through the network section using advanced scene switcher? And if so, what is the procedure to apply?
 

Warmuptill

Active Member
Hi. Would it be possible to remotely command obs from another computer through the network section using advanced scene switcher? And if so, what is the procedure to apply?
You can achieve this by using the websocket condition / action type in the Macro tab.
General information about websocket actions and conditions can be found here:
The details depend on what exactly you want to do.

For example, this comment explains (among other things) how to use the websocket condition / action to synchronize the current scene between two instances of OBS:

Let me know if you have any questions!
 

Frankiemagic13

New Member
Have a question i have a macro where when a scene is switched i have a source become projected but it seems to constantly repeat and adding multiple windows and wont stop please help thanks
 

Attachments

  • Screenshot 2023-04-01 at 11.28.55 AM.png
    Screenshot 2023-04-01 at 11.28.55 AM.png
    882.5 KB · Views: 63
Top