Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

AaronD

Active Member
You put them into the /usr/ folder.
So /usr/lib/x86_64-linux-gnu/obs-plugins/... and /usr/share/obs/obs-plugins/....

Sorry about the delayed response!
Yep! That worked. Thank you!

The original problem will probably fix itself when OpenCV finally comes to 24.04, but I suspect it'll happen again with future releases of Ubuntu. So I think it would still be good to tweak the installation a bit so that it doesn't absolutely require it.

And it probably wouldn't hurt either, to put a note in the root of the tarball, for those that still need that little bit of information. Kinda like the old readme before the deb came along at all.

Thanks!
 

arseal

New Member
Hi. I'm new to OBS, and I'm looking for help with advanced scene switcher. I'm using OBS for the purpose of live streaming. I'm trying to automate my "ending" scene. Once I click my "ending" scene, I want the scene to last 45 seconds, I want the audio to fade over 30 seconds down to 0%, and the live stream or live recording to end. I keep changing the settings, but I cannot figure it out.

I'll attach a screenshot of my macro.

My issue is it seems like either the scene doesn't play the entire 45 seconds OR the audio doesn't start to fade until after 45 seconds, at which point the stream has ended.

Thanks.
Screen Shot 2024-09-22 at 3.15.43 PM.png
 

AaronD

Active Member
Hi. I'm new to OBS, and I'm looking for help with advanced scene switcher. I'm using OBS for the purpose of live streaming. I'm trying to automate my "ending" scene. Once I click my "ending" scene, I want the scene to last 45 seconds, I want the audio to fade over 30 seconds down to 0%, and the live stream or live recording to end. I keep changing the settings, but I cannot figure it out.

I'll attach a screenshot of my macro.

My issue is it seems like either the scene doesn't play the entire 45 seconds OR the audio doesn't start to fade until after 45 seconds, at which point the stream has ended.

Thanks. View attachment 108013
According to your screenshot, I would expect it to:
  • Wait until it's been on the Ending scene for 45 seconds, then
  • Start to fade the audio down over the next 30 seconds, and
  • Immediately stop the stream and recording, as the fade *starts*
Is that what it does?

If you want it to wait until the fade is done before stopping (so 1:15 total time: 45 sec + 30 sec), there's a checkbox for that at the bottom of the Audio action.

If that creates the correct behavior, but you only want 45 seconds total, you can then shorten the Condition timer to 15 seconds.
 
Hi. I'm new to OBS, and I'm looking for help with advanced scene switcher. I'm using OBS for the purpose of live streaming. I'm trying to automate my "ending" scene. Once I click my "ending" scene, I want the scene to last 45 seconds, I want the audio to fade over 30 seconds down to 0%, and the live stream or live recording to end. I keep changing the settings, but I cannot figure it out.

I'll attach a screenshot of my macro.

My issue is it seems like either the scene doesn't play the entire 45 seconds OR the audio doesn't start to fade until after 45 seconds, at which point the stream has ended.

Thanks. View attachment 108013
In my tests, that duration modifier is whats messing you up...

How Id do it is remove it, for audio, check wait for fade to complete, put a wait after audio for 15 sec, then the 2 stops.

But I am by no means a professional, but seemed to work in my local test.
 

alp35035

New Member
I have a slight problem with Adv. SS. I am developing many macros and exporting a few at a time to move from development to production. However, on import only macros in said file are imported. They are not combining in OBS but rather the import is removing or replacing all the macros with only those in the exported file. I looked at the files and tried copying the text from both exports and combining them into a new file containing both original exports but then import fails.
 

Warmuptill

Active Member
I have a slight problem with Adv. SS. I am developing many macros and exporting a few at a time to move from development to production. However, on import only macros in said file are imported. They are not combining in OBS but rather the import is removing or replacing all the macros with only those in the exported file. I looked at the files and tried copying the text from both exports and combining them into a new file containing both original exports but then import fails.
If you want to import individual macros instead of all of the plugin settings have a look at this wiki page:
 

burtgolf

New Member
Is there a way to have the trigger on a UDP port and whenever this port gets new data then trigger the macro? I currently have it working via audio trigger but trying to get it to trigger when new data hits a specific port. Thank you!
 

AaronD

Active Member
I found an...annoyance, I guess. Don't think I'd go so far as to call it a bug, and I suspect the fix is not trivial. So this is more of a "user beware" post than a bug report. Anyway:

In Studio Mode, switching the Preview scene while a transition is still happening, ends up having no effect. I can see it go, but then OBS overrides it when the transition finishes, with the scene that was just active. Adding a Wait action or similar delay, before switching the Preview scene, so that it happens after the transition finishes, does stick.

