Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

bcoyle

Member
This is just my opinion and how I colored my app.
1 Green is for on and working as "intended" for normal operation.
2. Pink,saimon,off red and not as bright for "off" or "disabled" - Push to turn back on
3. RED for a command like stop that will stop your app or disrupt the operation.
4. Blinking Red for Disaster (status)
5. Blinking Yellow as a warning. (status)
6. A peach type color for a function start, green when running

For text, I use a mixture, but tend to make the text in the button, what will happen if you push it, not what it is currently doing and divide this according to ACTION or Status control

For example, I have a button when green, says "Allow Streaming" and when red says "streaming not allowed" . This button is more of a condition/status button.

Another button when saimon, saids "start streaming" and when green saids "Stop Streaming". This is an action button, and the text says what it will do if you push it.

So one is a status vs an actual command.

I want the form to be green when functioning in a normal manner.

Here's what the screen looks like when stopped:
Again, like I said, just an opinion.

Run_station Window.jpg


The second screen is operating normally - streaming and recording

Run Station Running - Normal Mode.jpg
 

Dzonzza

New Member
I guess I am not the first person asking this but I couldn't find an answer.
My issue is that I can't find a way to change scenes depends on if source(game capture) is active.
I've tried using Macros but it doesn't work. I'm not sure what does "is active" means. But I guess it means if that game is opened.
So I want to switch scenes from "League of Legends Client" to "League of Legends Game" when a game capture source capturing LoL Game inside "League of Legends Game" scene is running. And when it's not running, switch back to "League of Legends Client". But when I do it, it always switches to "League of Legends Game" scene for some reason. And if it helps, my game is on Borderless mode.
This is macros I've made:
2.png
1.png
 

Warmuptill

Active Member
I guess I am not the first person asking this but I couldn't find an answer.
My issue is that I can't find a way to change scenes depends on if source(game capture) is active.
I've tried using Macros but it doesn't work. I'm not sure what does "is active" means. But I guess it means if that game is opened.
So I want to switch scenes from "League of Legends Client" to "League of Legends Game" when a game capture source capturing LoL Game inside "League of Legends Game" scene is running. And when it's not running, switch back to "League of Legends Client". But when I do it, it always switches to "League of Legends Game" scene for some reason. And if it helps, my game is on Borderless mode.
This is macros I've made:View attachment 78983View attachment 78984
The check whether a source is active will not be useful for your particular scenario, as a game capture source can be "active" even though there is not application being captured at the moment.

Instead it will probably make the most sense to check whether or not the particular application is running using the "Process" condition type.
Process.PNG

(In the above example Firefox is used as I am not sure what the League of Legends process is called exactly.)

Alternatively you could also instead check the window title of the current foreground window.
If that should suffice for your use case you do not even need this plugin as OBS ships with the "Automatic scene switcher" tool which will allow you to do just that.

Let me know if that helps or if you have further questions! :)
 

Dzonzza

New Member
The check whether a source is active will not be useful for your particular scenario, as a game capture source can be "active" even though there is not application being captured at the moment.

Instead it will probably make the most sense to check whether or not the particular application is running using the "Process" condition type.
View attachment 78993
(In the above example Firefox is used as I am not sure what the League of Legends process is called exactly.)

Alternatively you could also instead check the window title of the current foreground window.
If that should suffice for your use case you do not even need this plugin as OBS ships with the "Automatic scene switcher" tool which will allow you to do just that.

Let me know if that helps or if you have further questions! :)

I've tried using "Process" condition type and it works perfectly fine!
I couldn't use "Automatic scene switcher" because that would change scene even if I Alt+Tab from the game.

Thank you a lot for helping me! :)
 

choops

New Member
is there something im doing wrong? all the other features of this patch work for me except for the transition overrides. this was the main reason i was planning on integrating this into my stream. thank you in advance if im just being dumb and overlooking something obvious!
1642547305046.png
 

Warmuptill

Active Member
is there something im doing wrong? all the other features of this patch work for me except for the transition overrides. this was the main reason i was planning on integrating this into my stream. thank you in advance if im just being dumb and overlooking something obvious!View attachment 79248
The entries on this tab only affect automated scene switches triggered by the plugin not manual ones - so maybe it was just a misunderstanding as to what this tab does?
If you a looking to control manual transitions I would recommend this plugin:

Or are you referring to automated scene switches which do not respect the entries on the transition tab?
If so can you give an example?
 

lindenkron

