Advanced Scene Switcher

Advanced Scene Switcher 1.37.2

View attachment 101690

View attachment 101691

This is what I setup..Maybe because the broadcasting scene is on the background,when the repaly scene remains in the preview window,so the macro cannot judge correctly?But how to get the broadcasting scene into the preview window automatically?
If the "changed" condition works, then instead of a separate "not changed", maybe you could use "not macro" instead, and point it to the one that works:
1707844734338.png

Or you might combine both into a single macro by using the "else" clause, which is in a later version than you or I have.
 
If the "changed" condition works, then instead of a separate "not changed", maybe you could use "not macro" instead, and point it to the one that works:
View attachment 101704
Or you might combine both into a single macro by using the "else" clause, which is in a later version than you or I have.
The supplement of else clause is not bad.

Thank you very much.
 
I've been searching through the pages, and can't seem to find what I'm looking for... What I'd like to do, is set it to when I switch from my "Starting" Scene to my "live" scene, it activates a unique transition (fade to color, 8 second duration) and during the transition plays a specific audio file. I have tried setting it to play, but it will only play the audio once the transition is complete. If I try having the source muted, and do unmute, same thing it waits until the full transition to unmute the audio, therefore skipping the audio. My audio is about 14 seconds long, though the tail end is fine to have after ending the transition.

Is this something currently possible?
Unfortunately, it is very hard to say what the issue might be without knowing more about your setup.
You can share the macro(s) you are currently using?

Maybe this table might give you an idea on how to set this up:

Depending on what type of transition is used it might be necessary to include the same audio source in both, the source scene, and the target scene.
 
Unfortunately, it is very hard to say what the issue might be without knowing more about your setup.
You can share the macro(s) you are currently using?

Maybe this table might give you an idea on how to set this up:

Depending on what type of transition is used it might be necessary to include the same audio source in both, the source scene, and the target scene.
Sorry for the delay in getting back to everyone, thank you for all the help! Using the If transition got it to work. I was trying the If scene, with previous being starting and current is live. By making it the transition clause it fixed what I was trying to do. Now to tweak a few other things using this :D
Made my intro perfect and saved my poor ADHD brain from having to remember to mute/unmute the audio! now to set in faders :D
 
My OBS main is using macros to time-switch between scenes and the "old" network tab to send websocket commands to slave my OBS spare.
My OBS spare use also the old "network" tab to receive OBS main websocket commands to switch in sync with the main.
...
I would like to try do the same master-slave thing with macros. How can I achieve that? I looked at the documentations but it's much more complicated than the old "Network" tab.
The old Network tab only does one thing with limited logic, and the Macros do EVERYTHING! So yes, there's a lot more to wrap your head around if you really want to understand *all* of it before doing *any* of it. But you don't have to. Just start playing with it and find things that work.

To send WebSocket messages from one to another, first set up the WebSocket server in the Master instance of OBS. Tools -> WebSocket Server Settings (outside of Adv. SS)
1707917818303.png

Then in Adv. SS on that Master instance, you can send events, with any text that you want to differentiate them:
1707917687585.png

And receive them in the Slave, which is connected to the server in the Master, and filter that text.
1707917766367.png

You have to set up that connection, of course, but only once, by choosing the Add new connection option in the drop-down of which one to use.
1707918685609.png


.
 
If the "changed" condition works, then instead of a separate "not changed", maybe you could use "not macro" instead, and point it to the one that works:
View attachment 101704
Or you might combine both into a single macro by using the "else" clause, which is in a later version than you or I have.
By the way, I found a alternative way to deal with this. I used "scene item viservility" change the visibility of source page, and it worked well. One more thing,uses the preview window as the input of virtual camera.

And thank you once again.
 
would anyone have a good tutorial or example of a python script that is sending commands to OBS via websocket? I am having a hell of a time getting it to work.

I see the commands successfully coming into OBS via the websocket server Session Messages in/out, but for whatever reason, the commands i'm sending aren't actually doing anything. I can send the same commands via streamerbot and they work. So it must be something in my script. Sorry if this is the wrong place to ask this.

I'm remotely sending a sound triggered websocket command and hoping to trigger a macro via hotkey.

Python:
import sounddevice as sd
import numpy as np
from obswebsocket import obsws, requests

# OBS WebSocket server settings
obs_host = "localhost"
obs_port = 4456
obs_password = "guTHv2GACgEz7lvq"  # Change this to your OBS WebSocket password

