Resource icon

Advanced Scene Switcher 1.25.5

iGrayden

New Member
Can I have someone help me install this? What programs do i need to launch instalation becuase I'm trying my best and I'm very new to all this and I'm so frustrated I'm on the verge of tears
 

DominiqueDJOYCE

New Member
I am not sure if I understand your request correctly but for your first point you might want to check out the transition table plugin:

I will add the last point to the todo list.
Thanks for the suggestion!
Yes i will check Transition Tables, sounds good.
And to do lists are efficient.
Thx!!
 

Warmuptill

Active Member
Can I have someone help me install this? What programs do i need to launch instalation becuase I'm trying my best and I'm very new to all this and I'm so frustrated I'm on the verge of tears
What OS and which version of OBS are you using?

For Windows I would recommend just running the file "AdvancedSceneSwitcherSetup.exe".
For Mac just run "SceneSwitcher.pkg".
For Linux it can be more complicated unfortunately and it entirely depends on your setup.

Note that for Windows and Linux you will have to use at least OBS version 25 and for MacOS at least version 26.

If you need further help feel free to send me a message.
 

Warmuptill

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

Add network tab

Additions and changes:
  • Add "Network" tab.

    The network tab allows you to open a web-socket or connect to web-socket to synchronize the active scene between two or more instances of OBS.
    View attachment 69277The functionality is mostly based on https://github.com/Palakis/obs-websocket.
    An OBS instance running a server will send its currently active scene to all connected clients on scene change.
    By default all scene switches will trigger a message to be sent...

Read the rest of this update entry...
 

marcob8986

New Member

Hi I had advanced scene switcher set up to automatically switching from a spash screen to webcam after 1 sec since recording started. This worked for a while.

1616670002222.png


After this update the splash screen is coming back after switiching to the webcam. The behaviour is really strange.

This is the log file

Code:
11:54:14.449: ==== Recording Start ===============================================
11:54:14.449: [ffmpeg muxer: 'simple_file_output'] Writing file 'C:/Users/Marco Braglia.DESKTOP-DMRC5KP/Videos/Registrazioni OBS/2021-03-25 11-54-14.mkv'...
11:54:15.550: User switched to scene 'Webcam Zoom'
11:54:19.003: [ffmpeg muxer: 'simple_file_output'] Output of file 'C:/Users/Marco Braglia.DESKTOP-DMRC5KP/Videos/Registrazioni OBS/2021-03-25 11-54-14.mkv' stopped
11:54:19.003: Output 'simple_file_output': stopping
11:54:19.003: Output 'simple_file_output': Total frames output: 267
11:54:19.003: Output 'simple_file_output': Total drawn frames: 273
11:54:19.006: ==== Recording Stop ================================================
11:54:19.050: warning: 2 frames left in the queue on closing

The problem is even if I switch manually to the webcam scene, the selected scene is highlighted but the preview shows the "spalsh screen".
See below images. How is that even possibile? I have no filters on either scene and no automated switches beyond thiefirst.


1616669843111.png
1616669923516.png



the webcam zoom scense shuld show...the webcam:

1616670224577.png
 

Warmuptill

Active Member
Hi I had advanced scene switcher set up to automatically switching from a spash screen to webcam after 1 sec since recording started. This worked for a while.

View attachment 69314

After this update the splash screen is coming back after switiching to the webcam. The behaviour is really strange.

This is the log file

Code:
11:54:14.449: ==== Recording Start ===============================================
11:54:14.449: [ffmpeg muxer: 'simple_file_output'] Writing file 'C:/Users/Marco Braglia.DESKTOP-DMRC5KP/Videos/Registrazioni OBS/2021-03-25 11-54-14.mkv'...
11:54:15.550: User switched to scene 'Webcam Zoom'
11:54:19.003: [ffmpeg muxer: 'simple_file_output'] Output of file 'C:/Users/Marco Braglia.DESKTOP-DMRC5KP/Videos/Registrazioni OBS/2021-03-25 11-54-14.mkv' stopped
11:54:19.003: Output 'simple_file_output': stopping
11:54:19.003: Output 'simple_file_output': Total frames output: 267
11:54:19.003: Output 'simple_file_output': Total drawn frames: 273
11:54:19.006: ==== Recording Stop ================================================
11:54:19.050: warning: 2 frames left in the queue on closing

The problem is even if I switch manually to the webcam scene, the selected scene is highlighted but the preview shows the "spalsh screen".
See below images. How is that even possibile? I have no filters on either scene and no automated switches beyond thiefirst.


View attachment 69312View attachment 69313


the webcam zoom scense shuld show...the webcam:

