Resource icon

Advanced Scene Switcher 1.25.5

lindenkron

Member
Thanks as always Warmuptill! I'll test it out after this weekends tournament.

I ran the first part of this weekends tournament, went okay! I did come across some stuff I'd like to ask if there's a way to do.

Is there a condition for 'if X application is in focus'? Because I found that my hotkeys that I set, would (obviously) also fire when I went to discord to type to people. Which was slightly inconvenient :D

Hope you have a great weekend.
 

AaronD

Active Member
Is there a condition for 'if X application is in focus'? Because I found that my hotkeys that I set, would (obviously) also fire when I went to discord to type to people. Which was slightly inconvenient :D

There's this is OBS's settings:
1642894847805.png

Does that do the trick?
 

lindenkron

Member
Checked the 'process focus' and it appears to work. Thanks!

Have another small issue I wonder if you know how to optimize. On a 200ms check, this code takes 2 seconds to get checked (before it kicks in) which seems a little weird.
1642948062973.png


Any ideas? :)
 

Warmuptill

Active Member
Checked the 'process focus' and it appears to work. Thanks!

Have another small issue I wonder if you know how to optimize. On a 200ms check, this code takes 2 seconds to get checked (before it kicks in) which seems a little weird.
View attachment 79427

Any ideas? :)
Good to hear that the process condition is working as intended! :)

Hm, strange - can you explain in more detail what you want this condition to achieve?
I doubt that it is a CPU resource issue, but can you double check if you see the following pattern in your OBS log for the affected macro just in case?
"spent X ms in Y condition check of macro 'Z'!"
(Just want to be sure I didn't mess something up in the implementation)
 

lindenkron

Member
I switch between two feeds, on a specific scene (Game Play) and I wasnt it to fade the audio for my game out/in depending on which source (feed) is visible.

15:56:26.695: [adv-ss] detected busy loop - refusing to sleep less than 1ms

All I see.
 

lindenkron

Member
We just finished. I started having strange behaviour where sometimes it would act as if it pressed 'r' twice, or ran both macros one after another.

But I'm having issues consistently reproducing it. It unfortunately resulted in quite a few instances of it switching back to my Observer feed while it wasn't supposed to, when I didn't catch it to switch it again.

Am thinking perhaps some lag issues with 1 or 0 not being set properly and it firing both? Unknown.

Other than that, things went good with adv-ss!
 

lcalder

Member
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)


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.
View attachment 79380
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)


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.
View attachment 79380
I tried the updated advanced scene switcher from Github and it still crashes. I've included the log, crashfile and the advanced-scene-switcher settings files as you requested. Let me know it you need anything else, and thanks so much for your help on this wonderful plugin.
 

Attachments

  • 2022-01-23 23-20-30.txt
    42.2 KB · Views: 14
  • Crash 2022-01-23 23-21-19.txt
    150 KB · Views: 12
  • adv-ss-Piano Lesson Scene Collection RZ0-2022.01.23.23.19.56.txt
    2.9 KB · Views: 11

Warmuptill

Active Member
I tried the updated advanced scene switcher from Github and it still crashes. I've included the log, crashfile and the advanced-scene-switcher settings files as you requested. Let me know it you need anything else, and thanks so much for your help on this wonderful plugin.
Thank you very much for the test, but I think you might have accidentally downloaded the wrong version judging by the version string printed in the log file.
Can you give downloading it another try?
(Sorry, in case I posted the wrong / too many links)
I submitted some other unrelated fixes to the master branch in the mean time so I would suggest to use this build:
The expected version info in the OBS log would be:
19:29:46.166: [adv-ss] version: abd6fd6
19:29:46.166: [adv-ss] version: abd6fd6b7e1f839f1b82bca34e7d8ee69a3aa55c

Update: The newest OBS beta also has the following change, which might make a difference:
  • Fixed a crash that could happen on shutdown with certain third-party plugins
 
Last edited:

Warmuptill

Active Member
I switch between two feeds, on a specific scene (Game Play) and I wasnt it to fade the audio for my game out/in depending on which source (feed) is visible.

15:56:26.695: [adv-ss] detected busy loop - refusing to sleep less than 1ms

All I see.
I see, thanks for the explanation. (The "Or" is intended, right? Or was an "And" intended here?)

Setting up a similar condition on my side does not result in any delay and as you also don't see the "spent X ms in ..." messages I also assume that the duration spent in the condition check is not the issue.

That would leave two possible causes:
  1. An action running in your macro, which is happening before the audio fade, is taking about two second to complete.
  2. Other macros are running before this one and are taking up the time.
  3. A combination of the previous two points
To check the first point you can try to create a copy of the macro (right click on the macro -> Create Copy) and remove all actions beside the audio fade.
To test the second theory try to move the respective macro to the top of the macro list so it is being executed first or just pause all other macros.

Hope that helps to get to the root cause of the delay.

We just finished. I started having strange behaviour where sometimes it would act as if it pressed 'r' twice, or ran both macros one after another.

But I'm having issues consistently reproducing it. It unfortunately resulted in quite a few instances of it switching back to my Observer feed while it wasn't supposed to, when I didn't catch it to switch it again.

Am thinking perhaps some lag issues with 1 or 0 not being set properly and it firing both? Unknown.

Other than that, things went good with adv-ss!
Glad to hear that things went well :)

Regarding the macro when pressing "R".
I would instead suggest to set up the following:

Two macros - one for switching to scene A, a second one for switching to scene B:

SwitchToA.PNG

SwitchToB.PNG


