Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

Igor S

New Member
I ran into another issue, I use controller akai apc40 to run ableton, but when I launch the software - advanced scene switcher stops responding, and vise versa, when advanced scene switcher is running - akai apc40 does not catchup with ableton... Is it impossible to run them both simultaneously?
 

AaronD

Active Member
I ran into another issue, I use controller akai apc40 to run ableton, but when I launch the software - advanced scene switcher stops responding, and vise versa, when advanced scene switcher is running - akai apc40 does not catchup with ableton... Is it impossible to run them both simultaneously?
If they both receive MIDI, do they both grab exclusive control of that MIDI input? If so, then you have the same problem that sound and video used to have (video still does on Windows), where the first device to ask for it gets it, and everything else is either denied or gets an easy-to-generate blank stream. This leads to all kinds of tricks, and routing between apps, to get everything to where it needs to go while technically satisfying the exclusivity rule.

If all you need in Adv. SS is a button or two, can you use hotkeys instead of MIDI? Then the MIDI controller goes to the DAW. There are USB numpads available, that might fit next to the MIDI controller, but keep in mind that your normal keyboard will also have the same hotkeys. It's not specific to the physical keyboard.
 
Which version of the Microsoft Visual C++ Redistributable did you install?
Did you also install the 32bit version? (Just in case)
You can check this in the "Add or remove programs" dialog of Windows.

If you don't rely on the "Video" condition type you can ignore this message / disable the warning on the General tab.
Version 1.23.3 did not contain the "Video" condition type at all by accident and this is likely why you don't see those issues in that version.

If you do need the "Video" condition type but cannot update the Redistributable you can instead install version 1.26.2 of the plugin.

I apologize about this mess!
Unfortunately, I cannot control which version of the Redistributable is installed in the Windows runner images on GitHub used to build the plugin.
I believe the recent OBS beta releases also faced the same issues and will prompt you to install the most recent version of the Redistributable:
I don't use the "video" condition type. I don't see this "video" condition type in the list either.
1719437909525.png

1719436215765.png

As you can see I have installed the latest versions.

I haven't had any issues with the ASS-plugin version 1.26.4. That's why I hadn't mentioned it yet. But because Igor S mentioned it and you came up with the same solution that you gave me last month, I thought I should respond anyway.

The only issue I had with the plugin was last saterday. I disabled the plugin (due to conflicting macros) last Saturday and later I enabled it again. At that last moment OBS Studio crashed during livestream. I have attached the crash report.

No need for apologizing. You're doing a great job by making this very usefull plugin. Thanks for all your efforts.
 

Attachments

  • Crash 2024-06-22 12-42-27.txt
    150 KB · Views: 13
Last edited:

Warmuptill

Active Member
View attachment 105003

how can i solve this problem?
You will have to install the most recent version of the Microsoft Visual C++ 2022 Redistributables.
You can find them here:
 

RandomNerd

New Member
I believe this is the relevant portion of the log for "start commercial" being attempted. It failed again:


14:04:28.681: [adv-ss] performed action "AdvSceneSwitcher.action.twitch.type.commercial.start" with token for "[REDACTED]"
14:04:28.682: [adv-ss] Twitch POST request to https://api.twitch.tv/helix/channels/commercial? began
14:04:28.850: [adv-ss] Failed to start commercial! (400)
 

Warmuptill

Active Member
I believe this is the relevant portion of the log for "start commercial" being attempted. It failed again:


14:04:28.681: [adv-ss] performed action "AdvSceneSwitcher.action.twitch.type.commercial.start" with token for "[REDACTED]"
14:04:28.682: [adv-ss] Twitch POST request to https://api.twitch.tv/helix/channels/commercial? began
14:04:28.850: [adv-ss] Failed to start commercial! (400)
According to the API documentation this could be caused by at least one of the following:

400 Bad Request
  • The broadcaster_id query parameter is required.
  • The length query parameter is required.
  • The ID in broadcaster_id is not valid.
  • To start a commercial, the broadcaster must be streaming live.
  • The broadcaster may not run another commercial until the cooldown period expires. The retry_after field in the previous start commercial response specifies the amount of time the broadcaster must wait between running commercials.