View attachment 69315
Just for completeness in case anyone else faces this issue:
This was already clarified in a separate conversation.
The issue was caused by the "default transition" settings.
Increasing the delay resolved the issue.
 

thewitt

Member
Does this run on MacOS Mojave (10.14.6)? It simply crashes OBS on startup in my installation on 26.1.2.
 

Warmuptill

Active Member
Does this run on MacOS Mojave (10.14.6)? It simply crashes OBS on startup in my installation on 26.1.2.
There are apparently some issues with the most recent version of the plugin on MacOS in some circumstances. (Thanks thewitt for pointing this out!)
If you experience crashes on MacOS please use the previous version:

I will update the release once I have identified the issue.
 

Warmuptill

Active Member
Bug?
Upgraded to Advanced Scene Switcher 1.11.1

Audio switching not working.
Obs 26.1.1 64Bit Windows 10
Do you have a log file and more details what you have configured exactly?
(It would be best to enable verbose logging on the general tab and export the plugin settings)
Which version were you using previously?
 

GeoffMC

New Member
I have a default slide show running all the time but when the audio is switched on I want to move to my camera scene. In addition I want to go via a 'introduction' camera scene (which has a 'welcome' banner on), and only switch to the main camera scene when people start talking (i.e. audio above a certain level).
I also want to switch back to the default slide show when the audio is turned off.
(Audio comes from an external audio system)

So I have 2 audio triggers, Audio1 at 28% for 0s ("PTZ-New" = main camera scene), and Audio2 at 0% for 30s ("PTZ+Welcome" = introduction scene). I also have the 'audio_fallback' set to choose the main camera scene.
In addition I have a 'sequence' scene that switches from the main camera scene back to the default slide show ("24Hr+AllMasses") after 2mins.

What I found was that the default slide show would occasionally briefly fade in (only for <1sec), even though the sound was still on. What is the logic between the various categories of tiggers (i.e. Audio and Sequence)? I have the priority set to Audio then Time then Sequence. If audio is currently triggered, does (should) this prevent Sequence being triggered? Under what (audio) contitions could Sequence be triggered? I was hoping it would only be after the audio was competely turned off.
How does the 'interruptable' option come into play here?

Also it would sometimes flip back to the 'introduction' scene (I think when the audio was quiet but NOT for 30secs).
What is the logic when there are 2 audio triggers in this case? If the main scene is triggered but then the audio drops to below that trigger level should the 'introduction' scene get tiggered? and if so should this be only after 30s (in my case) of quiet audio has elapsed?
If the audio is above 28% it is also at the same time above 0% so are they both considered triggered (after being like this for 30s)? If so how so they 'recover' from this situation? What happens when the audio drops below 28% - to me this is when the 2nd audio trigger should start counting its 30s...???
I was expecting that as long as there is audio about 28% at least once every 30secs, then it would just stay on the main camera scene.

I modified the audio triggers slightly to be:
Audio1 23% for 0.5s
Audio2 1% for 30s
(fall-back is still to the 'Audio1' scene)
Sequence still switches from the 'Audio1' scene to the default slide show but now after 5mins (still not 'interruptable')
This seemed to improve things but I still don't really know what the actual logic is to know how best to configure things.
Is there a better way to get/keep the introduction scene up before people start talking (i.e. when audio system is on but there is only background noise)?
Maybe the logging could be enhanced to show exactly what parameters were detected and hence what matched (e.g. "audio above 28% was detected for 0.5s" or "audio fell below 28% for X seconds" or "no audio detected for 30secs so sequence is to be triggered")?
In the log I see 'match for sequence' at the same second as the previous match for Audio - to me there should at least be a 30sec gap before the 'sequence' trigger should kick in?
Log file attached.
Thanks
 

Attachments

  • 2021-04-06-AdvSwitchLog.txt
    379.9 KB · Views: 20

Warmuptill

Active Member
I have a default slide show running all the time but when the audio is switched on I want to move to my camera scene. In addition I want to go via a 'introduction' camera scene (which has a 'welcome' banner on), and only switch to the main camera scene when people start talking (i.e. audio above a certain level).
I also want to switch back to the default slide show when the audio is turned off.
(Audio comes from an external audio system)

So I have 2 audio triggers, Audio1 at 28% for 0s ("PTZ-New" = main camera scene), and Audio2 at 0% for 30s ("PTZ+Welcome" = introduction scene). I also have the 'audio_fallback' set to choose the main camera scene.
In addition I have a 'sequence' scene that switches from the main camera scene back to the default slide show ("24Hr+AllMasses") after 2mins.