# Connect to OBS WebSocket
ws = obsws(obs_host, obs_port, obs_password)
ws.connect()

# Set the scene name you want to switch to when the microphone input exceeds the threshold
scene_to_switch = "Replay State"

def calculate_decibel_level(data):
    # Calculate the decibel level of the audio data
    rms = np.sqrt(np.mean(data**2))
    decibel = 20 * np.log10(rms)
    return decibel

def switch_scene():
    # Switch to the specified scene in OBS
    ws.call(requests.SetCurrentScene(scene_name=scene_to_switch))

def callback(indata, frames, time, status):
    if status:
        print('Error:', status)
    # Calculate decibel level
    decibel = calculate_decibel_level(indata)
    print(f"Decibel level: {decibel} dB")
    # If decibel level exceeds -30 dB, switch scene
    if decibel > -30:
        switch_scene()

# Open microphone stream
with sd.InputStream(callback=callback):
    print('Listening... Press Ctrl+C to exit')
    # Keep the script running
    sd.sleep(1000000)

# Disconnect from OBS WebSocket
ws.disconnect()
 
My "Tray Notification" macros are not showing on Mac OSX 14.3.1 (m2 chip).
Running OBS 30.0.2 and ASS 1.24.2.
Other notifications are working, but ASS does not. Anyone having the same issue?
 
My "Tray Notification" macros are not showing on Mac OSX 14.3.1 (m2 chip).
Running OBS 30.0.2 and ASS 1.24.2.
Other notifications are working, but ASS does not. Anyone having the same issue?
You might have to tweak your OBS notification settings in "System Preferences".

First check if they are enabled at all.
Then select the type of notification - If you always want it to "pop up", select "Alerts".
Depending on how frequent you send those messages they might also be grouped, which you can disable in the "Notification grouping" section.

1708109001613.png


I hope that helps!
 
You might have to tweak your OBS notification settings in "System Preferences".

First check if they are enabled at all.
Then select the type of notification - If you always want it to "pop up", select "Alerts".
Depending on how frequent you send those messages they might also be grouped, which you can disable in the "Notification grouping" section.

View attachment 101804

I hope that helps!
I have all that enabled. Set as Alerts. They simply stopped showing. I can’t figure out what changed.
 
I am trying to start and stop my live owl cam every 12 hours, so it will record on the YouTube side. With the Advanced Scene Switcher 1.24.2, I can start and stop stream based on a timer. I am having troubles with the broadcast feature, which seems to be a manual process, it looks like I need to utilize this feature to get YouTube to record the previous 12 hour block. I see some similar questions on this topic, but not the solutions. Thank you.
 
I am trying to start and stop my live owl cam every 12 hours, so it will record on the YouTube side. With the Advanced Scene Switcher 1.24.2, I can start and stop stream based on a timer. I am having troubles with the broadcast feature, which seems to be a manual process, it looks like I need to utilize this feature to get YouTube to record the previous 12 hour block. I see some similar questions on this topic, but not the solutions. Thank you.
I run a church stream. We don't schedule anything. Just start throwing data at it, and stop the data when we're done. YT records that, and makes it available to watch later. Easy as that.

The schedule is to tell your subscribers when you'll be on next, but if you're predictable already, you probably don't need that. Save yourself the trouble, and don't bother.

If you only want to split the recording and keep going, you'll need to have it down long enough that YT times out and calls it done. Too short, and it calls it a hiccup in the same stream and resumes that one. I've done back-to-back streams that way: stop, let it time out, change some data in the web browser (OBS is NOT logged in: we use the stream key instead), and start again with the same key.
 
I run a church stream. We don't schedule anything. Just start throwing data at it, and stop the data when we're done. YT records that, and makes it available to watch later. Easy as that.

The schedule is to tell your subscribers when you'll be on next, but if you're predictable already, you probably don't need that. Save yourself the trouble, and don't bother.

If you only want to split the recording and keep going, you'll need to have it down long enough that YT times out and calls it done. Too short, and it calls it a hiccup in the same stream and resumes that one. I've done back-to-back streams that way: stop, let it time out, change some data in the web browser (OBS is NOT logged in: we use the stream key instead), and start again with the same key.
Aaron,
Thank you for your reply, but I am doing something wrong after multiple tries and different configurations.
- If I set auto-stop to on, after the YT timeout period, it wants to kill my stream entirely after a minute or so. When I restart the feed, it goes into the abyss of null I guess.
- If I set auto-stop to off, YT does not time it out and I end up with a hiccup. I tried renaming it and did not see any changes, less the name change.

