Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

Hemmie

New Member
Hi, I am a newbee on OBS and have tried to use this plugin on two instances of OBS on Windows10.

But unfortunately only the plugin works on the OBS instance which is first launched after installing the plugin. On the other instance of OBS I can setup the plugin, start it but no task is performed

How can I get the plugin working on each instance of OBS ?
 

Warmuptill

Active Member
Hi, I am a newbee on OBS and have tried to use this plugin on two instances of OBS on Windows10.

But unfortunately only the plugin works on the OBS instance which is first launched after installing the plugin. On the other instance of OBS I can setup the plugin, start it but no task is performed

How can I get the plugin working on each instance of OBS ?
Hm strange.
In theory there should be nothing preventing the plugin from being run multiple times each across separate OBS instances.
Can you provide an OBS log file of the second instance, which is not performing its tasks?
Please make sure to enable verobse logging. (The option can be found on the General tab)
 

Hemmie

New Member
Warmuptill, here are the logs you asked for.

In order not to be burden you with irrelevant matters, I restarted the PC and performed a new experiment:

=================================================
First OBS instance launched
Added simple Time based scene switching event (on 00:05:00)
Started plugin
Waited upto 00:06, nothing happens !!
Upload the log: first OBS instance log
==================================================



=================================================================================================
Second OBS instance launched
Select profile / scene (step is necessary because the second instance opens with the profile/scene setting from the first instance)

Stopped plugin (remark: strange the plugin is already running, I am sure I stopped it last time)
Added two simple Time based scene switching event (on 00:11:00 and 00:12:00)

Started plugin
Waited upto 00:13, nothing happens !!
Upload the log: second OBS instance log
=================================================================================================


What remarkable is that the plugin no longer appears to work at all on both instances
My conclusion is that the plugin only worked for the very first time (after installation) when I opened only one instance

Herman
 

Warmuptill

Active Member
According to the log files your system time is Current Date/Time: 2022-01-27, 00:02:25 for the first log and it ends at 00:04:11.547.
So just outside of your configured time.
Similarily the second log starts at Current Date/Time: 2022-01-27, 00:08:16 and ends at 00:09:41.022, before the configured scene switches.

Just to clarify:
Is your intention to switch scenes based on the current system time or based on the amount of time OBS is is running already?
(I would recommend to use the Macro tab's date condition / timer condition, but that's not strictly necessary)

What remarkable is that the plugin no longer appears to work at all on both instances
Note that if you are not running one or both of the OBS instances in "portable mode" both instances might use the rely on the same configuration files and overwrite each other.

Remark: strange the plugin is already running, I am sure I stopped it last time
The startup behaviour of the plugin can be configured on the General tab.
 

Hemmie

New Member
Sorry Sorry Sorry, it's all my fault, I forgot to select the "scene transition" !
It seems everything is working now.

Not a good turn from me the first time on this forum.

Thanks for your help.
 

RoGra

New Member
Hi Warmuptill,

Is it possible to add (week)day and time option to Macro section of the switcher? That makes it little bit simpler for planning and clearer.

Something like as in this picture :)

Scene switcher weekday.png


Regards,
RoGra
 

Warmuptill

Active Member
Hi Warmuptill,

Is it possible to add (week)day and time option to Macro section of the switcher? That makes it little bit simpler for planning and clearer.

Something like as in this picture :)

View attachment 79598

Regards,
RoGra
Hello!
The macro section supports the "Date" condition type which should allow you configure what you are looking to do.
date.PNG
 

RoGra

New Member
Hello!
The macro section supports the "Date" condition type which should allow you configure what you are looking to do.
View attachment 79599

Hello,

Yes that's correctly and i know about this Date option. We use your plugin for a TV channel, and for overview it's finer to
plan the macro's on weekdays and time (as i described in my image above) Then you can add one or multiple weekdays with
times, such as 'Time' tab.

Regards,
RoGra
 

Warmuptill

Active Member
Hello,

Yes that's correctly and i know about this Date option. We use your plugin for a TV channel, and for overview it's finer to
plan the macro's on weekdays and time (as i described in my image above) Then you can add one or multiple weekdays with
times, such as 'Time' tab.