What I found was that the default slide show would occasionally briefly fade in (only for <1sec), even though the sound was still on. What is the logic between the various categories of tiggers (i.e. Audio and Sequence)? I have the priority set to Audio then Time then Sequence. If audio is currently triggered, does (should) this prevent Sequence being triggered? Under what (audio) contitions could Sequence be triggered? I was hoping it would only be after the audio was competely turned off.
How does the 'interruptable' option come into play here?

Also it would sometimes flip back to the 'introduction' scene (I think when the audio was quiet but NOT for 30secs).
What is the logic when there are 2 audio triggers in this case? If the main scene is triggered but then the audio drops to below that trigger level should the 'introduction' scene get tiggered? and if so should this be only after 30s (in my case) of quiet audio has elapsed?
If the audio is above 28% it is also at the same time above 0% so are they both considered triggered (after being like this for 30s)? If so how so they 'recover' from this situation? What happens when the audio drops below 28% - to me this is when the 2nd audio trigger should start counting its 30s...???
I was expecting that as long as there is audio about 28% at least once every 30secs, then it would just stay on the main camera scene.

I modified the audio triggers slightly to be:
Audio1 23% for 0.5s
Audio2 1% for 30s
(fall-back is still to the 'Audio1' scene)
Sequence still switches from the 'Audio1' scene to the default slide show but now after 5mins (still not 'interruptable')
This seemed to improve things but I still don't really know what the actual logic is to know how best to configure things.
Is there a better way to get/keep the introduction scene up before people start talking (i.e. when audio system is on but there is only background noise)?
Maybe the logging could be enhanced to show exactly what parameters were detected and hence what matched (e.g. "audio above 28% was detected for 0.5s" or "audio fell below 28% for X seconds" or "no audio detected for 30secs so sequence is to be triggered")?
In the log I see 'match for sequence' at the same second as the previous match for Audio - to me there should at least be a 30sec gap before the 'sequence' trigger should kick in?
Log file attached.
Thanks

>What is the logic between the various categories of tiggers (i.e. Audio and Sequence)? I have the priority set to Audio then Time then Sequence.

The scene switcher performs checks whether it should switch scenes every 300ms.
The order in which the different scene switching methods (audio-, time-, sequence-, video-, file-, ... -based scene switching) are checked is defined in the priority list on the general tab.
The entries for each particular switching method are checked top to bottom.
In your case that means first all entries on the audio tab are checked before the ones on the sequence tab are checked.

>If audio is currently triggered, does (should) this prevent Sequence being triggered?
If a match was found no further checks are performed for the given interval (300ms for you).

>Under what (audio) contitions could Sequence be triggered? I was hoping it would only be after the audio was competely turned off.
A sequence can only be triggered if no audio match was found - assuming audio has a higher priority than sequence.
Maybe you could use the "pause" tab to completely pause the scene sequence checks while you are on scenes on which you expect audio be active still.

>How does the 'interruptable' option come into play here?
The scene sequence has to "wait" before it switches scenes.
The "interruptible" option lets you specify whether or not during this wait time other scene switching check can be performed (meaning the wait can be interrupted) or not (the wait is uninterruptible).
I am not sure what would be more fitting for your exact scenario.

>What is the logic when there are 2 audio triggers in this case?
The order of the entries of the audio tab is important.
The top one is checked first.
You can however also specify a scene to switch to if multiple entries on the audio tab are active at the same time.
This option can be found on the lower parts of the audio tab.

>Is there a better way to get/keep the introduction scene up before people start talking (i.e. when audio system is on but there is only background noise)?
You could pause the scene switcher while on the introduction scene by specifying to stop all checks while on the introduction scene on the pause tab.
Alternatively you could just stop the plugin using a hotkey.

>Maybe the logging could be enhanced
I agree.
Just haven't gotten around to do that :)

>In the log I see 'match for sequence' at the same second as the previous match for Audio - to me there should at least be a 30sec gap before the 'sequence' trigger should kick in?
Maybe there is a slight misunderstanding on how the plugin checks the audio conditions.
The duration you specified for the audio entry does not "block" all other switching methods to be checked for this amount of time and then decide whether it should switch the scene or not.
Instead all checks are performed roughly every 300ms and only if the audio tab entry condition was true 100 times in a row will the scene be switched. (100 * 300ms = 30s)
During this time other switching methods can still result in a match and thus a scene switch.

I am not sure if it is relevant for you case but there is also an option on the general tab to set a "cooldown period" after a scene switch, to prevent rapid scene changes.
This will mean that at least x amount of time has to pass before the next automated scene change can happen.

I hope that answered at least some of your questions.
Let me know if there is anything that is not clear yet.

If you do further questions please also export your current settings and share them?
(The option to do so can be found on the General tab)
This makes it a bit easier to look for potential configuration problems.
 
