Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

GeoffMC

New Member
(I've now installed the #424 built you mentioned above.)
I am still not seeing the behaviour I expect with the audio below trigger.
It is currently set to 18secs so I expect that if I change to any other scene, and if the audio is below the 1% threshold (which is currently is as its off) then 18secs later it will switch to my trigger scene but this doesn't happen.
Why does it not switch to '24Hr+AllMasses' even though the log shows this as matching?
 

Attachments

  • 2021-05-04 07-36-35_test1.txt
    106.3 KB · Views: 37
  • OBS-AdvSwitchSettings-4May21.txt
    3 KB · Views: 39

Warmuptill

Active Member
(I've now installed the #424 built you mentioned above.)
I am still not seeing the behaviour I expect with the audio below trigger.
It is currently set to 18secs so I expect that if I change to any other scene, and if the audio is below the 1% threshold (which is currently is as its off) then 18secs later it will switch to my trigger scene but this doesn't happen.
Why does it not switch to '24Hr+AllMasses' even though the log shows this as matching?
The build did not change any behavior.
I was only referring to it regarding the limit for the duration selection:

>>Also it seems that I can only have a max of 90secs in the audio timer...
>99 seconds was just an aribrary limit I chose. I changed this recently - you can find a build where this was changed here [...]

When you see the log [adv-ss] switched scene the OBS frontend event to switch scenes has been sent by the scene switcher, but the corresponding "confirmation" log by OBS User switched to scene ... is missing.
So I am not sure what is going on on your end.

I also tried to replicate your scene / source setup on my end and do not encounter any issues.
(I added scenes for "24Hr+AllMasses", "PTZ-New" and used my microphone as "1:Onyx-Main".)
The scenes were switched as expected.

How long are your transitions and what kind of transition are you using?
 
Last edited:

GeoffMC

New Member
Transitions are 'Fade'. I have a few 'Fade' quick transitions set in OBS with times of 300ms, 1000ms and 3000ms but the Adv switcher only allows a single 'Fade' option (or one of the other types) so I'm guessing its just using the default of 300ms?
It did however seem to work OK when it was 'live' (i.e. when the audio actually got switched on then subsequently off).

But I don't see 'user switched to scene' in the logs that you mentioned above. I only see this if I manually switch to a different scene in OBS. Furthermore I see 'user switched to scene' when I manually/directly choose a different scene in OBS - which is BEFORE I click on any transition to make that scene 'live'. OBS is in Preview/Program mode. How does the adv scene swither deal with this aspect? Does it differentiate between switching to a scene and subsequently transitioning to the scene? The log doesn't seem to relect this.
I see "[adv-ss] switched scene" when the switching actually happens/is triggered - does this imply switching AND transitioning?
Note that I see "Switched to scene 'PTZ-New'" when OBS is starting up - which I think is OBS recalling the scene that was last 'active' when OBS was stopped.

OK I think I've answered some of these points now - I used 'baretail' on the OBS log to see the log entries generated in real time.
1. I get: "user switched to scene" when I simply/manually choose a different scene in OBS.
Presumably the entry: "[adv-ss] match for 'audio' - switch to scene '24Hr+AllMasses'" is the [adv-ss] equivalent to the OBS "user switched to scene" log entry above?
2. When I manually transition to the selected scene there is no entry in the OBS log (with [adv-ss] off).
3. When [adv-ss] is on we see "[adv-ss] switched scene" when it wants to transition to that scene that has been triggered.
Would you agree with these points?
However I believe that this is where things aren't always working. I see 'switched scene' in the log but no change to the OBS scene being output. Is there any way that the code could verify that its 'transition' command was accepted/acted upon? Is there a return code that can be checked (and maybe logged)?

In the attached log, you can see some manual scene switches (although you can't see the transitions) and at 06:57:39 after avd-ss is started you see [adv-ss] 'switched scene' to the '24Hr+AllMasses' scene which is OK.
However at 06:58:49 I manually changed the scene and transitioned as per this log entry:
06:58:49.699: User switched to scene 'PTZ+Welcome'
adv-ss then matches on the audio and wants to switch to the '24Hr+AllMasses' scene
adv-ss then triggers at 06:58:54 where we see:
06:58:54.677: [adv-ss] switched scene
But no scene change actually occured in OBS - it is still showing the scene 'PTZ+Welcome'
The log then continues matching with: [adv-ss] match for 'audio' - switch to scene '24Hr+AllMasses'
but no further scene changes are tried and we are left with the wrong scene.
 

Attachments

  • 2021-05-05 06-51-59.txt
    248.8 KB · Views: 26
  • OBS-AdvSwitchSettings-5May21.txt
    3 KB · Views: 28

Mango

Member
First of all, thank you for this excellent and very powerful plugin. We have been using it for our church services with great results.

We have a slide show and media sources that we switch between. The script requires viewers to see Slide A, then play a media source, then see Slide B. Currently I do this with this plugin and hotkeys. I have assigned a hotkey to advance the slide and switch to the media source scene. Then, Advanced Scene Switcher switches back to the slide show scene at the end of the video.

Limitations to this are I must use the Cut transition (no fades otherwise the viewer will see Slide B too early), and I cannot use the mouse to switch scenes (must use hotkeys). Is there a better way to do what I'm doing?

Thanks,
Mango
 

Warmuptill

Active Member
Transitions are 'Fade'. I have a few 'Fade' quick transitions set in OBS with times of 300ms, 1000ms and 3000ms but the Adv switcher only allows a single 'Fade' option (or one of the other types) so I'm guessing its just using the default of 300ms?
It did however seem to work OK when it was 'live' (i.e. when the audio actually got switched on then subsequently off).

But I don't see 'user switched to scene' in the logs that you mentioned above. I only see this if I manually switch to a different scene in OBS. Furthermore I see 'user switched to scene' when I manually/directly choose a different scene in OBS - which is BEFORE I click on any transition to make that scene 'live'. OBS is in Preview/Program mode. How does the adv scene swither deal with this aspect? Does it differentiate between switching to a scene and subsequently transitioning to the scene? The log doesn't seem to relect this.
I see "[adv-ss] switched scene" when the switching actually happens/is triggered - does this imply switching AND transitioning?
Note that I see "Switched to scene 'PTZ-New'" when OBS is starting up - which I think is OBS recalling the scene that was last 'active' when OBS was stopped.

OK I think I've answered some of these points now - I used 'baretail' on the OBS log to see the log entries generated in real time.
1. I get: "user switched to scene" when I simply/manually choose a different scene in OBS.
Presumably the entry: "[adv-ss] match for 'audio' - switch to scene '24Hr+AllMasses'" is the [adv-ss] equivalent to the OBS "user switched to scene" log entry above?
2. When I manually transition to the selected scene there is no entry in the OBS log (with [adv-ss] off).
3. When [adv-ss] is on we see "[adv-ss] switched scene" when it wants to transition to that scene that has been triggered.
Would you agree with these points?
However I believe that this is where things aren't always working. I see 'switched scene' in the log but no change to the OBS scene being output. Is there any way that the code could verify that its 'transition' command was accepted/acted upon? Is there a return code that can be checked (and maybe logged)?

In the attached log, you can see some manual scene switches (although you can't see the transitions) and at 06:57:39 after avd-ss is started you see [adv-ss] 'switched scene' to the '24Hr+AllMasses' scene which is OK.
However at 06:58:49 I manually changed the scene and transitioned as per this log entry:
06:58:49.699: User switched to scene 'PTZ+Welcome'
adv-ss then matches on the audio and wants to switch to the '24Hr+AllMasses' scene
adv-ss then triggers at 06:58:54 where we see:
06:58:54.677: [adv-ss] switched scene
But no scene change actually occured in OBS - it is still showing the scene 'PTZ+Welcome'
The log then continues matching with: [adv-ss] match for 'audio' - switch to scene '24Hr+AllMasses'
but no further scene changes are tried and we are left with the wrong scene.
On my build of OBS the following messages appear close together regardless of manual or automated scene change:
User switched to scene 'A'
[adv-ss] switched scene

Manually triggering scene change will only trigger the former message.
When you see the latter the scene switcher actually tried switching scenes by using obs_frontend_set_current_scene() with the corresponding source.
The scene switcher does not attempt to use obs_frontend_set_current_scene() if the current scene is already the desired scene or the target scene is null.
>Is there a return code that can be checked
There is no return code for obs_frontend_set_current_scene().

When you see "[adv-ss] match for 'audio' ..." logs it means that a condition was matched, but as described above this may not necessarily result in scene change.

>It did however seem to work OK when it was 'live'
I am not sure how that would affect the scene switcher in any way.

As you mentioned quick transitions - Is the problem maybe related to running OBS in "Studio Mode"?
Can you running it without Studio Mode enabled as a quick test.

First of all, thank you for this excellent and very powerful plugin. We have been using it for our church services with great results.

We have a slide show and media sources that we switch between. The script requires viewers to see Slide A, then play a media source, then see Slide B. Currently I do this with this plugin and hotkeys. I have assigned a hotkey to advance the slide and switch to the media source scene. Then, Advanced Scene Switcher switches back to the slide show scene at the end of the video.

Limitations to this are I must use the Cut transition (no fades otherwise the viewer will see Slide B too early), and I cannot use the mouse to switch scenes (must use hotkeys). Is there a better way to do what I'm doing?

Thanks,
Mango
Glad you like the plugin :)

>I must use the Cut transition (no fades otherwise the viewer will see Slide B too early)
So adding a "wait" before triggering a scene change would be useful for you?
If so maybe this build of the plugin might be of interest to you:
MediaWait.PNG

 

qhobbes

Active Member
Is there any way to use this with the Output Timer? Example: Switch to End scene when 10 seconds are left.
 

Warmuptill

Active Member
Is there any way to use this with the Output Timer? Example: Switch to End scene when 10 seconds are left.
Unfortunately I do not think there is any API to interact with the Output Timer so this is not possible (Please let me know if I am wrong).

I guess as a workaround you could create a macro which starts the recording / streaming, waits for a while, switches to scene "End", waits for a while and then stops the recording/streaming.
But you would of course have to make sure to only trigger this once and do not have the remaining showing up in the Output Timer.
 

kellemar

New Member
Hi,

A couple questions since I'm unsure.

For Media switching, what's the different between "Played to End" and "Ended"?

Under Scene Triggers, what is "active" and "Non-active"?
 

Warmuptill

Active Member
Hi,

A couple questions since I'm unsure.

For Media switching, what's the different between "Played to End" and "Ended"?

Under Scene Triggers, what is "active" and "Non-active"?
>For Media switching, what's the different between "Played to End" and "Ended"?
The "Played to End" state is mostly useful for playlist which would trigger the "Ended" state every time the end of an item in the playlist is reached instead of at the end of the complete playlist.

>Under Scene Triggers, what is "active" and "Non-active"?
Assuming you have two scenes "A" and "B" and you are currently showing Scene "A".
Scene "A" would be considered active and scene "B" not active.
 

Warmuptill

Active Member
Warmuptill updated Advanced Scene Switcher with a new update entry:

Add macro tab

Added the Macro tab

Macros will allow you to perform a string of actions based on a combination of conditions.
For example this will allow you to only used audio based scene switching if a certain window is currently in focus.
But the actions are also not limited to just scene switching so you could for example mute your microphone while a media source is playing.​
The macro actions currently supported are:​
  • wait
  • switch scene
  • audio un-/mute /...

Read the rest of this update entry...
 

Alex-1968

New Member
Thank you Warmuptill for creating a very useful and useful plugin. I am a Russian-speaking user, and it is more convenient for me to use the Russian version of the plugin, which has not yet been available. Now I have made a translation and am sharing with everyone who needs the Russian version of this wonderful plugin.


Add the ru-RU.ini file from the archive to the folder along the path:
C:\Program Files\obs-studio\data\obs-plugins\advanced-scene-switcher\locale

Tested on current versions OBS 26.1.1 and 27.0.0 - rc4
Advanced Scene Switcher 1.12
 

Attachments

  • ru-RU.zip
    9.5 KB · Views: 73

Warmuptill

Active Member
Thank you Warmuptill for creating a very useful and useful plugin. I am a Russian-speaking user, and it is more convenient for me to use the Russian version of the plugin, which has not yet been available. Now I have made a translation and am sharing with everyone who needs the Russian version of this wonderful plugin.


Add the ru-RU.ini file from the archive to the folder along the path:
C:\Program Files\obs-studio\data\obs-plugins\advanced-scene-switcher\locale

Tested on current versions OBS 26.1.1 and 27.0.0 - rc4
Advanced Scene Switcher 1.12
Thank you for the kind words!
Would you mind if I integrate your translation into the plugin officially?
 

itsyourapp

New Member
Hi. This plugin is amazing. I love. Thank you!

I have 4 scenes that I want to be cycled through randomly. The Random tab takes care of that wonderfully with "if no switch condition is met for 0 seconds switch to any scene in the Random tab".

Now I want to add one sequence of scenes that can kicked off/triggered. The problem I am having is that no matter how I do (macros, scene groups), the random scene switcher is always fighting with the sequence.

Is this a user error or a bug?
 
Hello Warmuptill!

Would it be possible to extend the "Network" feature by following options:
- include the "Preview" scene as well
- select for what scene what role (client/server) is used - e.g. for "Live" scene act as server, for "Preview" scene act as Client

I have a special use case for that in connection with the new Downstream Keyer from Exeldro, bringing in Graphics dynamically via NDI from a separate laptop. Your implementation would then allow on the "Live Production" laptop to show the graphics first in Preview before keying it on. All graphics handling is offloaded to a separate laptop in my setup
 

Attachments

  • NetworkFunction.PNG
    NetworkFunction.PNG
    81 KB · Views: 32

Warmuptill

Active Member
Hi. This plugin is amazing. I love. Thank you!

I have 4 scenes that I want to be cycled through randomly. The Random tab takes care of that wonderfully with "if no switch condition is met for 0 seconds switch to any scene in the Random tab".

Now I want to add one sequence of scenes that can kicked off/triggered. The problem I am having is that no matter how I do (macros, scene groups), the random scene switcher is always fighting with the sequence.

Is this a user error or a bug?
Can you share the settings which are causing you trouble? (Export on the General tab)
Maybe I can spot the issue you are facing.

Hello Warmuptill!

Would it be possible to extend the "Network" feature by following options:
- include the "Preview" scene as well
- select for what scene what role (client/server) is used - e.g. for "Live" scene act as server, for "Preview" scene act as Client

I have a special use case for that in connection with the new Downstream Keyer from Exeldro, bringing in Graphics dynamically via NDI from a separate laptop. Your implementation would then allow on the "Live Production" laptop to show the graphics first in Preview before keying it on. All graphics handling is offloaded to a separate laptop in my setup
Thanks for the suggestion!
I will look into it.
 

ASchneider

Member
Hello @Warmuptill, thank you very much for this great plugin, now with the macro tab, your solution helped me to get rid of 2 other OBS companion software for automating.

I truly believe that 90% of the functions of your plugin could be transferred to the macro tab and work so much better. Since this is just the beginning, I'm using Noobs Commander (OBS Commands) to create bat files with some actions that are still not supported at the moment, but I'm sure eventually it will be added to it :)

I have just one question/suggestion for you, if you don't mind: opening the current logs window, I could see a couple of macros running over and over because of its trigger matches the current scene. For example: mute an audio output when this scene is currently showing. Since I've set it to run every 1000ms, it keeps muting the output audio at every 1 second. I know that it works since the audio is muted over and over but I have a couple of macros that executes a bat file that I just need it to do it once for every trigger. I also understand that audio level triggers should execute every x milliseconds, makes sense, but maybe an "execute once" or automatic identification of actions that only needs to run once would be brilliant. Also, the logs files at the end of my streams are almost 2mb TXT files haha

Do you think that this could be sorted somehow?

Again, thank you very much for your great work!
 

ExpertOBS

New Member
Hi and thanks for the awesome plugin. Need a little help here. I have all my scenes setup under the media tab to go through 1 -8 scenes, in order. It works great but I frequently need to restart it because it will randomly start switching between ALL random scenes back and forth until I start and stop it several times then randomly it will work and start playing in order from SCENE 1-8 start to end. I dont know what setting it is or what I am doing wrong. Please help as I dont know what setting is causing this or is it a bug?
 

Attachments

  • UntitledSceneSwitch.png
    UntitledSceneSwitch.png
    34.1 KB · Views: 30

Warmuptill

Active Member
Hello @Warmuptill, thank you very much for this great plugin, now with the macro tab, your solution helped me to get rid of 2 other OBS companion software for automating.

I truly believe that 90% of the functions of your plugin could be transferred to the macro tab and work so much better. Since this is just the beginning, I'm using Noobs Commander (OBS Commands) to create bat files with some actions that are still not supported at the moment, but I'm sure eventually it will be added to it :)

I have just one question/suggestion for you, if you don't mind: opening the current logs window, I could see a couple of macros running over and over because of its trigger matches the current scene. For example: mute an audio output when this scene is currently showing. Since I've set it to run every 1000ms, it keeps muting the output audio at every 1 second. I know that it works since the audio is muted over and over but I have a couple of macros that executes a bat file that I just need it to do it once for every trigger. I also understand that audio level triggers should execute every x milliseconds, makes sense, but maybe an "execute once" or automatic identification of actions that only needs to run once would be brilliant. Also, the logs files at the end of my streams are almost 2mb TXT files haha

Do you think that this could be sorted somehow?

Again, thank you very much for your great work!
Thanks for the suggestions!

>some actions that are still not supported at the moment
I would be very much interested in what additional actions you are looking for, so I can improve the plugin!
(I already implemented actions for scene item visibility, global source en-/disable and filter en-/disable options)

>an "execute once" or automatic identification of actions
Great suggestion.
I plan on supporting additional actions which let you pause (or unpause) macros, which could be useful here.
(So the macro can just disable or "pause" itself once it was run)
I also already implemented the "interval" condition which lets you control how often a macro is able to be triggered.

>Also, the logs files at the end of my streams are almost 2mb TXT files haha
Good point :)
I will try to reduce the logging a bit more when not running in verbose mode.