Looking at the code I would expect there to be more information about what caused the problem after the last log line you shared:

Code:
    if (result.status != 200) {
        OBSDataArrayAutoRelease replyArray =
            obs_data_get_array(result.data, "data");
        OBSDataAutoRelease replyData =
            obs_data_array_item(replyArray, 0);
        blog(LOG_INFO,
             "Failed to start commercial! (%d)\n"
             "length: %lld\n"
             "message: %s\n"
             "retry_after: %lld\n",
             result.status, obs_data_get_int(replyData, "length"),
             obs_data_get_string(replyData, "message"),
             obs_data_get_int(replyData, "retry_after"));
    }

Would you mind sharing that information?
By the way - if you don't want to share it publicly here you can also send me a DM here on the forums.
 

RandomNerd

New Member
According to the API documentation this could be caused by at least one of the following:

400 Bad Request
  • The broadcaster_id query parameter is required.
  • The length query parameter is required.
  • The ID in broadcaster_id is not valid.
  • To start a commercial, the broadcaster must be streaming live.
  • The broadcaster may not run another commercial until the cooldown period expires. The retry_after field in the previous start commercial response specifies the amount of time the broadcaster must wait between running commercials.

Looking at the code I would expect there to be more information about what caused the problem after the last log line you shared:

Code:
    if (result.status != 200) {
        OBSDataArrayAutoRelease replyArray =
            obs_data_get_array(result.data, "data");
        OBSDataAutoRelease replyData =
            obs_data_array_item(replyArray, 0);
        blog(LOG_INFO,
             "Failed to start commercial! (%d)\n"
             "length: %lld\n"
             "message: %s\n"
             "retry_after: %lld\n",
             result.status, obs_data_get_int(replyData, "length"),
             obs_data_get_string(replyData, "message"),
             obs_data_get_int(replyData, "retry_after"));
    }

Would you mind sharing that information?
By the way - if you don't want to share it publicly here you can also send me a DM here on the forums.

The next few lines following that line in the log are:


14:04:28.850: length: 0

14:04:28.850: message:

14:04:28.850: retry_after: 0

14:04:28.850:

14:04:28.850: [adv-ss] performed action wait

14:04:28.850: [adv-ss] perform action wait with duration of 183.000000

The last line above is to show there's nothing else there about the 'start commercial' action, because that 183 second wait is the macro executing the next command after it.

I notice it says "length: 0" above. That would presumably be an invalid value for "length". But I do indeed have the length set in the plugin, of 180s:

5WFunzd.png


At this point I think it's worthwhile to mention that I always thought it was weird that the ad length was a field like that, that you can set to any integer value from 0 to 180 inclusive (and that goes to two decimal places (though it won't let you modify either the tenths or hundredths)...huh?), because Twitch only allows you to manually run ads from 30s to 180s (3 min) inclusive, and only in multiples of 30s. I have a feeling something was done improperly in implementation here that could very well be related to the bug I encountered. That field where you see "180.00" above should instead be a dropdown that contains a list of choices that are labeled something like this:

  • 30s
  • 60s (1m)
  • 90s (1m30s)
  • 120s (2m)
  • 150s (2m30s)
  • 180s (3m)
I'd be very surprised if these two things were completely unrelated, but even if they aren't, both merit fixing imo.
 

Warmuptill

Active Member
I notice it says "length: 0" above. That would presumably be an invalid value for "length". But I do indeed have the length set in the plugin, of 180s:
Thanks for sharing the additional log lines!

Unfortunately, it seems like I misinterpreted how the Twitch API will return the error message.
The value "0" only indicates that the Twitch API did not return any value for the field "length", because it does not exist in the error reply.