Last edited:

Warmuptill

Active Member
Ok, I got another question... When I setup switching scene, after my video media source is about to end (1 Second before end), I jump to the previous scene, using a different transition, as my "default" one. But after triggering this automatic scene switch, my currently selected transition changes to that, which was defined on media end hook. I was expecting, that after specified transition is done, it would jump back to the default defined, and not overwrite this.
I found a workaround for this, by defining my "default" transition, when I come to the specific scene, from which I actually jump to the scene with the video media source. But I think this behavior may be changed, so it makes more sense to users? I don't know...
In case it is still relevant for you:
With the most recent update I added the option to rely solely on transition overrides for transitions triggered by the plugin - so without changing the active transition selection.
 

GeoffMC

New Member
>What is the logic between the various categories of tiggers (i.e. Audio and Sequence)? I have the priority set to Audio then Time then Sequence.

The scene switcher performs checks whether it should switch scenes every 300ms.
The order in which the different scene switching methods (audio-, time-, sequence-, video-, file-, ... -based scene switching) are checked is defined in the priority list on the general tab.
The entries for each particular switching method are checked top to bottom.
In your case that means first all entries on the audio tab are checked before the ones on the sequence tab are checked.

>If audio is currently triggered, does (should) this prevent Sequence being triggered?
If a match was found no further checks are performed for the given interval (300ms for you).

>Under what (audio) contitions could Sequence be triggered? I was hoping it would only be after the audio was competely turned off.
A sequence can only be triggered if no audio match was found - assuming audio has a higher priority than sequence.
Maybe you could use the "pause" tab to completely pause the scene sequence checks while you are on scenes on which you expect audio be active still.

>How does the 'interruptable' option come into play here?
The scene sequence has to "wait" before it switches scenes.
The "interruptible" option lets you specify whether or not during this wait time other scene switching check can be performed (meaning the wait can be interrupted) or not (the wait is uninterruptible).
I am not sure what would be more fitting for your exact scenario.

>What is the logic when there are 2 audio triggers in this case?
The order of the entries of the audio tab is important.
The top one is checked first.
You can however also specify a scene to switch to if multiple entries on the audio tab are active at the same time.
This option can be found on the lower parts of the audio tab.

>Is there a better way to get/keep the introduction scene up before people start talking (i.e. when audio system is on but there is only background noise)?
You could pause the scene switcher while on the introduction scene by specifying to stop all checks while on the introduction scene on the pause tab.
Alternatively you could just stop the plugin using a hotkey.

>Maybe the logging could be enhanced
I agree.
Just haven't gotten around to do that :)

>In the log I see 'match for sequence' at the same second as the previous match for Audio - to me there should at least be a 30sec gap before the 'sequence' trigger should kick in?
Maybe there is a slight misunderstanding on how the plugin checks the audio conditions.
The duration you specified for the audio entry does not "block" all other switching methods to be checked for this amount of time and then decide whether it should switch the scene or not.
Instead all checks are performed roughly every 300ms and only if the audio tab entry condition was true 100 times in a row will the scene be switched. (100 * 300ms = 30s)
During this time other switching methods can still result in a match and thus a scene switch.

I am not sure if it is relevant for you case but there is also an option on the general tab to set a "cooldown period" after a scene switch, to prevent rapid scene changes.
This will mean that at least x amount of time has to pass before the next automated scene change can happen.

I hope that answered at least some of your questions.
Let me know if there is anything that is not clear yet.

If you do further questions please also export your current settings and share them?
(The option to do so can be found on the General tab)
This makes it a bit easier to look for potential configuration problems.
Thanks for all this information it is useful.
However even after taking on board what you have said so for I still see 'unexplained behaviour' in the switching in that I still can't explain why it switches on my 2nd Audio trigger when it does as I believe it should still be switching on the 1st Audio trigger - I will monitor the situation more closely and then provide you with the logs and settings and a dialog of what happened so you can check and comment.
However this morning I started the Adv-ss and it switched/triggered on 'Audio1' but the audio isn't on and certainly isn't above the 23% threshold - can you explain this please? here is the relevant log extract:

09:10:22.689: User switched to scene '24Hr+AllMasses'
09:16:30.113: [adv-ss] started
09:16:30.113: [adv-ss] try to sleep for 500
09:16:30.621: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'
09:16:30.663: warning: deprecated pixel format used, make sure you did set range correctly
09:16:30.697: [window-capture: '(null)'] update settings:
09:16:30.697: executable: POWERPNT.EXE
09:16:30.697: method selected: WGC
09:16:30.697: method chosen: WGC
09:16:30.697:
09:16:30.730: [adv-ss] switched scene
09:16:30.731: [adv-ss] try to sleep for 384
09:16:31.147: [adv-ss] try to sleep for 468
....
09:16:45.158: [adv-ss] try to sleep for 480
09:16:45.658: [adv-ss] try to sleep for 480
09:21:32.132: Last log entry repeated for 570 more lines
09:21:32.132: [adv-ss] match for 'sequence' - switch to scene '24Hr+AllMasses'
 

