Resource icon

Advanced Scene Switcher 1.25.3

Warmuptill

Active Member
Hello again.It's me again.

I've been trying different things and it seems to behave a little differently in different scene situations, such as more or less sources.
I had multiple scenes built with OBS, and the phenomenon was that it was not available in certain scenes, or it could or could not be done in new scenes.
I apologize for not describing it in detail.
Can you please export the settings that are causing issues and share them with me?
Preferably also with the steps to reproduce the issue.
I will then try to replicate it on my end to fix any potential issues.

The option to export the current settings can be found on the Gernal tab.
Thanks!
 

grit60

New Member
  • Alternatively you could try to use pattern matching to decide which scene to switch to, by identifying certain elements in the video call software UI
Guessing but I think his "four participant" Scene has four sources capturing the same window. Each source is cropped to only show one participant. His problem is that when another person shows up (five participants) all of the four windows are messed up because the main window was rearranged. So, he wants to switch to the "five participant" Scene.

Some changes would be needed to get pattern matching to do what he wants. First, pattern match would need to work on a window or display capture source or (NDI source?). Then he would need to a way to match an area of the source. Say for example, the source was a zoom meeting. The pattern match would see that zoom is arranged with four people (probably by matching the black area where no one exists) and switch to the "Four participants" scene. Five people, "five participants" scene and so on.
 

KAIE

New Member
Hi Warmuptill. Thanks for the reply.
Of course, the status of the plugin is Active.

I would like to export the settings and share them with you, but it would include all the other data, so I would like to communicate this in a different way if possible.

I've also tried various things to solve the problem, changing the conditions.
I found that some scenes work and others don't, depending on whether there are multiple scenes or not, and whether there are many or few sources.
For example, triggering using the time difference caused by lag.
I don't think my PC specs are bad, but I'm having trouble with the mystery.

My PC spec:
CPU:AMD Ryzen 9 5950X
MEM:64.0 GB
GraphicsCard:Geforce RTX 3070


Can you please export the settings that are causing issues and share them with me?
Preferably also with the steps to reproduce the issue.
I will then try to replicate it on my end to fix any potential issues.

The option to export the current settings can be found on the Gernal tab.
Thanks!
 

Kniraven

New Member
Guessing but I think his "four participant" Scene has four sources capturing the same window. Each source is cropped to only show one participant. His problem is that when another person shows up (five participants) all of the four windows are messed up because the main window was rearranged. So, he wants to switch to the "five participant" Scene.

Some changes would be needed to get pattern matching to do what he wants. First, pattern match would need to work on a window or display capture source or (NDI source?). Then he would need to a way to match an area of the source. Say for example, the source was a zoom meeting. The pattern match would see that zoom is arranged with four people (probably by matching the black area where no one exists) and switch to the "Four participants" scene. Five people, "five participants" scene and so on.

This is accurate
 

WaveSim

Member
Hi guys!
So appreciate your effort regarding this great plugin.
I just wonder if I can do this action.
I want to start streaming when I set regularly like every Sunday morning at 10:20 AM at the specific scene.
Can't find this action on time or macro tab.

Best regards,
 

Warmuptill

Active Member
Hi guys!
So appreciate your effort regarding this great plugin.
I just wonder if I can do this action.
I want to start streaming when I set regularly like every Sunday morning at 10:20 AM at the specific scene.
Can't find this action on time or macro tab.

Best regards,
Have a look at the "date" macro condition.
That might be able to do what you are looking for.
 

Yulian Min

New Member
I assume that the video source is only updated by OBS if it is actually visible.
What type of video source are you using?
Maybe there are some OBS settings that can tweak this behavior.
I have a "VisioBible" program window, in OBS it is selected as the "window grabber" source.
It looks like this: YouTube Video.

When testing a macro that reacts to image changes, the Bible window was always open.
But the expression only worked when the scene with that source was open in the OBS preview, whether the slide was in focus or not.