At this point I think it's worthwhile to mention that I always thought it was weird that the ad length was a field like that, that you can set to any integer value from 0 to 180 inclusive (and that goes to two decimal places (though it won't let you modify either the tenths or hundredths)...huh?), because Twitch only allows you to manually run ads from 30s to 180s (3 min) inclusive, and only in multiples of 30s. I have a feeling something was done improperly in implementation here that could very well be related to the bug I encountered. That field where you see "180.00" above should instead be a dropdown that contains a list of choices that are labeled something like this:

  • 30s
  • 60s (1m)
  • 90s (1m30s)
  • 120s (2m)
  • 150s (2m30s)
  • 180s (3m)
I'd be very surprised if these two things were completely unrelated, but even if they aren't, both merit fixing imo.
The Twitch API does not specify anything about the length values having to be a multiple of 30 seconds.
I could verify that the Twitch API does indeed accept those values with an account which is able to run ads.

Code:
[adv-ss] performed action "AdvSceneSwitcher.action.twitch.type.commercial.start" with token for "-----"
[adv-ss] Twitch POST request to https://api.twitch.tv/helix/channels/commercial? began
[adv-ss] Commercial started! (200)
length: 142
message: Starting commercial break. Keep in mind you are still live and not all viewers will receive a commercial.
retry_after: 480

You cannot modify the tenths or hundredths in your case because you have already selected the maximum value of 180 seconds.

One possible root cause came to mind earlier / sorry if I am stating the obvious:
Your Twitch connection must have the necessary permissions to start commercials:
1719858729167.png


A build where I changed the error logging will be available here in a few minutes:
Unfortunately, you will have to be logged into GitHub to be able to download it.
Let me know if that should be an issue and I will try to upload that test build somewhere else.

I would appreciate if you could give reproducing the issue with this build another try and share the corresponding log messages.

Thank you for you support in tracking down the issue!
 

RandomNerd

New Member
Alright, installed that build, tried again, got the more detailed error, it said I wasn't live yet. I changed the wait between the "start streaming" command and the action to invoke the ad from 5 to 10 seconds, and it worked! The log was descriptive enough to say so, and I tried clicking the 'run ad' button on the website's 'stream manager' and it told me that it was on cooldown, further confirming the ad run was successful. (I could have sworn I did my manual ad run thing inside of 10 seconds, when I noticed it failed before, but maybe I was slower than that).

Gave it one more try with 10 seconds, and it worked again! I guess I was just not waiting long enough before Twitch 'realized' I was streaming, and it failed before because Twitch was telling OBS that I'm not live (yet).

So that solves that! Even though it wasn't a bug in the plugin after all, I think it's still worthwhile in the end, that you improved on the log output for that action--with the new build, I was able to get the rest of the way to the answer myself, easily, because it clearly stated why it failed. That may come in handy in the future, or help another in my position, so they don't have to bug you, lol.

You're welcome for the support, and thank you for the help! :D
 

DeweydB

New Member
I'm having an issue that I've never seen before and I've been messing around with this one and others for a bit. I'm guessing reinstalling my Arch Linux will most likely fix the issue but I'm hoping I don't have too! lol So, There is nothing in the log files and no crash report but ultimately this is all I have to provide for information.

Basically, I am unable to access Adv SS when I click tools and then Adv SS. The second I click it, I get this message:

--------
Loading of the following plugin libraries was unsuccessful, which could result in some Advanced Scene Switcher functions not being available:

  • /usr/lib/obs-plugins/adv-ss-plugins/advanced-scene-switcher-opencv.so

Check the OBS logs for details.
This message can be disabled on the General tab.
_____

Only option is to click ok and then because I'm trying to get it to work, I've been starting OBS with terminal with "obs --debug" and after clicking ok OBS closes and in the terminal it says this"

--- fish: Job 1, 'obs --debug' terminated by signal SIGSEGV (Address boundary error) ---

Now I know this has a bit of missing info but I'm hoping its something simple. It's been about 6 months since I install arch and who knows what small thing could be obstructing it's use.

I'm using OBS Studio rc. I'm using a decent amount of plugs but nothing new. It's always played nice with the others.