However, that's only when the macro is set to run in parallel. If it's not running in parallel, then the entire GUI seems to lock up until the macro finishes (at least when using the dock to run it manually), and even an excessive Wait doesn't work. It's as if OBS queues up its own Preview at the end, after the GUI comes back, which is after the macro is completely finished regardless of how long it stalled.

So, if you need to change both the Program and the Preview automatically, then:
  • The macros that do that need to be set to run in parallel, and
  • You need to switch the Program first and then the Preview, and
  • There needs to be enough time between Program and Preview to finish the transition
So I've changed a bunch of my macros to run in parallel now, just so I don't have to think about it for future edits. Still seems to work for everything else they do.
 

RobertWilliams

New Member
Just polling people on the thread if you had this requirement and how you addressed it. I want to

Run a macro only if it hasn't in the last 10 minutes.

I tried to use a timer but it seems to run soon as the time limit is met regardless if the macros within the 10 minute threshold.
TIA
 

Warmuptill

Active Member
Is there a way to have the trigger on a UDP port and whenever this port gets new data then trigger the macro? I currently have it working via audio trigger but trying to get it to trigger when new data hits a specific port. Thank you!
There is no functionality built-in, which would directly support this particular use case.
But maybe you can script a custom condition type for your particular use case.
I am not sure if it is applicable for your use case, but it might also be worth looking into using websocket messages.

Just polling people on the thread if you had this requirement and how you addressed it. I want to

Run a macro only if it hasn't in the last 10 minutes.

I tried to use a timer but it seems to run soon as the time limit is met regardless if the macros within the 10 minute threshold.
TIA
Depends a bit on what exactly you have set up.
I would suggest that you add a "Macro" action to the end of your maco, which should only run if it hasn't in the last 10 minutes.
This additional action should pause the macro so it is not executed again unless it is unpaused.
Then you add another helper macro which checks if the given macro was paused for at least 10 minutes before it unpauses the macro.

So something similar to this:
1728319407918.png

1728319435778.png
 

Skew-if

New Member
Hi guys,
Been at this all week and can't seem to find a solution. I have 72 scenes all with webcam, various overlays, logos, alerts etc. and the only difference is each scene has a different mp4 video for my green screen. I had 70+ macros setup to cycle through the scenes at an interval of 35 seconds. It worked perfectly. However I do occasionally run into some issues/OBS bugs. It becomes very annoying having to edit all 72 scenes when that happens.

Long story short.....I've culled my 72 scenes down to 2. One Master Scene, and a background scene. The background scene is all the mp4 videos, the master scene is is the webcam logos and overlays. Background scene is nested in the master scene.

I'm trying to use a variable being the mp4's and the increment command to have the video source cycle through the background videos (without much luck).

I could achieve this with 70+ macros again, but looking to achieve this an easier way.

I want them to fade in and out also, I'd thought about using 'Move Value' plugin to control the opacity in 'Color Correction' to achieve this.

I'm hoping someone has some guru knowledge on this.

Cheers,
Skew-if
 

Warmuptill

Active Member
Hi guys,
Been at this all week and can't seem to find a solution. I have 72 scenes all with webcam, various overlays, logos, alerts etc. and the only difference is each scene has a different mp4 video for my green screen. I had 70+ macros setup to cycle through the scenes at an interval of 35 seconds. It worked perfectly. However I do occasionally run into some issues/OBS bugs. It becomes very annoying having to edit all 72 scenes when that happens.

Long story short.....I've culled my 72 scenes down to 2. One Master Scene, and a background scene. The background scene is all the mp4 videos, the master scene is is the webcam logos and overlays. Background scene is nested in the master scene.

I'm trying to use a variable being the mp4's and the increment command to have the video source cycle through the background videos (without much luck).

I could achieve this with 70+ macros again, but looking to achieve this an easier way.

I want them to fade in and out also, I'd thought about using 'Move Value' plugin to control the opacity in 'Color Correction' to achieve this.

I'm hoping someone has some guru knowledge on this.

Cheers,
Skew-if
From what you have described I would assume you can set it up like this:
Example.gif


So you use the variable "Index" to decide which source to show and hide all others.