So far, I have managed to find one solution: I open the scene with the Bible in a window projector, and in the OBS settings I turned on the launch of projectors along with the program, and it seems to work) I just minimized the projector to the tray and it does not bother me.

But maybe there is some other setting so that you can do without a window projector?
 

Warmuptill

Active Member
Thanks for your reply.
I have checked there however, I can only set one time from there.
I want to use this action regularly as I described.

Thanks again.
Using the reschedule option should do the trick.
Let me know if this works as expected.

Reschedule.PNG

Guessing but I think his "four participant" Scene has four sources capturing the same window. Each source is cropped to only show one participant. His problem is that when another person shows up (five participants) all of the four windows are messed up because the main window was rearranged. So, he wants to switch to the "five participant" Scene.

Some changes would be needed to get pattern matching to do what he wants. First, pattern match would need to work on a window or display capture source or (NDI source?). Then he would need to a way to match an area of the source. Say for example, the source was a zoom meeting. The pattern match would see that zoom is arranged with four people (probably by matching the black area where no one exists) and switch to the "Four participants" scene. Five people, "five participants" scene and so on.
This is accurate
Thanks for the explanation and examples.

Just to clarify:
>pattern match would need to work on a window or display capture source or (NDI source?)
Does this not work?
My expectation would be that any source that can be screenshot can be selected.

>Then he would need to a way to match an area of the source
I will look into an option to provide a "mask" for the pattern matching.

I have a "VisioBible" program window, in OBS it is selected as the "window grabber" source.
It looks like this: YouTube Video.

When testing a macro that reacts to image changes, the Bible window was always open.
But the expression only worked when the scene with that source was open in the OBS preview, whether the slide was in focus or not.

So far, I have managed to find one solution: I open the scene with the Bible in a window projector, and in the OBS settings I turned on the launch of projectors along with the program, and it seems to work) I just minimized the projector to the tray and it does not bother me.

But maybe there is some other setting so that you can do without a window projector?
I will look into it, when I find the time. :)
 

Warmuptill

Active Member
I have a "VisioBible" program window, in OBS it is selected as the "window grabber" source.
It looks like this: YouTube Video.

When testing a macro that reacts to image changes, the Bible window was always open.
But the expression only worked when the scene with that source was open in the OBS preview, whether the slide was in focus or not.

So far, I have managed to find one solution: I open the scene with the Bible in a window projector, and in the OBS settings I turned on the launch of projectors along with the program, and it seems to work) I just minimized the projector to the tray and it does not bother me.

But maybe there is some other setting so that you can do without a window projector?
I had a quick look at the window capture source and as expected the capturing stops if the source is no longer visible.
The last frame that was captured remains as the one that can be grabbed via a screenshot and this frame will not change until the source is active again.

So I am afraid the only "solution" would be to either use the window projector workaround you suggested or add a copy of the source to every relevant scene. (Can be outside of the "canvas" area but the "eye" icon must not be crossed out)

example.PNG
 

WaveSim

Member
Using the reschedule option should do the trick.
Let me know if this works as expected.

View attachment 76088


Thanks for the explanation and examples.

Just to clarify:
>pattern match would need to work on a window or display capture source or (NDI source?)
Does this not work?
My expectation would be that any source that can be screenshot can be selected.

>Then he would need to a way to match an area of the source
I will look into an option to provide a "mask" for the pattern matching.


I will look into it, when I find the time. :)
Thanks !!!
'reschedule' option works well as I expected!. Now I can stream our regular Sunday service on time.
when I see the option at the first time, I think it seems like it will work only one time.
I think the name would be changed like 'repeat every ~~time period~~ ' Just in my opnion.

Thanks again.
 

AaronD

Active Member
Thanks !!!
'reschedule' option works well as I expected!. Now I can stream our regular Sunday service on time.
when I see the option at the first time, I think it seems like it will work only one time.
I think the name would be changed like 'repeat every ~~time period~~ ' Just in my opnion.

Thanks again.

