Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

AaronD

Active Member
restructuring / redesigning the plugin to support this is unfortunately not an option for me at the moment.
Yes, it would be a lot of work to add that functionality into the format that presently exists. Hence the completely different format, and the note that that different format already exists, so why not use that.

Keep the GUI, mostly as-is - maybe even simplify it: remove the more confusing parts, or the harder things to maintain - and have it be a "Lite" version that is still graphical. Easy to use, and kept that way. Intentionally limited to avoid confusion. Then have the python tab that can do absolutely anything at all, but requires knowledge of python (and in the more complex cases, software management) to do it.

If you do *remove* functionality though, then you'd need a migration tool that converts an old macro into an equivalent chunk of python code. Given the limited nature of the macros by comparison, that shouldn't be *too* hard once you get going, but it's not trivial either. Good design up front would make a big difference, and would almost certainly become a tradeoff between up-front translation, and ongoing ease of use and maintenance.

(Mile-long string of parameters in a single function, vs. several functions to build up an underlying state that is used by the final function, for just one example. The latter of those options would probably be more readable, and allow keeping the same state across many "final" uses, not that the automated translator needs to know about the reuse. It can rebuild the state every time, and I'd call that "okay".)

Generally, it's a good amount of work up front, for hopefully a lot less work later if you do it right! New functionality, if you want it to appear in both places, then involves the GUI once, and the underlying code once. Both are inherited by both tabs, in different ways: the macros as they are now (possibly with the "complex software" functionality removed), and python as the code generator and library function(s).

What I could maybe do without too much effort is to add some of that functionality to the "Macro" action which already lets you run the action of other macros.
View attachment 103632
Adding a checkbox to only perform those steps if the conditions of the selected macro evaluated to "true" might be quite straight forward.
That would be a good workaround at the moment, if you're really against the python tab.

But I think there'd have be *two* separate macro selections. One to run the actions of and one to check the conditions of, not necessarily the same. That avoids a maintenance nightmare on the user's end, with a big pile of macros that all have identical actions and different conditions or vice-versa.

And it also solves the problem of these macros just running on their own, since they have both conditions and actions. Now they don't have to: conditions with no actions does nothing on its own, and actions with no conditions also does nothing on its own. Then use this new functionality in the Macro action to put them together.

Of course, if you only had a checkbox and not a second selection, the maintenance problem could still be lessened if all of the condition macros had a single Macro action, that pointed to the actual code to run, but that's getting pretty silly and convoluted. And they'd all have to be paused, and their conditions as checked in the Macro action would still have to work when they're paused.

Not that that wouldn't be a workable chip design, along with a C or higher-language compiler that sorts it all out for you in the background...but it gets pretty clunky on a "chip" that you're designing to be directly hand-programmable in assembly, as Adv. SS macros kinda are.

I'd still consider it to be a non-ideal workaround though, mostly because the complete conditions and complete actions are not directly visible next to each other in context. That's also a problem in other languages when you share behavior across different parts of the code: a poorly-named function (macro in this case) that's used everywhere leaves you scratching your head about what it does, and you have to go track it down and read its code to find out.
 
Last edited:

mebanna

New Member
I ofen record live shows with two camera simultaneously. At the same moment, I live streaming the show with OBS.
During the live streaming, I do scene (camera) switch between the two camera, via Advanced scene switcher.

My problem is:
Afther the live show, when I do Post-editing in premiere, I have to MANUALLY do camera swithch again..
Is there any possibility to save the log of scene-swith during the live streaming ? XML format would be great., so that I can import to Premiere.

( I know OBS can record the streaming show directly. But for the best video quality, and to fix those unexpected mistake during streaming, I need do post-edit with camera's original material. )

Quote Reply
Report
 

Warmuptill

Active Member
I ofen record live shows with two camera simultaneously. At the same moment, I live streaming the show with OBS.
During the live streaming, I do scene (camera) switch between the two camera, via Advanced scene switcher.

My problem is:
Afther the live show, when I do Post-editing in premiere, I have to MANUALLY do camera swithch again..
Is there any possibility to save the log of scene-swith during the live streaming ? XML format would be great., so that I can import to Premiere.

( I know OBS can record the streaming show directly. But for the best video quality, and to fix those unexpected mistake during streaming, I need do post-edit with camera's original material. )

Quote Reply
Report
The easiest way is probably to simply use the "Log" action type to write a log message to the OBS log.
These messages will be timestamped automatically.

1715099899606.png


You can find the OBS log files under Help -> Log Files -> Show Log Files.

You could of course also write to a custom file by using the "File" option but you will have to handle the time stamps yourself.

1715100049298.png
 

ukie

Member
Is there any way to trigger a macro based on whether an audio source is muted or unmuted?
It does not seem to be available under the "Audio" trigger. I tried using the Audio>Output Volume, but even if the source is muted, it still shows output volume.
 

LuckJury

New Member
First off, let me echo so many others - thank you so much for creating this plugin, it fundamentally changes my usage of OBS and enables me to stream in a way that would otherwise be impossible.

After years of using this plugin on Windows, I'm trying to get things working on Linux. I've installed OBS Studio via the Linux Mint Software Manager, which appears to install the flatpack version. Everything works fine until I install the Advanced Scene Switcher. After installing, OBS fails to launch. Running in a terminal gives the following error if run in an rdp session with dummy audio:

ALSA lib ../../../src/seq/seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: Permission denied
terminate called after throwing an instance of 'libremidi::driver_error'
what(): observer_alsa: snd_seq_open failed

This line precedes the error:

info: [adv-ss] attempting to load "/app/plugins/lib/obs-plugins/adv-ss-plugins/advanced-scene-switcher-midi.so"

If I run it in a normal session, it just hangs on this line.

I'm running Linux Mint 21.3 Cinnamon. I did try installing the plugin manually before realizing that the software manager had installed the flatpak version and accordingly I could install the plugin via the flatpak command, which is how we came to the current state. That is to say, it's possible that I've put some of the plugin files in folders that I've forgotten about somewhere on the system, possibly contributing to my issue.

I'm pretty new to linux so please accept my apologies if I've left out important or useful information and thank you in advance.
 

Warmuptill

Active Member
ALSA lib ../../../src/seq/seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: Permission denied
terminate called after throwing an instance of 'libremidi::driver_error'
what(): observer_alsa: snd_seq_open failed
That could indeed be a problem with the midi plugin of the advanced scene switcher.
Can you share the complete log file just in case it contains additional information?

As a quick workaround you could simply remove the "advanced-scene-switcher-midi.so" file, if you don't rely on the MIDI functionality offered by the plugin.
Unfortunately, I am not sure where exactly it is stored for flatpak installations.

I will try to look into fixing this issue as soon as I can and release a fix.
 

LuckJury

New Member
That could indeed be a problem with the midi plugin of the advanced scene switcher.
Can you share the complete log file just in case it contains additional information?

As a quick workaround you could simply remove the "advanced-scene-switcher-midi.so" file, if you don't rely on the MIDI functionality offered by the plugin.
Unfortunately, I am not sure where exactly it is stored for flatpak installations.

I will try to look into fixing this issue as soon as I can and release a fix.
Complete log file attached here. I'll see if I can locate where the file is and remove or rename it, and I'll report back with my findings, assuming I'm able to do so.
 

Attachments

  • 2024-05-08 19-35-24.txt
    4.6 KB · Views: 8

LuckJury

New Member
I located the file at this location:

/var/lib/flatpak/runtime/com.obsproject.Studio.Plugin.SceneSwitcher/x86_64/stable/active/files/lib/obs-plugins/adv-ss-plugins

Removing the advanced-scene-switcher-midi.so file from that folder does in fact allow OBS to launch correctly and, at least at first blush, Advanced Scene Switcher seems ready to do everything that I want it to. Thanks so much for the quick reply!
 

ukie

Member
Using the "Window>focus window" action does not trigger a change of windows (on Windows 11 at least).
For example, if trying to trigger to focus the OBS window, the program will be highlighted in the taskbar, but the window does not come into focus.
I am using a two-monitor setup, with the secondary display used for OBS Multiview.
Any suggestions? Could this be a Windows 11 setting?
 

Warmuptill

Active Member
This mentions that "The focus, maximize, minimize, and close options will now be performed on all windows matching the given window title instead of only the first one being found."

However, it still does not bring the main window into focus. I have the Window>focus window: "OBS" action.
There should be another entry which looks something like this:
1715372027825.png

Just "OBS" is something else.
 

Warmuptill

Active Member
Tried that one as well. Same behavior. No response.
I think I have an idea what the issue might be.
A build with a fix will be available here in a few minutes:
You will have to be logged into GitHub to be able to download it.
Let me know if that should be an issue.

Can you please test it and report back if this resolves the problem?

i'm having issues with new version
View attachment 103784
Hm ... I am not sure what is causing that.
Is the issue resolved if you install the most recent version of the Microsoft Visual C++ Redistributable?


I apologize for not having caught those issues!
 

hmeneses

Member
I think I have an idea what the issue might be.
A build with a fix will be available here in a few minutes:
You will have to be logged into GitHub to be able to download it.
Let me know if that should be an issue.

Can you please test it and report back if this resolves the problem?


Hm ... I am not sure what is causing that.
Is the issue resolved if you install the most recent version of the Microsoft Visual C++ Redistributable?


I apologize for not having caught those issues!
yup that fixed it
thanks!
 

ukie

Member
I think I have an idea what the issue might be.
A build with a fix will be available here in a few minutes:
You will have to be logged into GitHub to be able to download it.
Let me know if that should be an issue.

Can you please test it and report back if this resolves the problem?


Hm ... I am not sure what is causing that.
Is the issue resolved if you install the most recent version of the Microsoft Visual C++ Redistributable?


I apologize for not having caught those issues!
This works better. The minimize and maximize actions now work.
However "focus window" only brings up the taskbar (it's set to hide automatically for me) with OBS icon blinking in red. The actual OBS window does not come to the foreground.
 

Warmuptill

Active Member
This works better. The minimize and maximize actions now work.
However "focus window" only brings up the taskbar (it's set to hide automatically for me) with OBS icon blinking in red. The actual OBS window does not come to the foreground.
Thanks for giving it a try!

Hm ... that is really strange.
In what "state" is the OBS window when you are trying to focus it?
I still have trouble replicating the issue on my end.
 
Top