Finally a third macro which will do the toggling:

ToggleAAndB.PNG


The "Run macro in parallel to other macros" is important if you want to avoid the issue of the hotkey presses queueing up and resulting in multiple consecutive scene switches.

Hope that helps!
 

lindenkron

Member
Hey @Warmuptill

That sequence did wonders, so much simpler now. And it doesn't bug at the start like the other one did. Thanks!

I already tried the moving the macro up to the top. And there's nothing else in the actions than "mute", so nothing to clear out.

This is the full macro, and below it an example of timing (you can see the bottom fading and when the button mutes/unmutes).
1643066708938.png


^video of the transitioning.

^example with fade

I'd like it to be a fade mute over 1 second as to follow the fade. The mute is just a test. Issue was that it would *start* fading at the time you see the mute happening in the clip. So those 2 seconds, + 1 second fade means the fading of the video is pretty offset.

Best regards,
-Lind
 
Last edited:

Warmuptill

Active Member
Hey @Warmuptill

That sequence did wonders, so much simpler now. And it doesn't bug at the start like the other one did. Thanks!

I already tried the moving the macro up to the top. And there's nothing else in the actions than "mute", so nothing to clear out.

This is the full macro, and below it an example of timing (you can see the bottom fading and when the button mutes/unmutes).
View attachment 79488

^video of the transitioning.

^example with fade

I'd like it to be a fade mute over 1 second as to follow the fade. The mute is just a test. Issue was that it would *start* fading at the time you see the mute happening in the clip. So those 2 seconds, + 1 second fade means the fading of the video is pretty offset.

Best regards,
-Lind
Ah good to hear that the sequence action is working as expected! :)

Regarding the delay issue I am out of ideas to be honest.
Can you maybe set up a minimal reproduction example in a new scene collection and export the settings you are using to a file? (General tab)
Are you using some special transition type? (You mentioned fade, but asking just in case)
 

lindenkron

Member
Ah good to hear that the sequence action is working as expected! :)

Regarding the delay issue I am out of ideas to be honest.
Can you maybe set up a minimal reproduction example in a new scene collection and export the settings you are using to a file? (General tab)
Are you using some special transition type? (You mentioned fade, but asking just in case)
It's in the detection somewhere. Adding the audio to the macro that does the switching itself works, but the detection one for audio doesn't trigger instantly.

Unfortunately I'd prefer to have all my audio for a specific feed in one place if I can so I don't have to go looking for it in 20-30 macros :3
 

Attachments

  • Test.rar
    4 KB · Views: 13

ZeroEnna

New Member
Hey guys, just a quick question, cause I am unsure if I can do this with the ASS Plugin.

I would like to setup a 24/7 stream. What I want to do is I want to have two inputs. One is a 24/7 automated playlist (Stream 1) the other is a real live stream (Stream 2). What I want to happen is when Stream 2 goes online, I want to switch to this scene, and as soon as that stream goes offline, I want to switch back to Stream 1.
Can I do the monitoring and switching with the Advanced Scene Switcher?

Kind Regards

Zero
 

Warmuptill

Active Member
Hey guys, just a quick question, cause I am unsure if I can do this with the ASS Plugin.

I would like to setup a 24/7 stream. What I want to do is I want to have two inputs. One is a 24/7 automated playlist (Stream 1) the other is a real live stream (Stream 2). What I want to happen is when Stream 2 goes online, I want to switch to this scene, and as soon as that stream goes offline, I want to switch back to Stream 1.
Can I do the monitoring and switching with the Advanced Scene Switcher?

Kind Regards

Zero
You can set up automated scene switches depending on whether or not you are currently streaming, but I am not sure if it would be useful in your case.

Are both Stream 1 and Stream 2 originating from the same OBS instance? (Is that possible?)
Or are these streams just special sources on different scenes inside OBS?
 

ZeroEnna

New Member
They are both RTMP Streams on two different Nginx instances. Or do you know of any other - preferably free - tool that does this kind of monitoring and fallback/backup streaming?
 

ZeroEnna

New Member
To further elaborate it....
Stream 1 would be a scene in OBS with a VLC playlist automated by a third party tool.
Stream 2 would be a media source pointing to the RTMP server.
Biggest challenges so far are to constantly ping the RTMP server to see if the stream is up and to then switch to that scene and again, to go back to the other VLC scene when the RTMP goes down....
 

Warmuptill

Active Member
To further elaborate it....
Stream 1 would be a scene in OBS with a VLC playlist automated by a third party tool.
Stream 2 would be a media source pointing to the RTMP server.
Biggest challenges so far are to constantly ping the RTMP server to see if the stream is up and to then switch to that scene and again, to go back to the other VLC scene when the RTMP goes down....
You could set up a macro to monitor if the "Stream 2" source has changed it's video output recently and if so switch scenes accordingly.
Maybe this example could help:
Alternatively, as Stream 2 is a media source, the "Media" condition might be of use, as maybe the connection state can be identified by the states "Buffering" or "Error".

I could imagine there are probably better tools for this job, but I am not familiar with this topic to know them.
Hope this helped anyway! :)
 

ZeroEnna

New Member
Alternatively, as Stream 2 is a media source, the "Media" condition might be of use, as maybe the connection state can be identified by the states "Buffering" or "Error".

I could imagine there are probably better tools for this job, but I am not familiar with this topic to know them.
Hope this helped anyway! :)
So basically, the plugin is then checking the connection state every xx seconds/milliseconds and keeps remediating that automatically to check if the condition is true or false? That would help big Time!!!
 
Top