Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

Just to clarify:
Are you using the advanced scene switcher to send the message on one machine and also the advanced scene switcher to receive the messages on the other machine?


If so you can just use the exact same message in the action on one machine and in the condition on the other machine.
You will not have to manually form the json string containing the vendor request this will be done by the plugin automatically.


If you are instead using an external tool to send this message via the "AdvancedSceneSwitcherMessage" vendor request can you give more details on what you have set up exactly?
Did you authenticate first before attempting to send out the request?

UPDATE: I set it up as an event rather than a request, sending that text as recommended with a connection going the opposite direction. Works like a champ! Thanks!

--Katt. =^.^=
 

AaronD

Active Member
UPDATE: I set it up as an event rather than a request, sending that text as recommended with a connection going the opposite direction. Works like a champ! Thanks!

--Katt. =^.^=
I might be interested in doing this, instead of the python script that I currently have to connect two instances via websockets. The deal-maker or -breaker being the overall latency that may or may not be added by the macro scan time. (race between a scene-change event, and the virtual camera from one being used as a source in the other)

Would you mind posting screenshots of a complete setup that works? Thanks!
 

Warmuptill

Active Member
I cannot get Advanced Scene Switcher to show up in the Tools menu.
I am using:
Mac with an M1 chip and MacOS 13.0
OBS 28.1.2
Latest Advanced Scene Switcher installer
I've tried both of these installers:

I did try this as well:
  1. Run command: xattr -r -d com.apple.quarantine advanced-scene-switcher.plugin
It just isn't being picked up by OBS!

Help appreciated!

Stephen
Can you please share an OBS log?
 

PsychoSek

New Member
I need help setting up a random transition macro.

What I'm trying to accomplish:
When transitioning to a specific scene (my brb scene)
Use a random transition from a list of transitions

I used the "Switch scenes randomly" guide as my reference, figuring that I should be able to replace scene changes with transition changes and using the scene change as the trigger.

I think I've tried every combination of running parallel and on condition change. I tried using "scene transition override" for the "brb" scene and again using "current scene". I unchecked all of the other macros to be sure there were no conflicts.

I don't understand what I'm doing wrong here.
 

Attachments

  • Screenshot 2022-11-12 00-22-12.png
    Screenshot 2022-11-12 00-22-12.png
    981.7 KB · Views: 60
  • Screenshot 2022-11-12 00-22-06.png
    Screenshot 2022-11-12 00-22-06.png
    981 KB · Views: 58
  • Screenshot 2022-11-12 00-21-43.png
    Screenshot 2022-11-12 00-21-43.png
    954.2 KB · Views: 57

Warmuptill

Active Member
I need help setting up a random transition macro.

What I'm trying to accomplish:
When transitioning to a specific scene (my brb scene)
Use a random transition from a list of transitions

I used the "Switch scenes randomly" guide as my reference, figuring that I should be able to replace scene changes with transition changes and using the scene change as the trigger.

I think I've tried every combination of running parallel and on condition change. I tried using "scene transition override" for the "brb" scene and again using "current scene". I unchecked all of the other macros to be sure there were no conflicts.

I don't understand what I'm doing wrong here.
I think the issue lies in the "Random WTV" macro.

You are attempting to change the transition while a transition is already active.
This is just something that OBS does not "like" and not an issue with the logic you have set up.
In the best case nothing will happen and in the worst the transition will be aborted and you end up on the wrong scene.

Could you maybe use a different trigger to trigger the transition type to change?
For example, the "scene changed" check of the "Scene" condition could be used to change the transition type after the last scene change has completed. (Just make sure to enable the "Perform actions only on condition change")
If that is not an option can you give more details on your requirements for when the transition type should be changed?

Hope that help! :)
 

AaronD

Active Member
I need help setting up a random transition macro.

What I'm trying to accomplish:
When transitioning to a specific scene (my brb scene)
Use a random transition from a list of transitions

I used the "Switch scenes randomly" guide as my reference, figuring that I should be able to replace scene changes with transition changes and using the scene change as the trigger.

I think I've tried every combination of running parallel and on condition change. I tried using "scene transition override" for the "brb" scene and again using "current scene". I unchecked all of the other macros to be sure there were no conflicts.

I don't understand what I'm doing wrong here.
I think the issue lies in the "Random WTV" macro.

You are attempting to change the transition while a transition is already active.
This is just something that OBS does not "like" and not an issue with the logic you have set up.
In the best case nothing will happen and in the worst the transition will be aborted and you end up on the wrong scene.

Could you maybe use a different trigger to trigger the transition type to change?
For example, the "scene changed" check of the "Scene" condition could be used to change the transition type after the last scene change has completed. (Just make sure to enable the "Perform actions only on condition change")
If that is not an option can you give more details on your requirements for when the transition type should be changed?

