Resource icon

Advanced Scene Switcher 1.26.0

petjo10

Member
Hi
Is it possible to change the time to switch to a specific scene from a text file?
1644833790351.png
 

Warmuptill

Active 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.
I think you can solve your issue by just not automatically restarting the playback once the intro video completes by changing the media sources settings.
MediaSourceSettings.PNG


If that automatically restarting the playback should be required I would recommend to use a macro similar to the following:
MediaSourceMacro.PNG


This way the intro video will be muted automatically after the playback ended.
Let me know if you have any questions! :)
 

Warmuptill

Active Member
Hi
Is it possible to change the time to switch to a specific scene from a text file?
View attachment 80185
I don't think what you are trying to achieve is possible at the moment, but just to clarify:
Is your intention to ...
  • "switch to scene X, if the current system time is equal to the contents of a file"?
  • "switch to scene with name equal to contents of file at time Y "?
 

petjo10

Member
Thanks for answers!

I just want to change the time, e.g.
10 to 11
14 to 15
22 to 23
But wondering if this can be done from a text file. My idea is that a person remotely should be able to change the time through a text file that can be shared via Microsoft drive. I can not use the web socket plugin as I will run several Obs Studio (portal mode).

1644864128638.png
 

Warmuptill

Active Member
Thanks for answers!

I just want to change the time, e.g.
10 to 11
14 to 15
22 to 23
But wondering if this can be done from a text file. My idea is that a person remotely should be able to change the time through a text file that can be shared via Microsoft drive. I can not use the web socket plugin as I will run several Obs Studio (portal mode).

View attachment 80209
Ah I see.

In theory you could set up macros to import the plugin settings from a specified path every few minutes, ("Timer condition" and "Plugin state" action).
Then you could directly modify the plugin's settings file to achieve what you are looking to to.

However, I am not sure how practical that approach would be as the settings file can be rather complex and if you mess up the syntax no new settings will be loaded.
If you want to have a look at the settings file format you can save your current settings to a file using the "export settings" button on the General tab.

But if you are already messing with manually modifying json files it is probably easier to just try to set up a simple script as suggested by @khaver.
 

loudroom

New Member
Hey Warmuptill, thank you so much for this awesome plugin, I've been loving it!

One issue I've had ever since I got the plugin about 6 months ago is that the hotkey I set for the Advanced Scene Switcher to toggle on/off (or same if I set different hotkeys for on and off) just stops working after having OBS open for a while. It usually works fine for at least ~10 minutes, but at some point after that it always stops working.

I have tried every version you've released, and I'm currently on the most recent updated which I just installed today.

Any ideas? It's becoming pretty cumbersome because I'm a music streamer and I turn the switcher off in between every song, so I now have to use my mouse to go and turn the switcher on/off every 5 minutes.

Thanks for any help you can provide!
 

lindenkron

Member
How do I uninstall this plugin on a Mac?
Remove the files from the OBS plugin folders, like any other plugin. It's more a general OBS question, you can either google it or ask for help in the discord :)

Why? It seems to me like constantly turning it on and off entirely, is not the intended use. Maybe your triggers need to be refined?
I agree with this sentiment.

You need to change your conditions to meet the usecase that you want.
 

loudroom

New Member
Hey Warmuptill, thank you so much for this awesome plugin, I've been loving it!

One issue I've had ever since I got the plugin about 6 months ago is that the hotkey I set for the Advanced Scene Switcher to toggle on/off (or same if I set different hotkeys for on and off) just stops working after having OBS open for a while. It usually works fine for at least ~10 minutes, but at some point after that it always stops working.

I have tried every version you've released, and I'm currently on the most recent updated which I just installed today.

Any ideas? It's becoming pretty cumbersome because I'm a music streamer and I turn the switcher off in between every song, so I now have to use my mouse to go and turn the switcher on/off every 5 minutes.

Thanks for any help you can provide!

I've been doing more testing and it seems like this is happening with all my hotkeys in OBS after a while, and only when the OBS window is not in focus, even though I have my "Hotkey Focus Behaviour" set to "Never Disable Hotkeys".

So anyways, not your issue! Sorry!
 

loudroom

New Member
Why? It seems to me like constantly turning it on and off entirely, is not the intended use. Maybe your triggers need to be refined?

I would love if you have some ideas of how I can redefine my triggers to better suit my use case!

So currently I will talk to my chat for a bit using my "front camera" scene, and then when I'm about to start singing a song I will turn the switcher on so that it will switch between my "front camera" and "side camera" scenes every 45 seconds while I play the song.

Then when I'm done the song I want to go back to only speaking to the front camera again, so I turn the switcher off.

Any ideas of how to better my workflow?
 

Warmuptill