Start the stream settings:
- Enable auto-start: on or off?
- Enable auto-stop: on or off?

- Enable DVR - Assuming this is on.
- Using key not logging into YT
- Using if statement on date, the start and stop commands work appropriately
- My version: OBS 30.0.2.

Any help would be appreciated.
 
Aaron,
Thank you for your reply, but I am doing something wrong after multiple tries and different configurations.
- If I set auto-stop to on, after the YT timeout period, it wants to kill my stream entirely after a minute or so. When I restart the feed, it goes into the abyss of null I guess.
- If I set auto-stop to off, YT does not time it out and I end up with a hiccup. I tried renaming it and did not see any changes, less the name change.

Start the stream settings:
- Enable auto-start: on or off?
- Enable auto-stop: on or off?

- Enable DVR - Assuming this is on.
- Using key not logging into YT
- Using if statement on date, the start and stop commands work appropriately
- My version: OBS 30.0.2.

Any help would be appreciated.
Someone else in a different thread said that the key was my changing something between streams. Haven't actually tried not changing something in a short time, but I do know that not changing it after a week of not streaming does work. (Oops!) Maybe there's another timeout that I don't know about?

Anyway, I'm pretty sure Adv. SS is doing its job just fine, and the problem is somewhere else.
 
Hi,
I just created an account here not knowing if this is the right thing to do, but after discovering and learning OBS for the past few days, I also discovered and started learning Advanced Scene Switcher... and I must say this is one of the most amazing tools I have ever used! So rich, limitless! Is Warmuptill still around here? Or anybody knowledgeable enough, because I have an issue:

I have around 8 scenes, and a couple of Stingers loaded in OBS. One stinger is selected as the transition by default.
However, I would like to automate that when switching from scene B to C for example, the second stinger gets used instead. Overriding seems to change the default stinger, so for any situation, but I would like the default stinger to be the effective transition for scene C if I come from any other scene (A, or D, but NOT B). I searched for an hour in the macros and I just can't make it work... The "old" tabs like "Transition" did not make it more successful, and the message was just telling me to use the Macros instead.

Help anybody? Thank you!
 
Hi,
I just created an account here not knowing if this is the right thing to do, but after discovering and learning OBS for the past few days, I also discovered and started learning Advanced Scene Switcher... and I must say this is one of the most amazing tools I have ever used! So rich, limitless! Is Warmuptill still around here? Or anybody knowledgeable enough, because I have an issue:

I have around 8 scenes, and a couple of Stingers loaded in OBS. One stinger is selected as the transition by default.
However, I would like to automate that when switching from scene B to C for example, the second stinger gets used instead. Overriding seems to change the default stinger, so for any situation, but I would like the default stinger to be the effective transition for scene C if I come from any other scene (A, or D, but NOT B). I searched for an hour in the macros and I just can't make it work... The "old" tabs like "Transition" did not make it more successful, and the message was just telling me to use the Macros instead.

Help anybody? Thank you!
There are a few ways you might be able to solve this, assuming you are talking about automated scene switches:
  • You can adjust the behavior of the plugin on the General tab to only change the transition overrides and not the active transition type:
    1708777927500.png

    In this case a scene switch action will not change the active transition type at all but still use the transition type you specified.
  • You can wait for you scene switch action to complete and then set the transition type back to the first stinger.
    1708778365152.png

  • You could set up a marco like this to automatically set the active transition type to "Stringer" once a scene change completed.
    1708778602975.png
You might also want to give the "transition table" plugin a try:
This might just to exactly what you are looking for and is very easy to set up.

I hope that helps! :)
 
Hi everyone,
I released a new beta version of the plugin here on GitHub:

I would very much appreciate it, if some of you could give this version a try and report back, if you should encounter any issues!
Please make sure to back up your settings before trying this new version just in case.