Regards,
RoGra
I see - Thanks for the clarification!
I will add it to the todo list.
 

Kretis

New Member
Hey,

Firstly I would like to say that I really appreciate your work and this plugin especially!
I was wondering if it is possible to make the macro "file" able to read one specific line of text out of a file that contains multiple lines of text? For example if the text file had text:

Toplaner level 6
Midlaner level 5

Currently (at least I don't know how to make it work) the file has to state exactly what you write into the file macro writing zone. So I have to make tens of macros and tens of text files to make it do what I'm trying to accomplish. So theoretically if I added a rule that "if file matches midlane level 6 show source X" and then make another macro stating "if file matches toplane level 6 show source Y" all from one text file instead of making separate text files for all the macros.
 

Warmuptill

Active Member
Hey,

Firstly I would like to say that I really appreciate your work and this plugin especially!
I was wondering if it is possible to make the macro "file" able to read one specific line of text out of a file that contains multiple lines of text? For example if the text file had text:

Toplaner level 6
Midlaner level 5

Currently (at least I don't know how to make it work) the file has to state exactly what you write into the file macro writing zone. So I have to make tens of macros and tens of text files to make it do what I'm trying to accomplish. So theoretically if I added a rule that "if file matches midlane level 6 show source X" and then make another macro stating "if file matches toplane level 6 show source Y" all from one text file instead of making separate text files for all the macros.
You can use "regular expressions" to achieve what you are looking to do.

FileRegex.PNG


Assuming you have a file with these contents:
Code:
line1
line2
line3
...

For example, if you would want to match the second line in particular and ignore whatever is part of line1 or line3 you can use this pattern:
.*\r\nline2\r\n.*

To match the contents of the third line only you could use:
.*\r\n.*\r\nline3\r\n.*

Explanation:
  • .* translates to match anything at all.
  • The sequence \r\n matches a new line.
So the above to examples would translate to:
  • Match anything at all followed by a new line, followed by the string "line2", followed by a new line, followed by anything at all
  • Match anything at all followed by a new line, followed by anything at all, followed by a new line, followed by the string "line3", followed by a new line, followed by anything at all.

Notes:
  • The examples above assume you are on Windows and are using default line endings.
    Different operating systems might use different characters to indicate line endings by default.
  • The above examples have limitations as ".*" could also match a new line, which could cause issues if you have empty lines.
  • Regular expressions can be very complex.
    You can use websites like https://regex101.com/ to experiment rather easily with different expressions.
Hope that helped! :)
 

Gitago

Member
is there any way to find/track which macro is triggering at any certain time?

I have a bit of macros set up that worked fine previously, but I recently updated and now my macros are not working properly and theres so many i need to figure out whats triggering so i can put a stop to it.
 

Kretis

New Member
You can use "regular expressions" to achieve what you are looking to do.

View attachment 79643

Assuming you have a file with these contents:
Code:
line1
line2
line3
...

For example, if you would want to match the second line in particular and ignore whatever is part of line1 or line3 you can use this pattern:
.*\r\nline2\r\n.*

To match the contents of the third line only you could use:
.*\r\n.*\r\nline3\r\n.*

Explanation:
  • .* translates to match anything at all.
  • The sequence \r\n matches a new line.
So the above to examples would translate to:
  • Match anything at all followed by a new line, followed by the string "line2", followed by a new line, followed by anything at all
  • Match anything at all followed by a new line, followed by anything at all, followed by a new line, followed by the string "line3", followed by a new line, followed by anything at all.

Notes:
  • The examples above assume you are on Windows and are using default line endings.
    Different operating systems might use different characters to indicate line endings by default.
  • The above examples have limitations as ".*" could also match a new line, which could cause issues if you have empty lines.
  • Regular expressions can be very complex.
    You can use websites like https://regex101.com/ to experiment rather easily with different expressions.
Hope that helped! :)


Absolute lifesaver, thank you so much for your help and fast response!
 

Warmuptill

Active Member
is there any way to find/track which macro is triggering at any certain time?