Active Member
I would love if you have some ideas of how I can redefine my triggers to better suit my use case!

So currently I will talk to my chat for a bit using my "front camera" scene, and then when I'm about to start singing a song I will turn the switcher on so that it will switch between my "front camera" and "side camera" scenes every 45 seconds while I play the song.

Then when I'm done the song I want to go back to only speaking to the front camera again, so I turn the switcher off.

Any ideas of how to better my workflow?
Just an idea without really knowing your setup:
You could try to monitor the volume level of an audio source to automatically trigger the scene switching to start.
Assuming your voice is a separate audio input inside OBS compared to the instrumentals you could set up the following macros:
  1. The loop to switch from front to side scene:
    SceneSwitch.PNG
  2. The macro to automatically activate the scene switches:
    Activate.PNG
  3. The macro to automatically stop the scene switches and return to the front camera scene:
    Deactivate.PNG
But this of course just an idea - not sure if it will fit your exact use case.
Let me know if you have questions! :)
 
Last edited:

loudroom

New Member
Just an idea without really knowing your setup:
You could try to monitor the volume level of an audio source to automatically trigger the scene switching to start.
Assuming your voice is a separate audio input inside OBS compared to the instrumentals you could set up the following macros:
  1. The loop to switch from front to side scene:
    View attachment 80244
  2. The macro to automatically activate the scene switches:
    View attachment 80245
  3. The macro to automatically stop the scene switches and return to the front camera scene:
    View attachment 80246
But this of course just an idea - not sure if it will fit your exact use case.
Let me know if you have questions! :)

That's a really cool idea, very smart! But unfortunately all of my audio is coming from the same source, so there's no differentiating what is instrumentals and what is vocals. I use Loopback to get my audio out of Ableton Live and into OBS on one audio track.
 

AaronD

Active Member
That's a really cool idea, very smart! But unfortunately all of my audio is coming from the same source, so there's no differentiating what is instrumentals and what is vocals. I use Loopback to get my audio out of Ableton Live and into OBS on one audio track.

What if you had two scenes for the front camera? One of them stays there forever, and the other has the 45-second timer to go to the side camera. The side cam, of course, also has a 45-second timer to go to the timed front cam. Your switching then, is to go to the timed front cam or the forever front cam. Depending on the transition, the audience won't know the difference.
 

ad1562

New Member
Dear @Warmuptill:

First of all, fantastic plugin, thank you! I have functionality question, or perhaps a feature request if the functionality doesn't already exist.

Is it possible to setup Macros whose conditions are based on OBS Stats. For example, If average-frame-time is greater than 15000 ms, disable filter XYZ on source ABC

Thanks again for a great plugin, and thanks in advance for your response.

Regards,
Alex
 

Dan39

New Member
Tip for others that may be trying to use "use regular expression (pattern matching)" for matching File contents, Advanced Scene Switcher runs this regular expression, which is a "QRegExp" (from QT library that OBS uses I think), using the "exactMatch" function. This means the regular expression must match the entire contents of the file. This is a little different than most regex implementations where for example if the file contained "hello world" and your regex was "ello", it would match. With Advanced Scene Switcher your regular expression would have to be ".*ello.*" to match. Also, with the QRegExp implementation and matching against the entire file contents, be aware that if your file contains just 1 line like "hello world", it will often also have a EOL aka newline character (like \n or \r\n) at the end which you must also include some how in your regular expression, or be sure to not include in your file (for example, in linux by using "echo -n sometext >/path/to/file" instead of "echo sometext >/path/to/file"). This was the problem I ran into. I decided to just use "echo -n" so that the newline character does not get added to the file. I am using regex to do patterns like "TextA|TextB|TextC" to OR-match various specific strings elegantly(imo).

Hope this helps!
 

Warmuptill

Active Member
Dear @Warmuptill:

First of all, fantastic plugin, thank you! I have functionality question, or perhaps a feature request if the functionality doesn't already exist.

Is it possible to setup Macros whose conditions are based on OBS Stats. For example, If average-frame-time is greater than 15000 ms, disable filter XYZ on source ABC

Thanks again for a great plugin, and thanks in advance for your response.

Regards,
Alex
Glad you like the plugin.
At the moment this is not possible.
I will look into it - thanks for the suggestion!
 

Dan39

New Member
Hello, thank you for the amazing plugin! I am wondering, how are the If Conditions evaluated in macros when there are multiple? Is there an order of precedence, like AND gets evaluated before OR? It is very confusing without a way to group together conditions like you can in a programming language with parenthesis.

For example, I believe i tried something like below but it did not work at all as I would hope:

If scene = intro
AND File contents matches ABC
OR File contents matches DEF
OR File contents matches GHI
 
Top