https://obsproject.com/logs/EapwdYABeK8JGpsm - Here is my last log file. Any help would be splendid. lol Intel 11700k, 6700xt. not overclocked.

Random side note, when i check ldd with root, It told me I didn't have permission for that file or any of the files in the folder. That was new.

ls -l /usr/lib/obs-plugins/adv-ss-plugins/
.rwxr-xr-x 83M root 7 Jul 10:45  advanced-scene-switcher-base.so
.rwxr-xr-x 5.1M root 7 Jul 10:44  advanced-scene-switcher-midi.so
.rwxr-xr-x 7.0M root 7 Jul 10:44  advanced-scene-switcher-opencv.so
.rwxr-xr-x 79M root 7 Jul 10:44  advanced-scene-switcher-twitch.so

I gave myself execute privileges and it didn't affect anything. :P Anyways, any help is appreciated.
 

DeweydB

New Member
I'm having an issue that I've never seen before and I've been messing around with this one and others for a bit. I'm guessing reinstalling my Arch Linux will most likely fix the issue but I'm hoping I don't have too! lol So, There is nothing in the log files and no crash report but ultimately this is all I have to provide for information.

Basically, I am unable to access Adv SS when I click tools and then Adv SS. The second I click it, I get this message:

--------
Loading of the following plugin libraries was unsuccessful, which could result in some Advanced Scene Switcher functions not being available:

  • /usr/lib/obs-plugins/adv-ss-plugins/advanced-scene-switcher-opencv.so

Check the OBS logs for details.
This message can be disabled on the General tab.
_____

Only option is to click ok and then because I'm trying to get it to work, I've been starting OBS with terminal with "obs --debug" and after clicking ok OBS closes and in the terminal it says this"

--- fish: Job 1, 'obs --debug' terminated by signal SIGSEGV (Address boundary error) ---

Now I know this has a bit of missing info but I'm hoping its something simple. It's been about 6 months since I install arch and who knows what small thing could be obstructing it's use.

I'm using OBS Studio rc. I'm using a decent amount of plugs but nothing new. It's always played nice with the others.

https://obsproject.com/logs/EapwdYABeK8JGpsm - Here is my last log file. Any help would be splendid. lol Intel 11700k, 6700xt. not overclocked.

Random side note, when i check ldd with root, It told me I didn't have permission for that file or any of the files in the folder. That was new.

ls -l /usr/lib/obs-plugins/adv-ss-plugins/
.rwxr-xr-x 83M root 7 Jul 10:45  advanced-scene-switcher-base.so
.rwxr-xr-x 5.1M root 7 Jul 10:44  advanced-scene-switcher-midi.so
.rwxr-xr-x 7.0M root 7 Jul 10:44  advanced-scene-switcher-opencv.so
.rwxr-xr-x 79M root 7 Jul 10:44  advanced-scene-switcher-twitch.so

I gave myself execute privileges and it didn't affect anything. :P Anyways, any help is appreciated.
journalctl -xe results

dickhead kernel: obs[306200]: segfault at 8 ip 0000720c9d39d025 sp 00007ffdbbd46c80 error 4 in libQt6Core.so.6.7.2[720c9d28a000+3cc000] likely on CPU 8 (core 0, socket 0)
Jul 07 11:46:55 dickhead kernel: Code: 00 00 00 00 00 f3 0f 1e fa 53 48 83 ec 20 64 48 8b 1c 25 28 00 00 00 48 89 5c 24 18 48 89 fb 48 89 e7 48 89 de e8 db f4 fa ff <48> 8b 43 08 48 8b 7c 24 08 0f b6 54 24 10 80 78 30 00 78 >
Jul 07 11:46:55 dickhead kded6[1493]: Service ":1.723" unregistered
Jul 07 11:46:55 dickhead systemd[1084]: app-com.obsproject.Studio@fc32753606f04aa98192d2b5942b2987.service: Main process exited, code=killed, status=11/SEGV
 

Warmuptill