I have a bit of macros set up that worked fine previously, but I recently updated and now my macros are not working properly and theres so many i need to figure out whats triggering so i can put a stop to it.
I would suggest to enable verbose logging (General tab) and having a look at the log file.
This will tell you the state of each condition and when a macro is being run.

Just make sure not to use the built in "log viewer" when verbose logging is enabled as it will not be able to handle this many log messages and cause OBS to freeze up.

But I should probably make this easier, by adding some sort of option on the UI which shows the active macros.

Update:
I have implemented an option to highlight which macros are currently being executed on the Macro tab.
Highlight1.PNG
Highlight2.PNG

A build with this change can be found here in a few minutes:
Note that you have to be logged into GitHub to be able to download it and the build might not be the most stable.
 
Last edited:

mredodos

New Member
hi guys,

some one can help me ?

i have multiple windows of visual studio and i stream me during the work, i switch a lot to one or more windows of visula studio
i have create a scene with 2 source and 2 of this windows on top of other.

now i try to achieve that result:

1 i want based on window focus automatically hide the source is not focused.

How can i do that dynamically without specific the windows ?
 

Warmuptill

Active Member
hi guys,

some one can help me ?

i have multiple windows of visual studio and i stream me during the work, i switch a lot to one or more windows of visula studio
i have create a scene with 2 source and 2 of this windows on top of other.

now i try to achieve that result:

1 i want based on window focus automatically hide the source is not focused.

How can i do that dynamically without specific the windows ?
I don't think you will be able to achieve what you are looking to do without specifying any window name.
Without knowing your setup I would guess, that maybe you could create two macros like this - one just being the inverse of the other:
Window.PNG
NotWindow.PNG

If that should cause issues, when switching to other programs, you could expand upon the macros by adding a check to test if the visual studio process (devenv.exe) is running and in focus, like so:
ProcessAndWindow.PNG

Maybe some other approaches might work for you also, e.g. switching source visibilty based on cursor position.
But for this you might have to give a more detailed description of what restrictions you have.

Hope that helped!
Let me know if you have any questions! :)
 

Warmuptill

Active Member
Hello,

Yes that's correctly and i know about this Date option. We use your plugin for a TV channel, and for overview it's finer to
plan the macro's on weekdays and time (as i described in my image above) Then you can add one or multiple weekdays with
times, such as 'Time' tab.

Regards,
RoGra
I got around to working on your request.
I modified the date condition to also support switching based on just the day of the week and a time as shown in your screenshot.
date.PNG

You can switch between the old, more detailed view and this new one by pressing the "Show advanced settings" button.

A build with this change should be available here in a few minutes:
(Note that you have to be logged into GitHub to be able to download it - let me know if that is an issue)

Let me know if everything works as expected! :)
 

JaySkowron

New Member
Awesome plugin! I'm still somewhat new to OBS but I have an issue I was wondering if this plugin might help to resolve or if anyone has a suggestion.

I have an intro video scene that includes the audio in the file. The audio fades out slowly so we can begin talking over it, but...

I would like to be able to switch to our main cameras scene at a certain timeframe in the video, near the end. I know that's easily accomplished with this plugin, I've done it, and works great, but...

Switching the scene before the end of the video results in the audio cutting out abruptly. I "solved" this by copying the video to the main camera scene and putting it out of the frame so it finishes the video and audio completely, BUT...

Now the problem is that when I go back to the main camera scene, the audio from the video clip plays every time (video is off-frame so we don't see it). Yes, I could mute the audio every time I switch to the scene for the first time, but that's an extra keypress I don't want to do because I'll forget at some point.

Is there a setting either in this plugin, another plugin, or OBS itself, that can mute the audio of a source automatically when it's finished playing, OR prevent the source from being played more than once, OR, another solution I'm missing?

Thanks for your time! Hope that was clear.
 

AaronD

Active Member
Now the problem is that when I go back to the main camera scene, the audio from the video clip plays every time (video is off-frame so we don't see it). Yes, I could mute the audio every time I switch to the scene for the first time, but that's an extra keypress I don't want to do because I'll forget at some point.

Can you have two scenes for that camera? One that you use manually, without the end of the intro; and the other to automatically follow the intro, that does have it? Otherwise identical, and the hotkey of course goes to the manual one without the intro.
 
Top