Attachments

  • OBS-SceneSequences-13Apr21.txt
    3.2 KB · Views: 16

Warmuptill

Active Member
Thanks for all this information it is useful.
However even after taking on board what you have said so for I still see 'unexplained behaviour' in the switching in that I still can't explain why it switches on my 2nd Audio trigger when it does as I believe it should still be switching on the 1st Audio trigger - I will monitor the situation more closely and then provide you with the logs and settings and a dialog of what happened so you can check and comment.
However this morning I started the Adv-ss and it switched/triggered on 'Audio1' but the audio isn't on and certainly isn't above the 23% threshold - can you explain this please? here is the relevant log extract:

09:10:22.689: User switched to scene '24Hr+AllMasses'
09:16:30.113: [adv-ss] started
09:16:30.113: [adv-ss] try to sleep for 500
09:16:30.621: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'
09:16:30.663: warning: deprecated pixel format used, make sure you did set range correctly
09:16:30.697: [window-capture: '(null)'] update settings:
09:16:30.697: executable: POWERPNT.EXE
09:16:30.697: method selected: WGC
09:16:30.697: method chosen: WGC
09:16:30.697:
09:16:30.730: [adv-ss] switched scene
09:16:30.731: [adv-ss] try to sleep for 384
09:16:31.147: [adv-ss] try to sleep for 468
....
09:16:45.158: [adv-ss] try to sleep for 480
09:16:45.658: [adv-ss] try to sleep for 480
09:21:32.132: Last log entry repeated for 570 more lines
09:21:32.132: [adv-ss] match for 'sequence' - switch to scene '24Hr+AllMasses'
What do you mean by "but the audio isn't on and certainly isn't above the 23% threshold"?
Is the source muted or is the audio source just currently part of the active scene?

In either of those cases the volume threshold is still checked.
If you don't want to check the volume of an audio source while it is not currently active you can use the checkbox to the right of each audio tab entry to specify that.

Could that explain the observed behavior?
 

GeoffMC

New Member
What do you mean by "but the audio isn't on and certainly isn't above the 23% threshold"?
Is the source muted or is the audio source just currently part of the active scene?

In either of those cases the volume threshold is still checked.
If you don't want to check the volume of an audio source while it is not currently active you can use the checkbox to the right of each audio tab entry to specify that.

Could that explain the observed behavior?
So the laptop has an external audio box connected by USB . This box is fed from the sound system in the building. The sound system is normally powered off. This means there is absolutely no audio on this 'Onyx-Main' device until the audio system is powered on (which is when we want to swich to the camera).
From my exported 'settings' file (also attached) I see the option "ignoreInactiveSource": true for this audio device/trigger, which means that the volume of this device isn't checked when the audio isn't active - although what does 'active' mean in this context? How and when does the audio become 'active' (or inactive)?

