Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

Laczkó

New Member
But I have a suspicion already what might be causing your trouble:
A "cooldown" period seems to be configured during which actions by the scene switcher will be ignored.
13:25:16.508: [adv-ss] cooldown active - ignoring match

Can you please try disabling this option by setting the cooldown to 0.00 seconds?
It seems, this was the problem, as now every scene changes seems to works. I'll keep a close eye on it for a few days to sure really everithing is OK, but it looks promising.

Probably I misunderstood that cooldown setting's function. I'd like to avoid scene changes in quick succession and I thought this setting is the solution. As it wasn't, now my only problem is I don't have any idea how to solve this. For better understanding I give an example:

A media source ending at 13:59:59 and there is a macro what is change scene, if that media source has played to end, but there is another macro that is intended to change scene at 14:00:00, so there would be two scene change within a second, and that's what I want to avoid. Simply skipping the scene change that was programmed to 14:00:00 in a case if there was a scene change in the last few (e.g. 5) seconds is not an option as tipically these scene changes at a given time are the most important changes in my broadcast. There are two logical approach that would good for me:

Ignore any scene changes in the last few seconds before the time of a time based scene change, or if two scene change is too close together, than delay the second scene change so much that a certain amount of time elapses between the two.

Has any idea to do this?
 

Warmuptill

Active Member
Ignore any scene changes in the last few seconds before the time of a time based scene change
Then you would have to adjust your time based macros to already "trigger" earlier but wait a specified amount of time before performing their actions.
To use your example for a intended scene change at 14:00:00 you could use a macro similar to this:
EarlyTime.PNG

This will already match at 13:59:55 but wait 5 seconds before triggering the scene change.
During this waiting time no other actions are performed. (*unless* you set the checkbox above "Run macro in parallel to other macros")

or if two scene change is too close together, than delay the second scene change so much that a certain amount of time elapses between the two.
This approach can performed in a similar way by just adding a "wait" action after the corresponding scene changes.
WaitSceneSwitch.PNG

Just as above during the "wait" action no other macros are able to run. (Unless explicitly specified)

Hope that helps! :)
 

lindenkron

Member
What's the best way to: ?
Trigger something once, once a scene item has become visibly shown.
Trigger something once, once a scene item has become visibly hidden.


Not having great success with
1639012514000.png


When I trigger a lot of these, even from different macros (each camera has their own) they seem to break each other somehow. Glitching animations and so on. So just asking to see if there's a better way to do this.
 

lindenkron

Member
For the above, possibly even if any scene item in the scene has become visible? I'm not sure what's causing the glitched animations - perhaps it's an OBS thing and it's trying to reference a video already running and it glitches itself out or something.
 

lindenkron

Member
So, doing it manually works. No glitches, animations play etc.

So I'm clearly just setting up Adv-ss wrong for doing what I want it to do.

I want it to this, but without glitching.
Portal in:
1639015926142.png

Portal out:
1639015965049.png


I tried doing what I wanted manually (since I originally thought it was the hide/show stinger transitions that were bugging), but if I enable them fast one after another manually; it works fine.

So something in the Adv-ss automation is making things go bad.

A rundown of what I'm trying to do:
Upon activating the camera (upper scene, lot of nested scenes) depending on which camera is enabled, no matter where, show portal - wait (so the portal animation can play), enable the camera source itself (which also have a show/hide transition - matte) - then hide portal again so it can be used again.

But I have a feeling something somewhere is triggering things multiple times - and breaking because OBS is like getting flooded with requests. I want it to do this once.

I'd love any help you have. Thanks!
-lindenkron
 

Attachments

  • 1639015854846.png
    1639015854846.png
    33.9 KB · Views: 22

Warmuptill

Active Member
So, doing it manually works. No glitches, animations play etc.

So I'm clearly just setting up Adv-ss wrong for doing what I want it to do.

I want it to this, but without glitching.
Portal in:
View attachment 77846
Portal out:
View attachment 77847


I tried doing what I wanted manually (since I originally thought it was the hide/show stinger transitions that were bugging), but if I enable them fast one after another manually; it works fine.

So something in the Adv-ss automation is making things go bad.

A rundown of what I'm trying to do:
Upon activating the camera (upper scene, lot of nested scenes) depending on which camera is enabled, no matter where, show portal - wait (so the portal animation can play), enable the camera source itself (which also have a show/hide transition - matte) - then hide portal again so it can be used again.