Additions:​

  • Added action queues.
    As the name implies you can now create queues of actions, which are executed sequentially but in parallel to the reset of the macro system.
    You can append to, start, stop, or clear action queues using the "Queue" action.
    You can check if a action queue is started, stopped, and its size using the "Queue" condition.
    The first action added to the queue will be the first one to be processed.
    You can create as many queues as you like.
    They can be useful if you have events, which can happen in quick succession, but result in relatively long chains of actions, which themselves should not necessarily run in parallel to each other.
  • Added the "Variable" tab:
    This should make it significantly easier to work with larger amounts of variables.
    The tab will only be visible if at least one variable exists.
  • Added the current pattern matching value to "Show match" dialog. (Oekn5w)
  • Added the option to wait for spawned process to exit.
  • Added the option to set the value of a variable to scene item name at a given index of a scene.
  • Added the option to check the values of single settings in the "Source" condition.
  • Added the option to check the value of single settings value in the "Filter" condition.
  • Added the option to use decibel values as input for audio action and condition, instead of percent.
  • Added the option to set the index of a given sequence action.
  • Added the option to perform media actions on sources based on a scene item selection instead of just a source selection.
    This might simplify some setups.
  • Improved the "Display" condition by adding the option to check the width and height of connected displays.

Other changes:​

  • Default settings values were adjusted:
    • The plugin will now be active by default on new scene collections.
    • The macro tab will be opened as the default tab.
    • Recently executed macros, recently executed macro actions, and conditions, which evaluate to true, will be highlighted by default.
      This will not affect settings of already existing scene collections.
  • Added tooltips to macro tab buttons, adjusted the TAB order of some widgets, and some other minor UI tweaks.
    This should at least slightly improve the usability of the plugin in combination with screen readers.
  • A warning will now be displayed if settings are exported to a file, if potentially sensitive data might be contained in that file.
    (For example websocket passwords or Twitch tokens)
  • Added new macro properties for the following conditions:
    • Websocket
    • Streaming
    • Window (window class - windows only)
  • Audio fade controls are now disabled if the fading option is not checked.
    This was done to avoid confusion on some OBS themes where checkboxes can be very difficult to see.
  • Update internal hotkey names when the description of hotekys in changed in "Hotkey" conditions.
  • The rename dialog of items (e.g. Variables, Websocket connections, etc.) will now be prefilled with the current name.
  • Disabled dragging of macro segments when interacting with scrollbars.
  • When storing numbers in variables truncate unnecessary decimal places.
    1.23 would have been previously stored as 1.2300000... and is now stored as 1.23.
  • The MIDI condition and action type will now save the name of the selected device instead of the port number.
    This should allow the device selection being restored correctly even if the devices are connected to different ports.

Fixes:​

  • Fixed the replay buffer save event only triggering in a single condition.
  • Fix text becoming invisible in certain text boxes in special circumstances.
  • Fixed macro segment widgets being squashed below a sensible minimum size.
  • Fixed pattern matching issues by excluding non-finite results. (Oekn5w)
  • Fixed media condition "any" / "all" selection ignoring some source types.
  • Fixed scene item name conflict selection not being visible in some circumstances.
  • Fixed flickering of macro list controls on widget creation.
  • Fixed else action delete button only working with active selection.
  • Fixed dialogs being opened at OBS instead of plugin window location.
  • Fixed setting of show-/hide-transitions resulting in graphical glitches during the transition.
  • Fixed Twitch chat connection not being re-established when when the Twitch account or channel was change.
  • Fixed else-actions being executed for paused macros.
  • Fixed open variable input dialogs causing a crash on shutdown.
  • Fixed hotkey condition evaluating to true if the hotkey was pressed while the macro was paused.
  • Fixed manually started macros not being stopped when stopping the plugin.
  • Fixed Twitch token warning not being displayed when the token is invalid.
  • Fixed possible crash on shutdown.
  • Fixed crash when switching settings in the "OBS stats" condition.
  • Fixed macro property references not being resolved on macro copy and import.
  • Fixed websocket messages / Twitch events / MIDI messages arriving in very quick succession resulting in some of them being skipped.
  • Fixed Twitch action not being able to send a chat message in some circumstances.
 
Hello, I'm testing out this plugin and would like to know what's the best way to set up a macro so that when a Window closes (e.g. Zoom.exe or Webex.exe), it'll make OBS stop recording? The conditions for Window only have "title matches, fullscreen, maximized, focused, focus window changed, and contains text". I was hoping for something to detect the existence of such a window. I tried "Window is focused", but that means I can't click on anything else while a meeting is in session.
 
Back
Top