I'm attaching the log from yesterday's session (zipped) along with the exported settings.
The external audio system was switched on at 11:52 which is when Audio1 1st matches (=PTZ-New scene) and it is turned off at 12:30.
The adv-ss is started at 09:30
1hr later (3600s) we see the "non_matching_scene" (=24Hr+AllMasses) triggering (although the log entry doesn't confirm which trigger or scene this was!):
09:38:26.453: [adv-ss] try to sleep for 470
10:30:31.744: Last log entry repeated for 6241 more lines
10:30:31.894: [adv-ss] switched scene
10:30:31.894: [adv-ss] try to sleep for 322
10:30:32.227: [adv-ss] cooldown active - ignoring match
10:30:32.227: [adv-ss] try to sleep for 490
10:30:32.726: [adv-ss] cooldown active - ignoring match
-> but what match is it ignoring (every 500ms)?
The 'cooldown active - ignoring match' message is then repeated continuously for 1h22m until we see the 1st Audio trigger match (when the external audio is switched on):
11:52:32.319: [adv-ss] cooldown active - ignoring match
11:52:32.320: [adv-ss] try to sleep for 492
11:52:32.818: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'
11:52:32.818: [adv-ss] cooldown active - ignoring match
(Note it still seems to be ignoring some other match???)
Then a minute later we have 'audio-fallback' kicking in - which indicates that both audio triggers matched - and indeed my 2nd audio trigger (PTZ-Welcome) currently has a 60sec delay so this explains that behaviour:
11:53:39.904: [adv-ss] try to sleep for 487
11:53:40.403: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'
11:53:40.403: [adv-ss] match for 'audio_fallback' - switch to scene 'PTZ-New'
11:53:40.403: [adv-ss] cooldown active - ignoring match
11:53:40.403: [adv-ss] try to sleep for 489
-> however this 'audio_fallback' situation then continues every 500ms (my check interval) for the next 25mins. This suggests that both audio sources continually match - I would have thought that the Audio2 match time (60s) would be 'reset' after a match/scene switch (in this case the Audio1 match + the audio_fallback aspect) so that Audio2 should re-start counting its 60s again only after this match???
In fact to me the Audio2 trigger timer should be reset whenenver Audio1 matches - so that my Audio2 trigger can only kick in after a 60sec period of nothing triggering audio1 (i.e. nothing above the volume threshold I have set for Audio1 for a continuous 60secs) - if this isn't the current behaviour what would be the problem in making it behave like this? Would it break some other logic?

Now during this 25mins section I also see "cooldown active - ignoring match" which is also continually every 500ms. Surely since the cooldown is set to 5s there should be a 5sec gap before new checks are done??? Otherwise what is this cooldown doing? What is going on during this cooldown period? Are counters/timers for the audio checks still going on or are they 'held' for the cooldown duration?

At the end, the external audio is switched off at 12:25 and we then just (only) see the 'try to sleep' messages for the next 5mins followed by:
12:25:55.163: [adv-ss] try to sleep for 485
12:30:41.016: Last log entry repeated for 570 more lines
12:30:41.017: [adv-ss] match for 'sequence' - switch to scene '24Hr+AllMasses'
12:30:41.212: [adv-ss] switched scene
12:30:41.212: [adv-ss] try to sleep for 283
-> which is as expected as 'sceneRoundTrip' is set to swtich from PTZ-New to "24Hr+AllMasses" after 300s (5mins)
Then we see 'try to sleep' for the next 60mins after which we start seeing the 'cooldown active' messages again!
These messages continue for the remainder of the log:
12:30:56.025: [adv-ss] try to sleep for 489
13:30:46.433: Last log entry repeated for 7171 more lines
13:30:46.433: [adv-ss] cooldown active - ignoring match
13:30:46.433: [adv-ss] try to sleep for 488
-> So what is happening here? Why do set start seeing the 'cooldown active' messages again?
The only thing I know of that is set for 1hr is the "non_matching_scene" trigger - and since the scene was already on the '24Hr+AllMasses' scene there would have been no actual scene switch required. Does this explain the 'cooldown active' messages somehow?

I can also see 2 brief matches/switches for the Audio2 trigger (PTZ-Welcome scene). Presumably it went quiet here - below the 23% threshold for Audio1 - so that the Audio2 was able to match. But it then immediately goes back to PTZ-New as Audio1 then does match.
So if Audio1 matched at 12:11:08 and again 1sec later at 12:11:09 how did Audio2 get in inbetween these matches when a) Audio2 has a 60sec timer and b) the 'cooldown' timer is set to 5secs?!?!
12:11:08.639: [adv-ss] match for 'audio_fallback' - switch to scene 'PTZ-New'
12:11:08.639: [adv-ss] cooldown active - ignoring match
12:11:08.639: [adv-ss] try to sleep for 489
12:11:09.138: [adv-ss] match for 'audio' - switch to scene 'PTZ+Welcome'
12:11:09.143: [adv-ss] switched scene
12:11:09.143: [adv-ss] try to sleep for 486
12:11:09.643: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'

12:14:57.415: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'
12:14:57.415: [adv-ss] match for 'audio_fallback' - switch to scene 'PTZ-New'
12:14:57.415: [adv-ss] cooldown active - ignoring match
12:14:57.415: [adv-ss] try to sleep for 495
12:14:57.916: [adv-ss] match for 'audio' - switch to scene 'PTZ+Welcome'
12:14:57.916: [adv-ss] cooldown active - ignoring match
12:14:57.916: [adv-ss] try to sleep for 495
12:14:58.416: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'

Please could you explain what is happening above as I want to know how to control Audio1 and Audio2 better.
Ultimately I want the Audio2 trigger (PTZ-Welcome) to only kick in when the audio is on but there is only background noise. Once people start talking into the microphones I want Audio1 (PTZ-New) to override Audio2 and keep the 'PTZ-New' scene active (and to NOT go back to PTZ-Welcome when the audio drops below the threshold only for short time). I think it should be possible to adjust the volume levels/timers to achieve this but so far I have too many unexplained behaviours to be able to work this out.
Thanks.
 

