Advanced Scene Switcher

Advanced Scene Switcher 1.27.2

Rozenman

New Member
Thanks for reporting the crash!

A build with a fix will be available here in a few minutes:

Note that you have to be logged into GitHub to be able to download it.
Let me know if that should be an issue.
Dear Warmuptill,
For some reason I can't download the file - there is only text, and I can't find the link.
 

Warmuptill

Active Member
Dear Warmuptill,
For some reason I can't download the file - there is only text, and I can't find the link.
You will have to be logged into GitHub to be able to download the build.
Otherwise the option to download the build is not visible.
1726506129655.png

Let me know if that should be an issue.
 

sgort87

New Member
Hello! Just got your reply on the review page. Sorry I didn't see this discussion area, but you definitely deserve the 5-star I put in for this. <3

Anyway, I do see that the output level of Audio sources is available as a Condition, however I'm looking to use the Mute State instead (the red X/speaker symbol button). I like this source to stay visible and active, but usually mute it going out to stream. What I'd like to do in particular is to mute this automatically when switching to an Away scene, and unmuting when returning to an Active scene, but only if it was previously unmuted. I can't simply use the volume level, as I'd like to fully disregard what's going on with the volume slider position and signal level for this functionality. I have other sources that will be using this as well, which additionally have audio monitoring output filters, so using source visibility isn't possible or practical either.
1726517472900.png
1726517429398.png

Thank you so much for your help!
 

Attachments

  • 1726517418850.png
    1726517418850.png
    3.8 KB · Views: 3
  • 1726517446515.png
    1726517446515.png
    3.8 KB · Views: 3

AaronD

Active Member
@Warmuptill
It appears that the new Ubuntu 24.04 LTS isn't quite ready for you yet. Specifically, it doesn't like OpenCV:
Code:
true-light@true-light-projection:~$ sudo apt install /home/true-light/Downloads/advanced-scene-switcher-1.27.2-x86_64-linux-gnu.deb
[sudo] password for true-light:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'advanced-scene-switcher' instead of '/home/true-light/Downloads/advanced-scene-switcher-1.27.2-x86_64-linux-gnu.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

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: Unable to correct problems, you have held broken packages.
true-light@true-light-projection:~$
Code:
Operating System: Ubuntu Studio 24.04
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13
Kernel Version: 6.8.0-45-lowlatency (64-bit)
Graphics Platform: X11
Processors: 4 × AMD Phenom(tm) II X4 960T Processor
Memory: 7.8 GiB of RAM
Graphics Processor: AMD JUNIPER
Manufacturer: MICRO-STAR INTERNATIONAL CO.,LTD
Product Name: MS-7576
System Version: 1.0
I know it's an older machine that probably can't encode video (no streaming or recording), but I'm using it just for the full-screen projector to an audience. I think it'll do that.

So far, I only need Adv. SS to fade audio sources in and out based on scene transitions. I don't need OpenCV at all. If it's easier to not have that functionality (double the number of installers?), then that's fine with me, but it gets to be a mess in a hurry to have a bunch of those options.

Alternately, how can I install that dependency? A "dummy package" that technically satisfies it but does nothing when used, might work...or it might cause other problems down the road.

Or, maybe not have that formal dependency, but check at runtime and disable the functions if not present. That might be the smoothest option for the user, along with a disable-able popup or other ignore-able message to that effect, and perhaps even offer to install it automatically...
 
Last edited:

Warmuptill

Active Member
Hello! Just got your reply on the review page. Sorry I didn't see this discussion area, but you definitely deserve the 5-star I put in for this. <3

Anyway, I do see that the output level of Audio sources is available as a Condition, however I'm looking to use the Mute State instead (the red X/speaker symbol button). I like this source to stay visible and active, but usually mute it going out to stream. What I'd like to do in particular is to mute this automatically when switching to an Away scene, and unmuting when returning to an Active scene, but only if it was previously unmuted. I can't simply use the volume level, as I'd like to fully disregard what's going on with the volume slider position and signal level for this functionality. I have other sources that will be using this as well, which additionally have audio monitoring output filters, so using source visibility isn't possible or practical either.
View attachment 107812View attachment 107810
Thank you so much for your help!
You can check whether a source is muted or unmuted using the "Audio" condition type.
1726595807292.png


Sorry if I am still misunderstanding your request.

@Warmuptill
It appears that the new Ubuntu 24.04 LTS isn't quite ready for you yet. Specifically, it doesn't like OpenCV:
Code:
true-light@true-light-projection:~$ sudo apt install /home/true-light/Downloads/advanced-scene-switcher-1.27.2-x86_64-linux-gnu.deb
[sudo] password for true-light:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'advanced-scene-switcher' instead of '/home/true-light/Downloads/advanced-scene-switcher-1.27.2-x86_64-linux-gnu.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

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: Unable to correct problems, you have held broken packages.
true-light@true-light-projection:~$
Code:
Operating System: Ubuntu Studio 24.04
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13
Kernel Version: 6.8.0-45-lowlatency (64-bit)
Graphics Platform: X11
Processors: 4 × AMD Phenom(tm) II X4 960T Processor
Memory: 7.8 GiB of RAM
Graphics Processor: AMD JUNIPER
Manufacturer: MICRO-STAR INTERNATIONAL CO.,LTD
Product Name: MS-7576
System Version: 1.0
I know it's an older machine that probably can't encode video (no streaming or recording), but I'm using it just for the full-screen projector to an audience. I think it'll do that.

So far, I only need Adv. SS to fade audio sources in and out based on scene transitions. I don't need OpenCV at all. If it's easier to not have that functionality (double the number of installers?), then that's fine with me, but it gets to be a mess in a hurry to have a bunch of those options.

Alternately, how can I install that dependency? A "dummy package" that technically satisfies it but does nothing when used, might work...or it might cause other problems down the road.

Or, maybe not have that formal dependency, but check at runtime and disable the functions if not present. That might be the smoothest option for the user, along with a disable-able popup or other ignore-able message to that effect, and perhaps even offer to install it automatically...
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>.
 

AaronD

Active Member
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:~$
 

Warmuptill

Active Member
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".
 

AaronD

Active Member
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!
 

AaronD

Active Member
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.
 

sgort87

New Member
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!
 

M_Jacob_N

New Member
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.
 

Warmuptill

Active Member
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)
 

neilis

New Member
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
 

AaronD

Active Member
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?
 

M_Jacob_N

New Member
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.
 

Destroy666

Member
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.
 

neilis

New Member
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
 

Warmuptill

Active Member
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!
 

AaronD

Active Member
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!
 

Warmuptill

Active Member
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.
 
Top