Active Member
I'm having an issue that I've never seen before and I've been messing around with this one and others for a bit. I'm guessing reinstalling my Arch Linux will most likely fix the issue but I'm hoping I don't have too! lol So, There is nothing in the log files and no crash report but ultimately this is all I have to provide for information.

Basically, I am unable to access Adv SS when I click tools and then Adv SS. The second I click it, I get this message:

--------
Loading of the following plugin libraries was unsuccessful, which could result in some Advanced Scene Switcher functions not being available:

  • /usr/lib/obs-plugins/adv-ss-plugins/advanced-scene-switcher-opencv.so

Check the OBS logs for details.
This message can be disabled on the General tab.
_____

Only option is to click ok and then because I'm trying to get it to work, I've been starting OBS with terminal with "obs --debug" and after clicking ok OBS closes and in the terminal it says this"

--- fish: Job 1, 'obs --debug' terminated by signal SIGSEGV (Address boundary error) ---

Now I know this has a bit of missing info but I'm hoping its something simple. It's been about 6 months since I install arch and who knows what small thing could be obstructing it's use.

I'm using OBS Studio rc. I'm using a decent amount of plugs but nothing new. It's always played nice with the others.

https://obsproject.com/logs/EapwdYABeK8JGpsm - Here is my last log file. Any help would be splendid. lol Intel 11700k, 6700xt. not overclocked.

Random side note, when i check ldd with root, It told me I didn't have permission for that file or any of the files in the folder. That was new.

ls -l /usr/lib/obs-plugins/adv-ss-plugins/
.rwxr-xr-x 83M root 7 Jul 10:45  advanced-scene-switcher-base.so
.rwxr-xr-x 5.1M root 7 Jul 10:44  advanced-scene-switcher-midi.so
.rwxr-xr-x 7.0M root 7 Jul 10:44  advanced-scene-switcher-opencv.so
.rwxr-xr-x 79M root 7 Jul 10:44  advanced-scene-switcher-twitch.so

I gave myself execute privileges and it didn't affect anything. :P Anyways, any help is appreciated.
journalctl -xe results

dickhead kernel: obs[306200]: segfault at 8 ip 0000720c9d39d025 sp 00007ffdbbd46c80 error 4 in libQt6Core.so.6.7.2[720c9d28a000+3cc000] likely on CPU 8 (core 0, socket 0)
Jul 07 11:46:55 dickhead kernel: Code: 00 00 00 00 00 f3 0f 1e fa 53 48 83 ec 20 64 48 8b 1c 25 28 00 00 00 48 89 5c 24 18 48 89 fb 48 89 e7 48 89 de e8 db f4 fa ff <48> 8b 43 08 48 8b 7c 24 08 0f b6 54 24 10 80 78 30 00 78 >
Jul 07 11:46:55 dickhead kded6[1493]: Service ":1.723" unregistered
Jul 07 11:46:55 dickhead systemd[1084]: app-com.obsproject.Studio@fc32753606f04aa98192d2b5942b2987.service: Main process exited, code=killed, status=11/SEGV
If you are not using the "Video" condition type I think the simplest solution you can try might be to remove the /usr/lib/obs-plugins/adv-ss-plugins/advanced-scene-switcher-opencv.so file.
I think what might have happened is that the OpenCV libs on your system were updated to a version the plugin is no longer compatible with.
 

DeweydB

New Member
If you are not using the "Video" condition type I think the simplest solution you can try might be to remove the /usr/lib/obs-plugins/adv-ss-plugins/advanced-scene-switcher-opencv.so file.
I think what might have happened is that the OpenCV libs on your system were updated to a version the plugin is no longer compatible with.
It totally worth a try. I generally only use the macro's. I'll give it a whirl and if it doesn't make it better, I'll just start playing and organizing my files to do a fresh install. It's over due. I like CachyOS and all but I like to jump around between versions of arch. :P Thank you for the input. I hope it works! LoL
 

DeweydB