If you want to import the example you can use this code:
Code:
AAAL23ic3Vbfb+I4EP5XIj+1K4ICFFF463KsDqnd5aC7L6fVykmGxGpiR7bD0a36v9+M85PSbaWT7h4OCSn5PJ4Zf/PNOE8s55FWhi3+fGKS58AWbC0jDTlIywYs0aos2GLPMwMDVvDSwI4f4COk/CCUZougRns2mmcZZC2g5DLlMukszIMoVkeIvsid5dp2uFXFTWSFkma9/6zsb0p2myhwqrRdCh2Vwq4OPCs52fYtliX6yJdKxoKWlilED2tpQaN1axe9afTEyDP0HoLheP7iN2D2saClZwwrhXU0HEAbl88I0VhFDzuwVsjEkC8NiTAYo80i5WZbyo+ltbTF6rLCNsTlGYo82dLc8rBHayqSNMO/Xe/bs5h7XXaU6cb/PRwxRYbxWF2tE9zFZHSS87WvFYar0UmQKqPaqIvvcQ0epT082fGJEnpri8uY9hBv6xgNeHwwxnfi9An0J3MejOfBtR/NZnv/ahoEfngNI38/mwezUTifXU8m7EUV3PZKUm3AXZEJi5XYKCMq/aDyC+qA0RzrWT9fBVfP32sHK8ytcvLrvZPZuN0b0M6m4L8r+wCP5rSFKhB3f29Z70NWJUkGm5dwx6eLayChJu2rLFJZxgsD8XlTnIon6mPs7tHL3CNSJoh8K3KU6oBlKhGRE3dcatdtdyoWe0E6fnJWPzApYzUXsmoCA5Sleb2Pgvf65rk16CK+5mryvqvOwfgfJkM1zPFgSG4d0eDk23ZYv6Jxb9yBSVU31XoesYY8+k8KeOBa8DCjvgVJD3EzTZqVz82sj+HIOnjc4kiUiD2HZyF4BjJwuTMa1PpbRSPDN1nm9duISGpViqQNmjOu4yNb+CN8L8Od1XjcevQHfUj8rEqPvQPHDadOQy9s+IHV2B23Uep8odVeyHhLKBFXnbJ/CVnRm/mqqGmnYtNGjIieaRh5VnmEuBhFxiM4XatB7y9h0yYPHCZ7kbwVtyL7JGzObbo6FhpMpQcWgcguLjSXscovLr1L74M3vWS9km+0yotOSUIWpW0wdoNuEuk5PVOeTQUXlYe1M6bMU5XFvYtHnC0w3we6/zyLR/Z9p5mD0EpS5b6d6uXrbrXdbL98Wt+uSAgRSNi1yqCZ0LRv/S1BirSQF+jmZFk0gnByfTm3nd817qvk2bXtqN+0sdBN4MCJEjV0CzLBOv1iR8HjGI3wewSzubpGsXID983yv9qR7kg/DsKIUOAl8njeme+TuSMLJ0SPe2Epo9RTe8+oUkdgWJ+3V9xMK9bvTypApPDacPR/Z2DyKgPUEWcia+dnNyErH+6OahhzFz20XwemuqZdgzVt4zAyO/SA3pd25Zsulpva6RiFDXteZraZsQHrbo4/SiihDtS2DBsNx7Ph2J8GfjINw3g+Gofs+W/JAw8G

If you want the sources to fade in/out I would suggest to set the show/hide transition to "Fade" with the desired duration.

Example2.gif


Hope that helps!
Let me know if you have questions!
 

AaronD

Active Member
...72 scenes all with webcam, various overlays, logos, alerts etc. and the only difference is each scene has a different mp4 video for my green screen...very annoying having to edit all 72 scenes...

Long story short.....I've culled my 72 scenes down to 2. One Master Scene, and a background scene. The background scene is all the mp4 videos, the master scene is is the webcam logos and overlays. Background scene is nested in the master scene.
Another way to do it might be to use the Downstream Keyer plugin in addition to Adv. SS:
DSK works later in the chain than usual, and puts one more scene on top of what would otherwise be OBS's final output. Transparency or no content in that DSK'ed scene is your friend!

So, go back to 73 scenes - one for each video with only that one thing in each, plus the "master" - and 73 macros unfortunately - one to switch to each video, plus the sequence - and then use either the Sequence or Random action in that "master macro" to change them automatically.
Then, use the Downstream Keyer to put the "master scene" on top of that.
 

Skew-if

New Member
From what you have described I would assume you can set it up like this:
View attachment 108418

So you use the variable "Index" to decide which source to show and hide all others.