Hope that help! :)

It's amazing how often this trick comes up (add to the FAQ?):
Instead of detecting an existing action, change the existing trigger to run a macro that does both that action and the response.

In your case, it would set the transition, and then switch the scene, in the same macro. The hotkey, or whatever trigger you used to use to switch the scene, now triggers that macro instead.
 

PsychoSek

New Member
I think the issue lies in the "Random WTV" macro.

You are attempting to change the transition while a transition is already active.
This is just something that OBS does not "like" and not an issue with the logic you have set up.
In the best case nothing will happen and in the worst the transition will be aborted and you end up on the wrong scene.

Could you maybe use a different trigger to trigger the transition type to change?
For example, the "scene changed" check of the "Scene" condition could be used to change the transition type after the last scene change has completed. (Just make sure to enable the "Perform actions only on condition change")
If that is not an option can you give more details on your requirements for when the transition type should be changed?

Hope that help! :)
I'd essentially want to set a transition from "any scene" to "brb", but instead of setting a single specific transition, I want it to choose a transition from a set list of transitions.

It's something similar to what I think SLOBS has/had (I haven't used it in awhile), where it would let you set the transition from one specific scene to another specific scene and had an option to randomize that transition. I just wanted to limit it to a specific group of transitions and not every transition in OBS.
 

PsychoSek

New Member
It's amazing how often this trick comes up (add to the FAQ?):
Instead of detecting an existing action, change the existing trigger to run a macro that does both that action and the response.

In your case, it would set the transition, and then switch the scene, in the same macro. The hotkey, or whatever trigger you used to use to switch the scene, now triggers that macro instead.
I think I understand what you mean, that makes much more sense than what I was trying to do.

Just set a hotkey of sorts for the macro instead of a scene change. The macro runs the randomizer to set the transition and then sends it to the scene. Cuts the OBS middle man out of the equation essentially.

I'll try and put it into motion this evening, as I'm too tired right now to attempt it. I'll let you know how it goes.

Thank you all for your help.
 

SWCarson

New Member
Thank you!
Seems like you are using the x86 variant of OBS but have installed the version of the plugin for arm chips.
advanced-scene-switcher' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
Can you please try installing the x86 version of the plugin and share a new log?
Doh! I thought that by upgrading to OBS 28 I would have the Apple Silicon version.

But I used the automatic upgrade... So sounds like I just need to manually download the Apple Silicon version of OBS.

(I want to be running the Apple Silicon OBS on my Apple Silicon Mac!)

Indeed, that fixed it. Advanced Scene Switcher is now in the Tools menu. I just wish the settings for it hadn't disappeared!
 
Last edited:

AaronD

Active Member
Just thought of something, related to the incompatibility between OBS 27 and OBS 28, which results in deleting this plugin's settings when upgrading:

I recently installed Ubuntu Studio 22.04.1 LTS, which comes with OBS 27 preinstalled. Adding OBS's PPA as described here, and then letting the normal maintenance tools run, got me an automatic upgrade to OBS 28, with no indication that it was going to lose something that important.

I knew, of course, before I did any of that, that it was going to wipe out the old settings, but since this is a new install that hadn't gotten to that part of configuring yet, I just went ahead and did it. Nothing special in there yet *to* wipe out.

But that got me to thinking, "What if Ubuntu's normal PPA decides to include OBS 28?" Then everyone would get that "upgrade" automatically, and potentially lose a TON of work without warning. Is there something that can be done about that?
 

Warmuptill

Active Member
Just thought of something, related to the incompatibility between OBS 27 and OBS 28, which results in deleting this plugin's settings when upgrading:

I recently installed Ubuntu Studio 22.04.1 LTS, which comes with OBS 27 preinstalled. Adding OBS's PPA as described here, and then letting the normal maintenance tools run, got me an automatic upgrade to OBS 28, with no indication that it was going to lose something that important.

I knew, of course, before I did any of that, that it was going to wipe out the old settings, but since this is a new install that hadn't gotten to that part of configuring yet, I just went ahead and did it. Nothing special in there yet *to* wipe out.

But that got me to thinking, "What if Ubuntu's normal PPA decides to include OBS 28?" Then everyone would get that "upgrade" automatically, and potentially lose a TON of work without warning. Is there something that can be done about that?
Thanks for the warning / suggestion!

It is possible to do something about it.
For example separating the UI from the rest of the plugin so the plugin would always be able to load even if the UI fails to load due to Qt dependencies.
But this would be a lot of work for which I just to do not have the time for at the moment unfortunately.
I will add it to the todo list though.
 

AaronD

Active Member
I might be interested in doing this, instead of the python script that I currently have to connect two instances via websockets. The deal-maker or -breaker being the overall latency that may or may not be added by the macro scan time. (race between a scene-change event, and the virtual camera from one being used as a source in the other)

