Advanced Scene Switcher

Advanced Scene Switcher 1.37.2

I am not sure if installing a binary built for Ubuntu 22 on Ubuntu 24 will work, but after some googling it seems like you can force install packages with dpkg --force-all -i <path-to-deb>.
Yes, that worked, and Adv. SS runs now. Says it can't load the opencv plugin, but that's expected.
Code:
true-light@true-light-projection:~$ sudo dpkg --force-all -i /home/true-light/Downloads/advanced-scene-switcher-1.27.2-x86_64-linux-gnu.deb
[sudo] password for true-light:
Selecting previously unselected package advanced-scene-switcher.
(Reading database ... 455078 files and directories currently installed.)
Preparing to unpack .../advanced-scene-switcher-1.27.2-x86_64-linux-gnu.deb ...
Unpacking advanced-scene-switcher (1.27.2) ...
dpkg: advanced-scene-switcher: dependency problems, but configuring anyway as you requested:
 advanced-scene-switcher depends on libopencv-core4.5d (>= 4.5.4+dfsg); however:
  Package libopencv-core4.5d is not installed.
 advanced-scene-switcher depends on libopencv-imgproc4.5d (>= 4.5.4+dfsg); however:
  Package libopencv-imgproc4.5d is not installed.
 advanced-scene-switcher depends on libopencv-objdetect4.5d (>= 4.5.4+dfsg); however:
  Package libopencv-objdetect4.5d is not installed.

Setting up advanced-scene-switcher (1.27.2) ...
true-light@true-light-projection:~$
But now the normal system update seems to get hung up on that, and not want to continue:
Code:
true-light@true-light-projection:~$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 advanced-scene-switcher : Depends: libopencv-core4.5d (>= 4.5.4+dfsg) but it is not installable
                           Depends: libopencv-imgproc4.5d (>= 4.5.4+dfsg) but it is not installable
                           Depends: libopencv-objdetect4.5d (>= 4.5.4+dfsg) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
true-light@true-light-projection:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  advanced-scene-switcher
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
After this operation, 58.3 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.
true-light@true-light-projection:~$
 
Yes, that worked, and Adv. SS runs now. Says it can't load the opencv plugin, but that's expected.
Code:
true-light@true-light-projection:~$ sudo dpkg --force-all -i /home/true-light/Downloads/advanced-scene-switcher-1.27.2-x86_64-linux-gnu.deb
[sudo] password for true-light:
Selecting previously unselected package advanced-scene-switcher.
(Reading database ... 455078 files and directories currently installed.)
Preparing to unpack .../advanced-scene-switcher-1.27.2-x86_64-linux-gnu.deb ...
Unpacking advanced-scene-switcher (1.27.2) ...
dpkg: advanced-scene-switcher: dependency problems, but configuring anyway as you requested:
 advanced-scene-switcher depends on libopencv-core4.5d (>= 4.5.4+dfsg); however:
  Package libopencv-core4.5d is not installed.
 advanced-scene-switcher depends on libopencv-imgproc4.5d (>= 4.5.4+dfsg); however:
  Package libopencv-imgproc4.5d is not installed.
 advanced-scene-switcher depends on libopencv-objdetect4.5d (>= 4.5.4+dfsg); however:
  Package libopencv-objdetect4.5d is not installed.

Setting up advanced-scene-switcher (1.27.2) ...
true-light@true-light-projection:~$
But now the normal system update seems to get hung up on that, and not want to continue:
Code:
true-light@true-light-projection:~$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 advanced-scene-switcher : Depends: libopencv-core4.5d (>= 4.5.4+dfsg) but it is not installable
                           Depends: libopencv-imgproc4.5d (>= 4.5.4+dfsg) but it is not installable
                           Depends: libopencv-objdetect4.5d (>= 4.5.4+dfsg) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
true-light@true-light-projection:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  advanced-scene-switcher
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
After this operation, 58.3 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.
true-light@true-light-projection:~$
While not ideal you could always put the binaries in place manually.
The files should be contained in "advanced-scene-switcher-1.27.2-x86_64-linux-gnu.tar.xz".
 
While not ideal you could always put the binaries in place manually.
The files should be contained in "advanced-scene-switcher-1.27.2-x86_64-linux-gnu.tar.xz".
Sorry, I've forgotten where things go anymore. The deb is just too easy. :-)

Previous versions, remembering from several years ago, came with instructions inside the tarball. Maybe you could bring that back?
Thanks!
 
Previous versions, remembering from several years ago, came with instructions inside the tarball. Maybe you could bring that back?
Thanks!
Looks like the last version to do that was 1.17.7, released on Jun 12, 2022, and it's also the last to not have a deb yet.

Unfortunately, the folder structure back then was different from modern OBS and modern Adv. SS. A different plugin - Downstream Keyer - still uses the old structure, and if I create that structure, it still works, but Adv. SS uses the new one that I'm not familiar with.
 
You can check whether a source is muted or unmuted using the "Audio" condition type.
View attachment 107849

Sorry if I am still misunderstanding your request.


I am not sure if installing a binary built for Ubuntu 22 on Ubuntu 24 will work, but after some googling it seems like you can force install packages with dpkg --force-all -i <path-to-deb>.
Oooohhh! I guess I hadn't looked in that dropdown because I wouldn't consider it a volume level attribute, but instead, a separate condition type of its own. That's all fine though, now that I know it's there. Thank you so much!
 
Issue Reporting:

Version 1.27.2 under windows 10, OBS version 30.2.3

Audio condition / Output volume