Member
Is it possible in macros to have a macro with a hotkey that toggles between activating(running, just once) two other macros?

'Press R', Runs Macro 1
'Press R again', Runs Macro 2
'Press R again again', Runs Macro 1

Etc?
 

Warmuptill

Active Member
Is it possible in macros to have a macro with a hotkey that toggles between activating(running, just once) two other macros?

'Press R', Runs Macro 1
'Press R again', Runs Macro 2
'Press R again again', Runs Macro 1

Etc?

Yes, that should be doable using something similar to this:

MacroCount1.PNG

MacroCount2.PNG


Let me know if you have questions!

But to be honest this seems a bit complex for such a simple task - I will try to think of a simpler way to set something like this up.
 

AaronD

Active Member
But to be honest this seems a bit complex for such a simple task - I will try to think of a simpler way to set something like this up.

If you're going to do that, then I think it should at least support an arbitrarily long sequence instead of just two. Kinda like PowerPoint's advance button. And maybe include the reverse direction as well? Reverse probably won't work as expected for some things, like a transition to B that looks awesome coming from A and goofy coming from C, but the logic itself should still work.
 

AaronD

Active Member
That would almost be trivial with a Python tab and an API for the user script to hook into:
Python:
def sequence(x):
    match x:
        case 1:
            # trigger macro 1
            return false
        case 2:
            # trigger macro 2
            return false
        case 3:
            # trigger macro 3
            return false
        # etc.
        case _:
            return true

def init():
    step=0

def sequence_fwd(): # arbitrary name that is connected elsewhere to a hotkey
    step += 1
    if sequence(step)
        step=0

def sequence_rev(): # arbitrary name that is connected elsewhere to a hotkey
    step -= 1
    if sequence(step)
        step=max
 

Hans Bélanger

New Member
Hello everybody.
I'm having a hard time to figure out one detail of this plugin.

I use the switcher to automatically go to X scene once a vlc playlist has a few milliseconds left to play using the media tab.
My setup is like this:[When VLC Playlist Source state is Playing and Time remaining shorter ms switch to Previous Scene using Stinger Transition]

The issue I encounter is that the transition is triggered at the end of the first element of the playlist and so my question to you people is how do I specify to the Scene Switcher that I want the transition to trigger at the end of the playlist

Further information that could be relevant: a workaround that sorta works is to use the state played to end and trigger the transition then but there's a black screen during the transition as the playback is of course over. I guess I could cut to the previous scene but a transition proper is what I am aiming for.
 

Warmuptill

Active Member
Hello everybody.
I'm having a hard time to figure out one detail of this plugin.

I use the switcher to automatically go to X scene once a vlc playlist has a few milliseconds left to play using the media tab.
My setup is like this:[When VLC Playlist Source state is Playing and Time remaining shorter ms switch to Previous Scene using Stinger Transition]

The issue I encounter is that the transition is triggered at the end of the first element of the playlist and so my question to you people is how do I specify to the Scene Switcher that I want the transition to trigger at the end of the playlist

Further information that could be relevant: a workaround that sorta works is to use the state played to end and trigger the transition then but there's a black screen during the transition as the playback is of course over. I guess I could cut to the previous scene but a transition proper is what I am aiming for.
Unfortunately, I don't think there is a way to to specify something like X ms before the end of the VLC playlist.
There is no way to query the size of the playlist as far as I know so something like this can only be worked around.
Even the "Played to end" condition type internally uses some workarounds to detect the end of playlist and ignore the end of individual playlist entries.

One possible workaround would be to just wait a set amount of time if you know the length of the playlist beforehand.
Another way would be - assuming the amount of items in the playlist does not change - to count the playlist items which ended their playback and only perform the scene switch only when the last playlist item is currently being played.
 

lindenkron

Member
I think it worked the hotkey thing. Does seem a bit overkill though for the functionality.

I've also been having really weird issues with the new ADV-SS dock. I thought it was just me, or me being crazy to begin with. But I keep having it pop out or position itself in places & ways it shouldn't be able to, while locked.
Like this:
1642800284652.png


This is where it was originally:
1642800315023.png
 

Hans Bélanger

New Member
Unfortunately, I don't think there is a way to to specify something like X ms before the end of the VLC playlist.
There is no way to query the size of the playlist as far as I know so something like this can only be worked around.
Even the "Played to end" condition type internally uses some workarounds to detect the end of playlist and ignore the end of individual playlist entries.