But I have a feeling something somewhere is triggering things multiple times - and breaking because OBS is like getting flooded with requests. I want it to do this once.

I'd love any help you have. Thanks!
-lindenkron
Can you maybe share a log file of this issue occurring with verbose logging enabled (General tab)?
This might give insights as to what is happening.

In general if you want to be sure a macro is only running a single time you could add another action to your macro which pauses the macro itself or add a condition which checks how often the macro was run.
Unfortunately I don't have access to a PC with OBS at the moment so I cannot share example screenshots.
 

AaronD

Active Member
A rundown of what I'm trying to do:
Upon activating the camera (upper scene, lot of nested scenes) depending on which camera is enabled, no matter where, show portal - wait (so the portal animation can play), enable the camera source itself (which also have a show/hide transition - matte) - then hide portal again so it can be used again.

Could you have a bunch of identical scenes that play the same portal, that then transition to their respective camera scenes? Then you don't switch directly to the camera, but to the appropriate portal.
 

lindenkron

Member
Can you maybe share a log file of this issue occurring with verbose logging enabled (General tab)?
This might give insights as to what is happening.

In general if you want to be sure a macro is only running a single time you could add another action to your macro which pauses the macro itself or add a condition which checks how often the macro was run.
Unfortunately I don't have access to a PC with OBS at the moment so I cannot share example screenshots.
Hmm not entirely sure how this'd help. As you can see above; the issue is that I'm trying to make the macro fire from being triggered by any of 6 camera positions. This is to ensure that it don't matter which position camera X is shown in, it'll still play the animation that's nested in the camera's scene.

But somehow, even if showing for example:
Camera 1 in Position 1
&
Camera 2 in Position 2
it'll start lagging and mess up animations etc.

I'll try a verbose logging.
 

lindenkron

Member
What it's supposed to do:
Play one portal animation, a second later play the next - then show first camera, then show next. Then hide the portals.

What happens:
First portal plays, 2nd portal plays. First camera shows. Then 2nd portal closest with no camera shown. Then camera shows.

Depending on what order you do 1-2-3 in, they'll have weird glitchy interactions. That was just for this log:
 

lindenkron

Member
I don't understand why these two macros (side by side) would interfer with each other, when they're not being triggered by anything in common.
image-macro.png
This is what it looks like with the macro:

This is what it should look like (done manually):

This is just one example of the glitching. It doesn't happen when I press the button, like it's waiting for something. It randomly cancels doing any animations and such.
 

Attachments

  • image-macro.png
    image-macro.png
    155.9 KB · Views: 25

AaronD

Active Member
This is what it looks like with the macro:

This is what it should look like (done manually):

Ah! Okay. So it's not an over-complicated XY problem. Great job on the examples. I thought you were using the word "portal" to describe a full-screen transition from one full-screen camera to another full-screen camera. Maybe you'd use it for a short bio of the person who's about to come on, or whatever... But no, it's actually a partial-screen animation that would be really hard to describe in words alone. Again, thanks for the examples!
 

CodeYan

Member
Hey Warmuptill, thank you for adding so many good features! Again, I couldn't test the build as I didn't have time in the past few weeks, I'm sorry. Now that I've tested the latest version though, the parallelization looks really neat to me, thanks! I don't really have a super complicated setup so I don't know if there is an edge case, but I tried to break it with my setup, but it was fine.

For the screenshot functionality, it does work, but can you separate the scenes and sources in the dropdown list? It does get very cluttered. Also, please add "Preview Scene (Studio Mode)" to the choices (you can decide on the scene name haha).

I noticed that there is a potential bug. I made a macro that simply checks for a hotkey trigger (and some simple actions). I deactivated it. Then I pressed the hotkey, and as expected, it did not execute the macro. However, a few minutes later, I activated the macro, and it executed the macro. Is this because the events are pooled (which is a good idea anyhow)? I don't know if you need to fix this or not, as it is not a critical one (obviously if you're activating and deactivating macros, you're just setting up), but you may want to look at it.

Again, thanks for the amazing work! This is really superb for my workflow. Happy holidays!
 

CodeYan

Member
Oh, could you also disable "Run macro" when the macro is running? Not necessary, but I think it's a nice UX change? Also, seeing that the macro can be a long one, maybe having a "Stop macro" is useful for testing? Thanks!
 

CodeYan