Volume below -60.00dB can be adjusted and displayed, but it will not be properly saved, instead, any value lower than -60.00dB will be saved as -60.00dB.
 
Issue Reporting:

Version 1.27.2 under windows 10, OBS version 30.2.3

Audio condition / Output volume

Volume below -60.00dB can be adjusted and displayed, but it will not be properly saved, instead, any value lower than -60.00dB will be saved as -60.00dB.
Thanks for reporting the issue.

The value you input manually does get saved.
It "onlys" got reset to the lowest possible value the widget can represent the next time you open up the settings for that condition.
So, this was mainly a UI bug.

A build with a fix is available here in a few minutes:
1726772298441.png

You will have to be logged into GitHub to be able to download it.
Let me know if that should be a problem.

To be honest I never expected anyone to require detecting volume levels lower than -60db, as that is also where the visual scale of the volume-meter-widget on OBS side ends.
Just out of curiosity, what is the use case? (If you can share that information)
 
I can't get this to work properly. If I restart OBS, it wil work correctly once or twice, and then stops working, not hiding the sources any more. Pressing the "run macro" button, though, hides the sources no matter what, like the if statement did not matter.

screen cap.png
 
Looks like the last version to do that was 1.17.7, released on Jun 12, 2022, and it's also the last to not have a deb yet.

Unfortunately, the folder structure back then was different from modern OBS and modern Adv. SS. A different plugin - Downstream Keyer - still uses the old structure, and if I create that structure, it still works, but Adv. SS uses the new one that I'm not familiar with.
Bump?

Since the deb doesn't work for me (dependencies for things I won't use), where do I put the contents of the Linux tarball?
 
Thanks for reporting the issue.

The value you input manually does get saved.
It "onlys" got reset to the lowest possible value the widget can represent the next time you open up the settings for that condition.
So, this was mainly a UI bug.

A build with a fix is available here in a few minutes:
View attachment 107902
You will have to be logged into GitHub to be able to download it.
Let me know if that should be a problem.

To be honest I never expected anyone to require detecting volume levels lower than -60db, as that is also where the visual scale of the volume-meter-widget on OBS side ends.
Just out of curiosity, what is the use case? (If you can share that information)
I have an iPad as an audio/video source, it connects wirelessly to a Windows sound device which gets monitored by Scene Switcher to check if it's playing anything, so OBS could retrieve iPad screen content and display it live with the sound in "Playing Scene". Otherwise, the scene will revert to "Default Scene".

-60.00dB minimal threshold causes the quiet part of the sound to trigger scene revert back to "Default Scene" which is not desired. And there are a number of songs with longer than a few hundred ms of < -60dBFS audio content, I encountered this issue more than a year ago, to make it work, I maxed out 3 consecutive OBS Built-in Gain filters to a total of +90dB gain to make sure even the lowest possible audio present in a 24Bit 144dB dynamic range audio signal could properly trigger the -60.00dB Condition evaluation.
 
I can't get this to work properly. If I restart OBS, it wil work correctly once or twice, and then stops working, not hiding the sources any more. Pressing the "run macro" button, though, hides the sources no matter what, like the if statement did not matter.

View attachment 107903
Run macro is not quite accurate, in fact it only runs the actions (or else actions is you hold Shift).

Also, you haven't stated your goal, so hard to say. My best guess is that you need to have "perform actions only on condition change" unchecked because some media source stays on "ended" state.
 
Run macro is not quite accurate, in fact it only runs the actions (or else actions is you hold Shift).

Also, you haven't stated your goal, so hard to say. My best guess is that you need to have "perform actions only on condition change" unchecked because some media source stays on "ended" state.

Thank you for your answer! My goal was that these media (audio) files turned unvisible after playing, to prevent them to play on OBS start and also to better interact with Downstream Keyer excluded scenes. I did try checking and unchecking all the options, no success. What finally solved the problem for me was this "If not" statement:

screen cap.png
 
Thank you for your answer! My goal was that these media (audio) files turned unvisible after playing, to prevent them to play on OBS start and also to better interact with Downstream Keyer excluded scenes. I did try checking and unchecking all the options, no success. What finally solved the problem for me was this "If not" statement:

View attachment 107919
Glad to hear that you managed to get it to working.
Just to mention it in case it is of use:

If you want something to run on OBS / plugin startup you can use this condition:
1726849962486.png



Bump?

Since the deb doesn't work for me (dependencies for things I won't use), where do I put the contents of the Linux tarball?
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!
 
Thank you for your answer! My goal was that these media (audio) files turned unvisible after playing, to prevent them to play on OBS start and also to better interact with Downstream Keyer excluded scenes. I did try checking and unchecking all the options, no success. What finally solved the problem for me was this "If not" statement:

View attachment 107919
Yeah, I haven't had much luck with the Ended condition either. Seems that people (and myself) expect it to be "has played in this session and is not playing now", when it actually means something more specific than that. Exactly what that is, I still don't know entirely, because I found something else that does better anyway, for what I do with it:

If Playing and Time remaining shorter than 0.5 sec
Switch scenes with 0.5 sec transition

So it fires early, on purpose, to make room for a transition while the video is still playing. Makes it look a lot better that way!
 
Yeah, I haven't had much luck with the Ended condition either. Seems that people (and myself) expect it to be "has played in this session and is not playing now", when it actually means something more specific than that. Exactly what that is, I still don't know entirely, because I found something else that does better anyway, for what I do with it:
Unfortunately, what those states exactly represent entirely depends on the implementation of a given source type.
 
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!
 
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
 
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.
 
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.
 
Back
Top