If you want to give the above mentioned features a try you can choose any recent build on GitHub from the master branch.
But these might of course still contain some bugs as they are still under development.

Hi and thanks for the awesome plugin. Need a little help here. I have all my scenes setup under the media tab to go through 1 -8 scenes, in order. It works great but I frequently need to restart it because it will randomly start switching between ALL random scenes back and forth until I start and stop it several times then randomly it will work and start playing in order from SCENE 1-8 start to end. I dont know what setting it is or what I am doing wrong. Please help as I dont know what setting is causing this or is it a bug?
I think the state "Played to End" might work better here.

I think what is happening in the "error" case is that multiple media sources are in the state "ended" at the same time.
Then once the plugin switches to a specified scene the playback for the media source is started again - meaning the condition is which lead to this scene change is no longer true and the next one in the list is checked.
This will trigger another scene switch.
This in turn might lead to the playback that was started by the previous scene switch to end once again.
And this finally results in a loop of seemingly random scene switches.

Let me know if this works!
 

ExpertOBS

New Member
Thanks for the suggestions!

>some actions that are still not supported at the moment
I would be very much interested in what additional actions you are looking for, so I can improve the plugin!
(I already implemented actions for scene item visibility, global source en-/disable and filter en-/disable options)

>an "execute once" or automatic identification of actions
Great suggestion.
I plan on supporting additional actions which let you pause (or unpause) macros, which could be useful here.
(So the macro can just disable or "pause" itself once it was run)
I also already implemented the "interval" condition which lets you control how often a macro is able to be triggered.

>Also, the logs files at the end of my streams are almost 2mb TXT files haha
Good point :)
I will try to reduce the logging a bit more when not running in verbose mode.

If you want to give the above mentioned features a try you can choose any recent build on GitHub from the master branch.
But these might of course still contain some bugs as they are still under development.


I think the state "Played to End" might work better here.

I think what is happening in the "error" case is that multiple media sources are in the state "ended" at the same time.
Then once the plugin switches to a specified scene the playback for the media source is started again - meaning the condition is which lead to this scene change is no longer true and the next one in the list is checked.
This will trigger another scene switch.
This in turn might lead to the playback that was started by the previous scene switch to end once again.
And this finally results in a loop of seemingly random scene switches.

Let me know if this works!
Thank you I will try this!
 
Top