As a different way of doing it, I have a script on our Linux Broadcast machine, that runs on startup. It sets things up that are part of our normal system management (RS232-controlled video switch, for example), and then checks the time and date. If it's Sunday morning before we're scheduled to start, it launches all of those apps: X32 Edit for backup audio control (primary is on a touchscreen Pi), Firefox to monitor the stream, and OBS to produce the stream. Then it checks the time twice a minute while we rehearse. When we're supposed to start streaming, it uses `xdotool` to send the keystrokes that I set up to show the announcement loop, cue up the Welcome video, and start the stream. Then the script finally exits.

(The Macro tab might be a better way to do that now...once OBS is running...but mine was several versions and a couple of learned skills ago, and why change what already works?)

I did the startup externally because the timing features that I saw in OBS at the time were all relative, and I don't trust a relative time to survive a restart, especially if the entire OS has been shut down too.* This script uses the wall clock as an absolute time, and that's it.

* (and intentionally lost power because our USB capture cards require that to fully reset - they lose their minds after a few weeks of constant power, as if a frame counter overflows or something like that - and this motherboard doesn't allow the USB ports to use the switched power...so I have a relay, powered from the switched 12V rail, to interrupt the 5V standby and light an LED instead, and a button to bypass the relay, and the BIOS is set to always turn on after a "power failure")

Ending the stream IS done in OBS: I have an ending scene that is reserved for that purpose alone. Actually several in an automated timed series, which is defined as having been on scene X for Y minutes, then go to scene Z. Eventually, that series gets to a blank scene that I conveniently named "-------------" as a dividing line between the first 8 scenes, which are visible in the grid, and all the rest. That scene is also the trigger to stop the stream.

---

Another HUGE tip, IMO, is to use OBS's setting to automatically start and stop recording along with the stream start and stop. That way, you just keep producing regardless of what goes wrong with the internet, and you have something good to upload later. I've fallen back on that several times.

The key to that though, is to NEVER STOP OBS! Don't do anything to jeopardize that recording, regardless of what you think about the live stream. The problem is probably not with OBS anyway - it's very stable - and it's good about reconnecting when everything else becomes okay again. So there's never a need to reset OBS; keep it running so you at least have a good recording to upload later.
 

WaveSim

Member
As a different way of doing it, I have a script on our Linux Broadcast machine, that runs on startup. It sets things up that are part of our normal system management (RS232-controlled video switch, for example), and then checks the time and date. If it's Sunday morning before we're scheduled to start, it launches all of those apps: X32 Edit for backup audio control (primary is on a touchscreen Pi), Firefox to monitor the stream, and OBS to produce the stream. Then it checks the time twice a minute while we rehearse. When we're supposed to start streaming, it uses `xdotool` to send the keystrokes that I set up to show the announcement loop, cue up the Welcome video, and start the stream. Then the script finally exits.

(The Macro tab might be a better way to do that now...once OBS is running...but mine was several versions and a couple of learned skills ago, and why change what already works?)

I did the startup externally because the timing features that I saw in OBS at the time were all relative, and I don't trust a relative time to survive a restart, especially if the entire OS has been shut down too.* This script uses the wall clock as an absolute time, and that's it.

* (and intentionally lost power because our USB capture cards require that to fully reset - they lose their minds after a few weeks of constant power, as if a frame counter overflows or something like that - and this motherboard doesn't allow the USB ports to use the switched power...so I have a relay, powered from the switched 12V rail, to interrupt the 5V standby and light an LED instead, and a button to bypass the relay, and the BIOS is set to always turn on after a "power failure")

Ending the stream IS done in OBS: I have an ending scene that is reserved for that purpose alone. Actually several in an automated timed series, which is defined as having been on scene X for Y minutes, then go to scene Z. Eventually, that series gets to a blank scene that I conveniently named "-------------" as a dividing line between the first 8 scenes, which are visible in the grid, and all the rest. That scene is also the trigger to stop the stream.

---

Another HUGE tip, IMO, is to use OBS's setting to automatically start and stop recording along with the stream start and stop. That way, you just keep producing regardless of what goes wrong with the internet, and you have something good to upload later. I've fallen back on that several times.

The key to that though, is to NEVER STOP OBS! Don't do anything to jeopardize that recording, regardless of what you think about the live stream. The problem is probably not with OBS anyway - it's very stable - and it's good about reconnecting when everything else becomes okay again. So there's never a need to reset OBS; keep it running so you at least have a good recording to upload later.
Thanks for your long post.
 

Yulian Min

New Member
I had a quick look at the window capture source and as expected the capturing stops if the source is no longer visible.
The last frame that was captured remains as the one that can be grabbed via a screenshot and this frame will not change until the source is active again.

So I am afraid the only "solution" would be to either use the window projector workaround you suggested or add a copy of the source to every relevant scene. (Can be outside of the "canvas" area but the "eye" icon must not be crossed out)

View attachment 76089
I understood. Thank you very much for your time!)
 

grit60

New Member
Just to clarify:
>pattern match would need to work on a window or display capture source or (NDI source?)
Does this not work?
The goal is to match what is seen live on the screen, not from a prerecorded video. I assumed, perhaps wrongly, that Adv. Scene. Switcher only performs pattern matching on Video Sources. How would it match a Display Capture Source?
 

Warmuptill

Active Member
The goal is to match what is seen live on the screen, not from a prerecorded video. I assumed, perhaps wrongly, that Adv. Scene. Switcher only performs pattern matching on Video Sources. How would it match a Display Capture Source?
>How would it match a Display Capture Source?
You just select the Display Capture Source of your choosing in the drop down menu :)
It does not matter whether it is a "live" source or a video being played back from a file.
DisplayCapturePattern.PNG