New Member
If you are not using the "Video" condition type I think the simplest solution you can try might be to remove the /usr/lib/obs-plugins/adv-ss-plugins/advanced-scene-switcher-opencv.so file.
I think what might have happened is that the OpenCV libs on your system were updated to a version the plugin is no longer compatible with.
I deleted it, and OBS didn't really like that idea. It closed as soon as I clicked Adv ss in the tools drop down. O-well, No worries. I figured Id give it a shot I've tried a small plethora of ideas. I musta done did something that made that ol bag OBS angry. lol
 

PJCazaux

New Member
Hello everyone.

I currently embed friends stream via a nice P2P opensource screen sharing solution : http://screensy.marijn.it

As quite any web video sources, the default state for the video is muted.

A manual solution is to right click the source > Interact > Manually click the unmute button.

But, I wonder if this plugin would help to perform such an automation :

When source is activated, unmute the inner video (and thus... I don't even know how to "code" the unmute action on the <video> ).

Thx everyone :)
 

Warmuptill

Active Member
Hello everyone.

I currently embed friends stream via a nice P2P opensource screen sharing solution : http://screensy.marijn.it

As quite any web video sources, the default state for the video is muted.

A manual solution is to right click the source > Interact > Manually click the unmute button.

But, I wonder if this plugin would help to perform such an automation :

When source is activated, unmute the inner video (and thus... I don't even know how to "code" the unmute action on the <video> ).

Thx everyone :)
Unfortunately, I don't think this is possible with this plugin at the moment.
I started work on adding the option to automate source interactions but wasn't happy with it / never finished it.
1720554023280.png

Just in case it is of use to you I started a build with this functionality based on a more recent release.
It will be available here in a few minutes on GitHub:
You will have to be logged into GitHub to be able to download it - let me know if that should be an issue.

But be warned, this build is might be buggy!
 

AaronD

Active Member
Hello everyone.

I currently embed friends stream via a nice P2P opensource screen sharing solution : http://screensy.marijn.it

As quite any web video sources, the default state for the video is muted.

A manual solution is to right click the source > Interact > Manually click the unmute button.

But, I wonder if this plugin would help to perform such an automation :

When source is activated, unmute the inner video (and thus... I don't even know how to "code" the unmute action on the <video> ).

Thx everyone :)
Unfortunately, I don't think this is possible with this plugin at the moment.
I started work on adding the option to automate source interactions but wasn't happy with it / never finished it.
View attachment 105230
Just in case it is of use to you I started a build with this functionality based on a more recent release.
It will be available here in a few minutes on GitHub:
You will have to be logged into GitHub to be able to download it - let me know if that should be an issue.

But be warned, this build is might be buggy!
Generally, automating a user interface as if it were an actual user, has to be considered an option of last resort. If that's all you have, then fine, do it that way, but keep in mind that it can easily decide to break at any time:
  • The reference location and/or scale for mouse clicks might change, and so the same numbers now miss the button.
  • The button itself might move, as part of some "usability improvements", and so the same numbers now miss the button.
  • There might be an additional step involved, as part of some "security improvements", and so the button isn't even there or is ineffective without a step that you now have to add.
  • In the cases where you now miss the button, there might be another button that you hit instead. What does *that* do?
  • Etc.
If it's at all possible to get an API that you can just connect to and tell it directly what you want to do, that's far preferable. Only if there's no other option, should you consider automating a user interface. But it could still be worth having that feature, for those cases where there really is no other option.
 

Hemux

New Member
Hi,
Amazing plugin, very useful! I am using it for lots of macros. I have a question, do you think I can also use this plugin for the following:

I have many audio cues ordered in folders, and I would like to press a hotkey in OBS linked to each folder and to play an audio file, picked randomly from that folder. Can this plugin make it? (basically, hotkey 1 plays any file ABC from folder 1, hotkey 2 plays any file ABC from folder 2 etc). Right now I have many hotkeys, one for each audio file, to turn them visible (and so play them in OBS), then I use Advanced Scene Twitcher for dozens of macro that simply say "if file A is below 5db, make it hidden again" ... so clunky...

Soundboard Dock plugin does not work randomly (nor does it really restart all the sounds, ready to be played again). Any help appreciated!
 
Top