Member
I don't understand why these two macros (side by side) would interfer with each other, when they're not being triggered by anything in common.
View attachment 77874This is what it looks like with the macro:

This is what it should look like (done manually):

This is just one example of the glitching. It doesn't happen when I press the button, like it's waiting for something. It randomly cancels doing any animations and such.
Hey, you seem to be an old version? Please update to 1.16.5. Then you should see an option for each macro to "Run macro in parallel to other macros". Try to enable that for each macro, and see if that fixes your issue.
 

lindenkron

Member
Hey, you seem to be an old version? Please update to 1.16.5. Then you should see an option for each macro to "Run macro in parallel to other macros". Try to enable that for each macro, and see if that fixes your issue.
Hey CodeYan, thanks for the reply.

I've been using a 1~ month old version of it that @Warmuptill made. It had some features in I needed. Unsure if they're in this one. I tried your suggestion; and it fixed 50% of it. The portals now show correctly, but when disappearing the animations just get cut off instantly.

I don't understand why.

I don't think this is a problem I can solve, not sure anyone can except for Warmuptill. It appears to be some sort of race condition that makes it so if you're messing with hiding something and playing a hide stinger - it breaks all other show/hide animations or transitions.


Again, thanks for the input though! Got me half way there, I unfortunately only have a few days to try and come up with a solution for this.

Happy Holidays to you,
-Lind
 

CodeYan

Member
Hey Warmuptill! I have now tried the "Run Macro" action. I noticed that you can't actually run the same macro from within itself (infinite loop) as the macro would still be running. Which I think is reasonable, as it would otherwise result in recursion and potentially stack overflow. While for now I am fine with using the "Advanced scene switcher is running" for my infinite loop, maybe you should do something about this? Here are some ideas I have:
1. Remove the same macro from the choices.
2. Keep it, but when it executes the action, make it similar to a "continue" in a programming loop, so that further actions won't be executed, and it would run the macro from the top again. This needs a note that should show though, when the same macro is selected.
3. Keep it, but defer the execution till after all the actions are executed. (I personally don't like this option).
 

lindenkron

Member
Solution:
It was a mixture of 3 things. I managed to solve it making a very simplisitic remake of my setup in a clean scene.
1: Showing reference of same Media File multiple places will play the file from the current playback time of the first shown source.
2: Run macro in parallel to other macros - this fixed another part that was broken (Thanks again CodeYan)
3: Missing transition stinger on one of the files made me constantly wonder why it was breaking. Found this out by doing Cam 2 & 3 that magically worked and not 1 & 2 where 1 kept breaking.

This has been a rollercoaster trying to figure out. Praying this is the last post on this <3

Again happy holidays,
-Lind
 

CodeYan

Member
Solution:
It was a mixture of 3 things. I managed to solve it making a very simplisitic remake of my setup in a clean scene.
1: Showing reference of same Media File multiple places will play the file from the current playback time of the first shown source.
2: Run macro in parallel to other macros - this fixed another part that was broken (Thanks again CodeYan)
3: Missing transition stinger on one of the files made me constantly wonder why it was breaking. Found this out by doing Cam 2 & 3 that magically worked and not 1 & 2 where 1 kept breaking.

This has been a rollercoaster trying to figure out. Praying this is the last post on this <3

Again happy holidays,
-Lind
Glad I was able to help. Congrats on getting it fixed!

Edit: By the way, the build you had was probably already merged.
 

lindenkron

Member
Glad I was able to help. Congrats on getting it fixed!

Edit: By the way, the build you had was probably already merged.
I hope so :)

On a side note - I appear to have broken Adv-ss. Trying to move a macro below one of my other macros yield crash log attached.

Yes. I'm annoyingly good at breaking things, I know. Sorry.

Steps are repeatable, it's when trying to move it past a specific macro. I try to move anything past 'Camera 1 - Portal In' and OBS crashes with attached log.
1639381856369.png


Any tips?
-Lind
 

Attachments

  • Crash-Log-Adv-ss.txt
    150 KB · Views: 21

CodeYan

Member
@Warmuptill Hey, I experienced something weird. As I've mentioned b4, I have a macro set to loop infinitely (just showing/hiding 2 text sources and wait actions, no scene transitions). It works with other macros now with the parallelization. However, when I put it at the top of the priority list (like the note said), it seems to block all Media switches. I don't know if it's an issue with the parallelization, or if it's a bug necessary to fix. If I keep Media higher than Macro, it works.
 
Top