I am open to renaming this source condition type if there is a better name.

Thanks !!!
'reschedule' option works well as I expected!. Now I can stream our regular Sunday service on time.
when I see the option at the first time, I think it seems like it will work only one time.
I think the name would be changed like 'repeat every ~~time period~~ ' Just in my opnion.

Thanks again.
Thanks for the suggestion - I will adjust this line to make it more clear what it does.
 

grit60

New Member
>How would it match a Display Capture Source?
You just select the Display Capture Source of your choosing in the drop down menu :)
It does not matter whether it is a "live" source or a video being played back from a file.
Ohh! Just when I thought I was an Adv. Scene Switcher expert you come along and teach me something new ;-)
For me personally, merging all of the Sources into "Source" makes the most sense. Barring that, consider renaming
them as "Source State", "Source Match", "Source Audio" and "Source Media".
 

PNO

New Member
@Warmuptill

Great plugin!

Need your assistance. I've got a macro setup which checks the current day of week from a file and have setup a regex to match on the day of week value in the file.

Here's my valid and tested regex:
/^(?:sun(?:day)?|mon(?:day)?|tue(?:sday)?|wed(?:nesday)?|thu(?:rsday)?|fri(?:day)?|sat(?:urday)?)$/i

My understanding is that the macro will take read the value from the file and match using the regex. If match, proceed to the next macro step. Is this correct?
Capture.PNG
 
Last edited:

Warmuptill

Active Member
@Warmuptill

Great plugin!

Need your assistance. I've got a macro setup which checks the current day of week from a file and have setup a regex to match on the day of week value in the file.

Here's my valid and tested regex:
/^(?:sun(?:day)?|mon(?:day)?|tue(?:sday)?|wed(?:nesday)?|thu(?:rsday)?|fri(?:day)?|sat(?:urday)?)$/i

My understanding is that the macro will take read the value from the file and match using the regex. If match, proceed to the next macro step. Is this correct?View attachment 76163
Yes, correct - although I am afraid I don't think using delimiters "/" and specifying flags for the regular expression like "/i" will work.
So you would have to remove these parts of the regular expression.
^(?:sun(?:day)?|mon(?:day)?|tue(?:sday)?|wed(?:nesday)?|thu(?:rsday)?|fri(?:day)?|sat(?:urday)?)$
 
  • Like
Reactions: PNO
Top