Attachments

  • AdvSceneSwitchSettings_14Apr21.txt
    3.2 KB · Views: 19
  • 2021-04-13 09-30-19_2.zip
    182.8 KB · Views: 18

Warmuptill

Active Member
So the laptop has an external audio box connected by USB . This box is fed from the sound system in the building. The sound system is normally powered off. This means there is absolutely no audio on this 'Onyx-Main' device until the audio system is powered on (which is when we want to swich to the camera).
From my exported 'settings' file (also attached) I see the option "ignoreInactiveSource": true for this audio device/trigger, which means that the volume of this device isn't checked when the audio isn't active - although what does 'active' mean in this context? How and when does the audio become 'active' (or inactive)?

I'm attaching the log from yesterday's session (zipped) along with the exported settings.
The external audio system was switched on at 11:52 which is when Audio1 1st matches (=PTZ-New scene) and it is turned off at 12:30.
The adv-ss is started at 09:30
1hr later (3600s) we see the "non_matching_scene" (=24Hr+AllMasses) triggering (although the log entry doesn't confirm which trigger or scene this was!):
09:38:26.453: [adv-ss] try to sleep for 470
10:30:31.744: Last log entry repeated for 6241 more lines
10:30:31.894: [adv-ss] switched scene
10:30:31.894: [adv-ss] try to sleep for 322
10:30:32.227: [adv-ss] cooldown active - ignoring match
10:30:32.227: [adv-ss] try to sleep for 490
10:30:32.726: [adv-ss] cooldown active - ignoring match
-> but what match is it ignoring (every 500ms)?
The 'cooldown active - ignoring match' message is then repeated continuously for 1h22m until we see the 1st Audio trigger match (when the external audio is switched on):
11:52:32.319: [adv-ss] cooldown active - ignoring match
11:52:32.320: [adv-ss] try to sleep for 492
11:52:32.818: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'
11:52:32.818: [adv-ss] cooldown active - ignoring match
(Note it still seems to be ignoring some other match???)
Then a minute later we have 'audio-fallback' kicking in - which indicates that both audio triggers matched - and indeed my 2nd audio trigger (PTZ-Welcome) currently has a 60sec delay so this explains that behaviour:
11:53:39.904: [adv-ss] try to sleep for 487
11:53:40.403: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'
11:53:40.403: [adv-ss] match for 'audio_fallback' - switch to scene 'PTZ-New'
11:53:40.403: [adv-ss] cooldown active - ignoring match
11:53:40.403: [adv-ss] try to sleep for 489
-> however this 'audio_fallback' situation then continues every 500ms (my check interval) for the next 25mins. This suggests that both audio sources continually match - I would have thought that the Audio2 match time (60s) would be 'reset' after a match/scene switch (in this case the Audio1 match + the audio_fallback aspect) so that Audio2 should re-start counting its 60s again only after this match???
In fact to me the Audio2 trigger timer should be reset whenenver Audio1 matches - so that my Audio2 trigger can only kick in after a 60sec period of nothing triggering audio1 (i.e. nothing above the volume threshold I have set for Audio1 for a continuous 60secs) - if this isn't the current behaviour what would be the problem in making it behave like this? Would it break some other logic?

Now during this 25mins section I also see "cooldown active - ignoring match" which is also continually every 500ms. Surely since the cooldown is set to 5s there should be a 5sec gap before new checks are done??? Otherwise what is this cooldown doing? What is going on during this cooldown period? Are counters/timers for the audio checks still going on or are they 'held' for the cooldown duration?

At the end, the external audio is switched off at 12:25 and we then just (only) see the 'try to sleep' messages for the next 5mins followed by:
12:25:55.163: [adv-ss] try to sleep for 485
12:30:41.016: Last log entry repeated for 570 more lines
12:30:41.017: [adv-ss] match for 'sequence' - switch to scene '24Hr+AllMasses'
12:30:41.212: [adv-ss] switched scene
12:30:41.212: [adv-ss] try to sleep for 283
-> which is as expected as 'sceneRoundTrip' is set to swtich from PTZ-New to "24Hr+AllMasses" after 300s (5mins)
Then we see 'try to sleep' for the next 60mins after which we start seeing the 'cooldown active' messages again!
These messages continue for the remainder of the log:
12:30:56.025: [adv-ss] try to sleep for 489
13:30:46.433: Last log entry repeated for 7171 more lines
13:30:46.433: [adv-ss] cooldown active - ignoring match
13:30:46.433: [adv-ss] try to sleep for 488
-> So what is happening here? Why do set start seeing the 'cooldown active' messages again?
The only thing I know of that is set for 1hr is the "non_matching_scene" trigger - and since the scene was already on the '24Hr+AllMasses' scene there would have been no actual scene switch required. Does this explain the 'cooldown active' messages somehow?

I can also see 2 brief matches/switches for the Audio2 trigger (PTZ-Welcome scene). Presumably it went quiet here - below the 23% threshold for Audio1 - so that the Audio2 was able to match. But it then immediately goes back to PTZ-New as Audio1 then does match.
So if Audio1 matched at 12:11:08 and again 1sec later at 12:11:09 how did Audio2 get in inbetween these matches when a) Audio2 has a 60sec timer and b) the 'cooldown' timer is set to 5secs?!?!
12:11:08.639: [adv-ss] match for 'audio_fallback' - switch to scene 'PTZ-New'
12:11:08.639: [adv-ss] cooldown active - ignoring match
12:11:08.639: [adv-ss] try to sleep for 489
12:11:09.138: [adv-ss] match for 'audio' - switch to scene 'PTZ+Welcome'
12:11:09.143: [adv-ss] switched scene
12:11:09.143: [adv-ss] try to sleep for 486
12:11:09.643: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'