If you want to import the example you can use this code:
Code:
AAAL23ic3Vbfb+I4EP5XIj+1K4ICFFF463KsDqnd5aC7L6fVykmGxGpiR7bD0a36v9+M85PSbaWT7h4OCSn5PJ4Zf/PNOE8s55FWhi3+fGKS58AWbC0jDTlIywYs0aos2GLPMwMDVvDSwI4f4COk/CCUZougRns2mmcZZC2g5DLlMukszIMoVkeIvsid5dp2uFXFTWSFkma9/6zsb0p2myhwqrRdCh2Vwq4OPCs52fYtliX6yJdKxoKWlilED2tpQaN1axe9afTEyDP0HoLheP7iN2D2saClZwwrhXU0HEAbl88I0VhFDzuwVsjEkC8NiTAYo80i5WZbyo+ltbTF6rLCNsTlGYo82dLc8rBHayqSNMO/Xe/bs5h7XXaU6cb/PRwxRYbxWF2tE9zFZHSS87WvFYar0UmQKqPaqIvvcQ0epT082fGJEnpri8uY9hBv6xgNeHwwxnfi9An0J3MejOfBtR/NZnv/ahoEfngNI38/mwezUTifXU8m7EUV3PZKUm3AXZEJi5XYKCMq/aDyC+qA0RzrWT9fBVfP32sHK8ytcvLrvZPZuN0b0M6m4L8r+wCP5rSFKhB3f29Z70NWJUkGm5dwx6eLayChJu2rLFJZxgsD8XlTnIon6mPs7tHL3CNSJoh8K3KU6oBlKhGRE3dcatdtdyoWe0E6fnJWPzApYzUXsmoCA5Sleb2Pgvf65rk16CK+5mryvqvOwfgfJkM1zPFgSG4d0eDk23ZYv6Jxb9yBSVU31XoesYY8+k8KeOBa8DCjvgVJD3EzTZqVz82sj+HIOnjc4kiUiD2HZyF4BjJwuTMa1PpbRSPDN1nm9duISGpViqQNmjOu4yNb+CN8L8Od1XjcevQHfUj8rEqPvQPHDadOQy9s+IHV2B23Uep8odVeyHhLKBFXnbJ/CVnRm/mqqGmnYtNGjIieaRh5VnmEuBhFxiM4XatB7y9h0yYPHCZ7kbwVtyL7JGzObbo6FhpMpQcWgcguLjSXscovLr1L74M3vWS9km+0yotOSUIWpW0wdoNuEuk5PVOeTQUXlYe1M6bMU5XFvYtHnC0w3we6/zyLR/Z9p5mD0EpS5b6d6uXrbrXdbL98Wt+uSAgRSNi1yqCZ0LRv/S1BirSQF+jmZFk0gnByfTm3nd817qvk2bXtqN+0sdBN4MCJEjV0CzLBOv1iR8HjGI3wewSzubpGsXID983yv9qR7kg/DsKIUOAl8njeme+TuSMLJ0SPe2Epo9RTe8+oUkdgWJ+3V9xMK9bvTypApPDacPR/Z2DyKgPUEWcia+dnNyErH+6OahhzFz20XwemuqZdgzVt4zAyO/SA3pd25Zsulpva6RiFDXteZraZsQHrbo4/SiihDtS2DBsNx7Ph2J8GfjINw3g+Gofs+W/JAw8G

If you want the sources to fade in/out I would suggest to set the show/hide transition to "Fade" with the desired duration.

View attachment 108419

Hope that helps!
Let me know if you have questions!
Absolute genius!!! Man I appreciate your time and effort for showcasing those skills. Also I didn't even realise you could set transitions on sources. I can't thank you enough @Warmuptill :)
 

Skew-if

New Member
Another way to do it might be to use the Downstream Keyer plugin in addition to Adv. SS:
DSK works later in the chain than usual, and puts one more scene on top of what would otherwise be OBS's final output. Transparency or no content in that DSK'ed scene is your friend!

So, go back to 73 scenes - one for each video with only that one thing in each, plus the "master" - and 73 macros unfortunately - one to switch to each video, plus the sequence - and then use either the Sequence or Random action in that "master macro" to change them automatically.
Then, use the Downstream Keyer to put the "master scene" on top of that.
Thanks @AaronD. Appreciate you man! My main goal was to cull my scenes down to the bare minimum. But many thanks for taking the time to respond with another option. Big ups brother!!
 

Warmuptill

Active Member
Just a heads up for users using the new OBS 31 beta releases:
The UI of the plugin might be broken / some functionality might not work as expected.
A beta release of the Advanced Scene Switcher which is compatible with OBS 31 can be found here:

Here is an overview of the included changes:

Important notes:​

  • The minimum supported OBS version is now OBS 30.1.2 on all platforms in preparation for OBS 31 support.
  • Please make sure to back up your settings!
  • The legacy tabs "Scene Triggers" and "Network" were removed. (More details below)
  • If you run into any issues, please either post in the OBS forums or create an issue on GitHub!

Additions:​

  • Added the "Stream Deck" condition type.
    It will allow you to trigger macros using a stream deck.
    The stream deck plugin to support this condition type can be found here on GitHub:
    https://github.com/WarmUpTill/advanced-scene-switcher-streamdeck-plugin/releases
  • Added additional macro properties that will be available for Variables when using a Media condition.
    Especially in the case of using a "VLC source" this allows you to query a bunch of metadata about the item being currently played.
  • Added the option to enable short circuit evaluation of conditions.
    This is mainly intended to enable users to skip resource intensive condition checks if they would not change the overall outcome of the condition evaluation.
  • Added the option to specify a custom macro condition check interval on a per macro basis.
    For example, this should allow you to reduce the frequency of resource intensive checks (e.g. video pattern matching) while increasing the responsiveness of other macros.
  • Added the option to configure if macro will be in state "unpaused" or "paused" on startup.
    The default will remain that the pause state persists across OBS startups.
  • Added the option to wait for media playback to end to the "Media" action type.
    This should enable some users to simplify their macro setups.
  • Added the option to check if users joined or left a given Twitch channel's chat room.
    The username is available in a corresponding macro property.
  • Added more actions to modify variable values (trim and case change actions) (Destroy666x)
  • Added the option to assign the base64 encoded PNG of a screenshot captured with the "Screenshot" action to a variable.
  • Added a new log level to log executed macros, but not individual actions being performed.

Other changes:​

  • Removed legacy tabs "Scene Triggers" and "Network".
    The former was a precursor to the Macro tab, with the only condition being "Scene" and a tiny subset of the actions now available for macros.
    A description of how you can translate the entries on the "Scene Trigger" tab to macros can be found here.
    The latter set up a custom websocket server / client to synchronize the currently active scene between OBS instances.
    A description of how to set this up using macros can be found here.
    If you are affected by those tabs being removed and the guides above do not help, please do not hesitate to reach out, and I will guide you on how you can setup macros to achieve the same functionality.
    I apologize if this is causing issues!
    I do not have any concrete plans to remove other legacy tabs yet.
  • The priority settings section on the General tab is now hidden when legacy tabs are hidden.
  • Increased volume meter scale in the "Audio" condition type from [-60dB, 0dB] to [-100dB, 0dB].
  • Added the option to select all items in a "Group" source for scene item selections.
  • Added regex options to scene name pattern check of the "Scene" condition type.
  • Added a context menu entry to remove selected macro segment.
  • Added the option to disable the settings being saved when switching between macros.
    This option is only intended for users with huge macro setups, for which this saving of setting introduces a noticable delay when switching between macros.
  • New macros are now added after the currently selected macro instead of at the end of the macro list.
  • Added option to trim screenshots created in "Video" condition for pattern matching.
  • Added more Twitch chat message and macro properties. (Destroy666x)
  • Allow using regex capture groups in replacement (Destroy666x)
  • UI improvements to the Variable tab. (Destroy666x)
  • Minor UI changes.
  • Updated Japanese locale (tansancola).

Fixes:​

  • Fixed "Transition" condition being able to miss the start of very fast transitions (e.g. "Cut) in certain scenarios.
  • Fixed "QCssParser::parseColorValue" showing up in the OBS log.
  • Fixed minor UI issues related to macro segment highlighting.
  • Fixed a crashes when using certain special chracters in file selection widgets throughout the plugin.
  • Fixed a crash when changing position of a scene item using the "Scene item transform" action type.
  • Fixed macro action paste happening in the wrong section in certain scenarios.
  • Fixed the "Process" condition not respecting the selected regex options.
  • Added a workaround for obs_source_set_sync_offset() not applying the given audio sync offset for a given source in the "Audio" action type.
  • Fixed connecting Twitch account leading to OBS freeze in some scenarios.
 

Cynaxia

New Member
Is there a way to force Advanced Scene Switcher to apply changes while stinger happens ?
So right now for me it looks like this (I have same source, with some blur on it that's enabled and disabled depending on scene using Advanced Switcher), I'm sitting on a non blur scene, when I switch scene 3 second Stinger hits, but instead of enabling blur filter underneath the stinge Advanced Switcher enables blur and all changes for that matter only when stinger is finished. Any way around it so that it would be all subtle under the stinger ?
 
Top