One possible workaround would be to just wait a set amount of time if you know the length of the playlist beforehand.
Another way would be - assuming the amount of items in the playlist does not change - to count the playlist items which ended their playback and only perform the scene switch only when the last playlist item is currently being played.
Unfortunately, the playlist's content varies both in number of items and total length. I'll stick to either triggering the transition manually or the workaround I currently use.
Thank you for the explaination, I had not realized that there is no way to query the length of the playlist
 

Warmuptill

Active Member
I think it worked the hotkey thing. Does seem a bit overkill though for the functionality.
Glad to hear that it worked - but yeah I agree.
I started work on a "sequence" action to make setting up something like this easier:
SequenceAction.PNG

(Still needs reordering / resetting the start / possibly more)

A build should be available here in a few minutes:

I've also been having really weird issues with the new ADV-SS dock
Oh OK, thanks for pointing that out!
Have you stumbled upon any way to reproduce the issue or a scenario where it occurs more frequently?
 
Last edited:

lindenkron

Member
Oh OK, thanks for pointing that out!
Have you stumbled upon any way to reproduce the issue or a scenario where it occurs more frequently?

Nothing specific, I think it happens when you reboot though. This is what it looked like after closing and opening OBS. Also notice me trying to find the "grapping" points to extend the size, it appears gone.

This overlaps the minimum height of the dock itself when seeing how small you can make it. Now granted, I've not tried the dock in a different position - so it could be (?) surrounding elements.

Also;
Noted that macro actually doesn't work. When I boot up OBS from fresh, and press the hotkey it'll fire both macros, and they'll both go from 0 to 1 then 0. (So fire one, then fire other macro).

It appears fixed if I go in and disable 1 macro, press R, then enable it again, to offset the two numbers. Any idea for a fix to this?

Thanks!
 

lcalder

Member
OBS will now always crash upon exiting in advanced-scene-switcher.dll on the new OBS v27.2.0 beta 2 and beta 3

Minimum Steps to reproduce:
1. Launch OBS
2. Wait for everything to load
3. Exit
4. Crash

Latest Windows 10. Last three logs and crashlogs below.
Please let me know if you need any other information.
 

Attachments

  • 2022-01-17 16-20-41.txt
    58.7 KB · Views: 20
  • 2022-01-17 18-09-35.txt
    39.9 KB · Views: 17
  • 2022-01-17 18-32-58.txt
    296 KB · Views: 18
  • Crash 2022-01-21 17-12-48.txt
    150 KB · Views: 20
  • Crash 2022-01-21 17-19-56.txt
    150 KB · Views: 18
  • Crash 2022-01-21 17-20-57.txt
    150 KB · Views: 18

Warmuptill

Active Member
OBS will now always crash upon exiting in advanced-scene-switcher.dll on the new OBS v27.2.0 beta 2 and beta 3

Minimum Steps to reproduce:
1. Launch OBS
2. Wait for everything to load
3. Exit
4. Crash

Latest Windows 10. Last three logs and crashlogs below.
Please let me know if you need any other information.
Thanks for reporting the issue - i will look into it as soon as I can.
Update: I might have identified the reason for the crash on OBS exit.
A build with a fix should be available here in a few minutes:
(You need to be logged into GitHub to be able to download it - let me know if that should be an issue)

Nothing specific, I think it happens when you reboot though. This is what it looked like after closing and opening OBS. Also notice me trying to find the "grapping" points to extend the size, it appears gone.

This overlaps the minimum height of the dock itself when seeing how small you can make it. Now granted, I've not tried the dock in a different position - so it could be (?) surrounding elements.

Also;
Noted that macro actually doesn't work. When I boot up OBS from fresh, and press the hotkey it'll fire both macros, and they'll both go from 0 to 1 then 0. (So fire one, then fire other macro).

It appears fixed if I go in and disable 1 macro, press R, then enable it again, to offset the two numbers. Any idea for a fix to this?

Thanks!
Thanks for the info regarding the dock issue!
I will try to look into it soon, but I will have to prioritize the crashes on the OBS beta for now.

Unfortunately, I can't think of a good solution to the macro toggle issue, besides using this new "Sequence" action from the build above.
Toggle.PNG
 
Last edited:

Warmuptill

Active Member
@lindenkron I believe I found the issue regarding the dock's position not restoring properly.
A build with a fix will be available here in a few minutes:
(The above mentioned new action "Sequence" is also included)
Let me know if everything works as expected.
 
Top