12:14:57.415: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'
12:14:57.415: [adv-ss] match for 'audio_fallback' - switch to scene 'PTZ-New'
12:14:57.415: [adv-ss] cooldown active - ignoring match
12:14:57.415: [adv-ss] try to sleep for 495
12:14:57.916: [adv-ss] match for 'audio' - switch to scene 'PTZ+Welcome'
12:14:57.916: [adv-ss] cooldown active - ignoring match
12:14:57.916: [adv-ss] try to sleep for 495
12:14:58.416: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'

Please could you explain what is happening above as I want to know how to control Audio1 and Audio2 better.
Ultimately I want the Audio2 trigger (PTZ-Welcome) to only kick in when the audio is on but there is only background noise. Once people start talking into the microphones I want Audio1 (PTZ-New) to override Audio2 and keep the 'PTZ-New' scene active (and to NOT go back to PTZ-Welcome when the audio drops below the threshold only for short time). I think it should be possible to adjust the volume levels/timers to achieve this but so far I have too many unexplained behaviours to be able to work this out.
Thanks.
>How and when does the audio become 'active' (or inactive)?

I think this depends on whether or not the audio source is part of the currently active scene, but I am not 100% sure.
I am just calling obs_source_active() to decide whether or not to check the volume of the specified source.

> but what match is it ignoring (every 500ms)?

This is most likely the scene switch triggered if no condition is matched at all.

>This suggests that both audio sources continually match - I would have thought that the Audio2 match time (60s) would be 'reset' after a match/scene switch (in this case the Audio1 match + the audio_fallback aspect) so that Audio2 should re-start counting its 60s again only after this match???

This is not the case.
You have to see the duration field as an "at least for x duration, but including values after x".
The time only resets if the specified volume threshold is no longer reached.

>what would be the problem in making it behave like this? Would it break some other logic?

Changing it would definitively break some existing use cases which rely on the current implementation.
It might not even work in your specific use case as you have specified a scene to switch to if no condition is met.
(You would then only stay on your audio scene for 500ms before switching back to the scene to switch to if no condition is met)

>Surely since the cooldown is set to 5s there should be a 5sec gap before new checks are done???
>Are counters/timers for the audio checks still going on or are they 'held' for the cooldown duration?

Checks are still performed, but matches are ignored.
The reason being that counter are still incremented correctly each loop.

> [...] But it then immediately goes back to PTZ-New as Audio1 then does match.
>So if Audio1 matched at 12:11:08 and again 1sec later at 12:11:09 how did Audio2 get in inbetween these matches when a) Audio2 has a 60sec timer and b) the 'cooldown' timer is set to 5secs?!?!

The scene is only switched whenever you see this message:
[adv-ss] switched scene
So just as you expected there was only a scene change every 5 seconds.
(As mentioned above the conditions are still checked during the "cooldown", but no scene change is happening)


I assume to get this to always work exactly like you expect you would need to be able to combine conditions.
This is not currently possible but was requested a few times already.
I am looking into it, but I can't promise anything anytime soon yet.

Maybe you could also use "scene groups" for Audio2 to achieve to get closer to what you are looking for.
This scene group would then only switch to "PTZ-Welcome" for a specified amount of time and after that switch to "PTZ-New".

I hope that helps!
 
Last edited:

Alex-1968

New Member
Нет ни у кого перевода этого плагина на русский язык?
No one has a translation of this plugin into Russian?

Или подробной инструкции по пользованию на русском языке?
Or detailed instructions for use in Russian?
 
Top