Would you mind posting screenshots of a complete setup that works? Thanks!
Well, looks like OBS 28 can't use my python script anyway, because it can't use different websocket settings for different instances simultaneously. Don't know if that's an actual regression, or a side-effect of being native vs. snap (snap *could* use different settings), but regardless, I need a different way for this list of scenes in one instance:
  • Camera - Selfie
  • Camera - PTZ
  • Camera - Camcorder
  • Feature - Video1
  • Feature - Video2
  • Voiceover - Image
  • ...
to trigger their corresponding scenes in another instance:
  • Camera
  • Feature
  • Voiceover
on the same machine, with low enough latency to practically call it "immediate". That is, both start transitioning at the same time, while I simply use the Master instance as usual to produce a broadcast, not really thinking about the Slave.

(Yes, I just said in a previous post to have a macro that does both the logical trigger action and its response, but as I add/remove/reorder a bunch of scenes as if they were PowerPoint slides, that gets to be a lot of hotkeys and associated maintenance to keep the macros up to date! Every trick has its limits...)

The python script that used to do it, and probably still could if I could have different websockets for each instance, is:
Python:
#!/usr/bin/env python

import re
import sys
import subprocess

from obswebsocket import obsws, events, requests


wsSlv = obsws("localhost", 4456, "NotTheRealPassword!")
try:
    wsSlv.connect()
except:
    print("Error: Could not connect to OBS Slave")
    sys.exit(-1)


def on_switch(message):
    name = message.getSceneName()
    if re.match("Camera.*", name):
        wsSlv.call(requests.SetCurrentScene("Camera"))
    if re.match("Feature.*", name):
        wsSlv.call(requests.SetCurrentScene("Feature"))
    if re.match("Voiceover.*", name):
        wsSlv.call(requests.SetCurrentScene("Voiceover"))


wsMst = obsws("localhost", 4455, "NotTheRealPassword!")
wsMst.register(on_switch, events.SwitchScenes)
try:
    wsMst.connect()
except:
    try:
        wsSlv.disconnect()
    except:
        pass
    print("Error: Could not connect to OBS Master")
    sys.exit(-2)


# Expect a user dialog command and message, passed as arguments, that tell the user to keep the dialog open until the event is done
#   so this won't return until then
subprocess.run(sys.argv[1:])


# Disconnect from both, if possible
# If not, don't worry about it; it probably is already

try:
    wsMst.disconnect()
except:
    pass

try:
    wsSlv.disconnect()
except:
    pass

sys.exit(0)
 
Last edited:

AaronD

Active Member
Also, good start on the "Any Media" condition, but it's not quite what I need it to be. If you'd add an "Any" option to the list of scenes as well, so that this becomes "Any media source on" "Any scene", I think that would do it:
Screenshot_20221112_152448.png


(I tried the Ended state first. It worked, whereas my experience with that label on the old tabs just didn't do anything, but it also fired when I switched away early, which I didn't want. "Playing and a short time remaining" solves that problem, and allows the transition to be a bit nicer as well.)
 

Warmuptill

Active Member
Also, good start on the "Any Media" condition, but it's not quite what I need it to be. If you'd add an "Any" option to the list of scenes as well, so that this becomes "Any media source on" "Any scene", I think that would do it:
View attachment 88699

(I tried the Ended state first. It worked, whereas my experience with that label on the old tabs just didn't do anything, but it also fired when I switched away early, which I didn't want. "Playing and a short time remaining" solves that problem, and allows the transition to be a bit nicer as well.)
A few weeks back I added the option to use the "Any media source on" and "All media sources on" selections in combination with the "Current scene", "Previous scene", ... options.
Media.PNG

Maybe that can help for your use case?

A build with this change can be found here:
 
Last edited:

AaronD

Active Member
A few weeks back I added the option to use the "Any media source on" and "All media sources on" selections in combination with the "Current scene", "Previous scene", ... options.
View attachment 88704Maybe that can help for your use case?

A build with this change can be found here:
Okay. "Current Scene" would do it too. Umm...how do I get it from there? The "Artifacts Produced during runtime" are not links.

Edit:
D'oh! Log into GitHub. Then they're links.

...And it works! Thank you!
 
Last edited:

PsychoSek

New Member
It's amazing how often this trick comes up (add to the FAQ?):
Instead of detecting an existing action, change the existing trigger to run a macro that does both that action and the response.

In your case, it would set the transition, and then switch the scene, in the same macro. The hotkey, or whatever trigger you used to use to switch the scene, now triggers that macro instead.
I got this to work with minimal difficulty.

The only thing I had figure out was that when I set the macro's actions to do the randomizer and then scene change, it would only do the one and not the other. I added a wait action in between them and it worked like a charm.

I really appreciate the help!
 
Top