Resource icon

Advanced Scene Switcher 1.25.5

Warmuptill

Active Member
Using the latest Windows OBS and ASS plugin, the macro for listening for the level of an audio source that goes over a certain level seems to have a bug.
I have a macro set to start recording on a video pattern match (a certain slide is shown on a display). After the recording starts, the macro fades up to a wide camera scene and unpauses another macro that's been pauses from when OBS is opened and the ASS plugin is activated. This macro listens to an audio source and when it reaches a certain level, switches to a closeup camera scene. Instead, the macro immediately switches to the closeup scene no matter what the level of the audio.

This setup does work if the audio source is silent all the way up to the point the listening macro is unpaused, but if there is audio on the source that's above the trigger level while the macro is paused, as soon as it is unpaused, the switch is triggered. This can be seen in the verbose log where the audio macro returns a 1 as soon as it's unpaused. It seems to be listening even while it's paused.
Thanks for pointing that out!
A build with a fix should be available here in a few minutes:
Note that you have to be logged into GitHub to be able to download it.
 

Warmuptill

Active Member
hello all, i am a very very beginner at obs. the advanced scene switcher, i have no clue on how to set up, can someone explain in simple terms how to setup from start to finish. thanks
Hello,
that very much depends on what you want to achieve.
Maybe this will help you to get started:
 

jcoryd

New Member
How do you get the different wait times? Do you enter those manually? If so, then there's probably not much room to improve on making the entire sequence that way. If they're the same or random, then we might have some possibilities.
Yes, the wait times will need to be determined apriori and not random or the same...but lets say for argument sake that I could do random, how might I do this?
 

Warmuptill

Active Member
Yes, the wait times will need to be determined apriori and not random or the same...but lets say for argument sake that I could do random, how might I do this?
You can have a look at this post where I described how to set up random scene switching:

In particular if you can use the same wait time or a random wait time before continuing with the next scene switch the approach using "Scene Groups" might be the least hassle to set up for a large amount of scenes. (Still a lot of work though)
 

Terry1983!

New Member
Hello,
that very much depends on what you want to achieve.
Maybe this will help you to get started:
all i want is for the program to switch between camera 1 and 2 while i do the djing, thanks
 

AaronD

Active Member
all i want is for the program to switch between camera 1 and 2 while i do the djing, thanks
Click the up arrow on the following quote, and use the subsequent up arrows to follow that thread back to where it started:
Ooooh now that might work!! I'm going to give this a shot for sure, thank you so much :)
It's okay if you didn't read back that far. I didn't when I started here!
 

Haggy

New Member
Heya.
I really love your plugin - my whole stream is built upon it. I run a Squad Stream with my Wife on our LAN.
I ran into a small problem. I'd like to switch the category/game title when the scene switches to my wifes PC.
I tried checking all the options but i couldn't find anything to make it work. Would i be possible to add that option somewhere somehow ?
Best regards
 

AaronD

Active Member
Heya.
I really love your plugin - my whole stream is built upon it. I run a Squad Stream with my Wife on our LAN.
I ran into a small problem. I'd like to switch the category/game title when the scene switches to my wifes PC.
I tried checking all the options but i couldn't find anything to make it work. Would i be possible to add that option somewhere somehow ?
Best regards
You mean like this?
1652366301917.png

You'd only use one of those actions. I included both because I have no idea what most of your terms mean, with no more context than what you gave here.

Though if you want something to appear for one scene but not another, why not just put it in that scene to start with, and not the other? No need for Adv-SS at all then, at least for that action.
 

Warmuptill

Active Member
I'd like to switch the category/game title when the scene switches to my wifes PC.
Do you mean the streaming category on whichever website you are streaming on?
If so that is currently not possible.

all i want is for the program to switch between camera 1 and 2 while i do the djing, thanks
Assuming that both "camera 1" and "camera 2" are sources on a particular scene then something like this might do the trick:

CamExample.PNG


This will show camera 1 and hide camera 2 for 5 seconds then hide camera 1 and show camera 2 for 5 seconds and repeat.
Let me know if you have further questions!
 

Haggy

New Member
Thank you for your answers. I have no problems automatically switch scenes. I managed to do that with the Scene Switching Tab.

I am trying to explain my problem again.
For example. While my gaming scene is running I want the the category in Twitch display lets say Apex Legends.
If the Scene gets switched to the game of my wife (which is captured by another elgato card) I want to have the Automatic Scene Switcher insert a different game name (e.g.Animal Crossing). It doesn't need to detect it automatically. If I could set it up manually somewhere in the Scene Switcher it would be great.
So, my scene switching is fine. It autmatically switches to different scenes after xxx seconds.
Maybe anyone has an Idea how to do it. I searched the OBS Forum back and forth and couldn't find anything.
 

Warmuptill

Active Member
Thank you for your answers. I have no problems automatically switch scenes. I managed to do that with the Scene Switching Tab.

I am trying to explain my problem again.
For example. While my gaming scene is running I want the the category in Twitch display lets say Apex Legends.
If the Scene gets switched to the game of my wife (which is captured by another elgato card) I want to have the Automatic Scene Switcher insert a different game name (e.g.Animal Crossing). It doesn't need to detect it automatically. If I could set it up manually somewhere in the Scene Switcher it would be great.
So, my scene switching is fine. It autmatically switches to different scenes after xxx seconds.
Maybe anyone has an Idea how to do it. I searched the OBS Forum back and forth and couldn't find anything.
This is currently not supported.
You could in theory get this to work using the "Run" action in combination with "curl" but setting this up might be very cumbersome.

Code:
# Twitch API samples:
# Find game category IDs for query "fort":

curl -X GET 'https://api.twitch.tv/helix/search/categories?query=fort' \
-H 'Authorization: Bearer 2gbdx6oar67tqtcmt49t3wpcgycthx' \
-H 'Client-Id: wbmytr93xzw8zbg0p1izqyzzc5mbiz'

# Possible reply:

{
  "data": [
    {
      "id": "33214",
      "name": "Fortnite",
      "box_art_url": "https://static-cdn.jtvnw.net/ttv-boxart/Fortnite-{width}x{height}.jpg"
    },
    ...
  ],
  "pagination": {
    "cursor": "eyJiIjpudWxsLCJhIjp7IkN"
  }
}


# Update Stream info using id 33214:

curl -X PATCH 'https://api.twitch.tv/helix/channels?broadcaster_id=41245072' \
-H 'Authorization: Bearer 2gbdx6oar67tqtcmt49t3wpcgycthx' \
-H 'Client-Id: wbmytr93xzw8zbg0p1izqyzzc5mbiz' \
-H 'Content-Type: application/json' \
--data-raw '{"game_id":"33214", "title":"there are helicopters in the game? REASON TO PLAY FORTNITE found", "broadcaster_language":"en"}'
 

FAT9L

New Member
It seems that something is being handled incorrectly on the "save replay buffer function". Attached is my log file, which shows what I'm talking about. Basically, attempting to save the replay buffer from this utility will only work if more than ~15 seconds have elapsed since the last time the replay buffer was saved, and the macro has been triggered at least once since the last recording was saved (meaning I have to hit it twice).

Example:

This works:
  • Launch OBS
  • Trigger replay buffer save
  • Attempt to save again (no result)
  • Wait >10 seconds
  • Trigger replay buffer save
This does not work:
  • Launch OBS
  • Trigger replay buffer save
  • Trigger replay buffer save again
When the replay buffer is saved correctly, I get this (expected) result in the log file:
14:04:22.688: [adv-ss] performed action "AdvSceneSwitcher.action.replay.type.save"
[...]
14:04:23.021: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to 'D:/Videos/OBS/Replay 2022-05-15 14-04-22.mkv'

When it does not, I get this:

14:04:23.669: [adv-ss] performed action "AdvSceneSwitcher.action.replay.type.save"
(nothing happens)
[...]
14:04:35.946: [adv-ss] performed action "AdvSceneSwitcher.action.replay.type.save"
[...]
14:04:36.307: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to 'D:/Videos/OBS/Replay 2022-05-15 14-04-36.mkv'

Note the timestamps on these actions.

Am I just doing something wrong, is it a limit imposed by OBS on third-party plugins, or is something wrong with the Switcher?
 

Attachments

  • 2022-05-15 14-02-35.txt
    148.5 KB · Views: 12

Warmuptill

Active Member
It seems that something is being handled incorrectly on the "save replay buffer function". Attached is my log file, which shows what I'm talking about. Basically, attempting to save the replay buffer from this utility will only work if more than ~15 seconds have elapsed since the last time the replay buffer was saved, and the macro has been triggered at least once since the last recording was saved (meaning I have to hit it twice).

Example:

This works:
  • Launch OBS
  • Trigger replay buffer save
  • Attempt to save again (no result)
  • Wait >10 seconds
  • Trigger replay buffer save
This does not work:
  • Launch OBS
  • Trigger replay buffer save
  • Trigger replay buffer save again
When the replay buffer is saved correctly, I get this (expected) result in the log file:

[...]


When it does not, I get this:


(nothing happens)
[...]

[...]



Note the timestamps on these actions.

Am I just doing something wrong, is it a limit imposed by OBS on third-party plugins, or is something wrong with the Switcher?
Thanks for reporting the issue and sorry about the late reply!
I have an idea what might cause this.
A build with a potential fix will be available here in a few minutes:
Note that you have to be logged into GitHub to be able to download it.
I would appreciate if you could give this a try and report back if everything works as expected.
 

ukie

Member
@Warmuptill Any chance you can add a simple open URL action that will open whatever link is entered in the default browser?
Would be good to also have have an option to run link in background.
 

ukie

Member
Another questions,
It appears that "System tray notification" is only for Windows. Could you please add this function for Mac as well?
 

AaronD

Active Member
@Warmuptill Any chance you can add a simple open URL action that will open whatever link is entered in the default browser?
Would be good to also have have an option to run link in background.

Another questions,
It appears that "System tray notification" is only for Windows. Could you please add this function for Mac as well?

Linux can do all of that and far more from a script. Just put the script file in a Run action and let the script handle the details.

Don't know about Mac; never seriously used one. But given how similar to Linux it supposedly is under the hood, I wouldn't be surprised if it did.

My view is that anything to do with the computer itself, outside of OBS, should be handled like that, and not from the plugin. The plugin runs an external executable, which could be a binary program, a script file, a system command, or whatever, and then that external thing does whatever external work is needed. There's just no way to include everyone's favorite functionality in the plugin, which is kinda where you end up if you try to do external stuff directly from inside.
 

Warmuptill

Active Member
@Warmuptill Any chance you can add a simple open URL action that will open whatever link is entered in the default browser?
Would be good to also have have an option to run link in background.
Something like this should do the trick:

Open.PNG

Note that "Run macro in parallel to other macros" is checked, which will ensure that the macro is running in the background and not blocking the execution of other macros.

Another questions,
It appears that "System tray notification" is only for Windows. Could you please add this function for Mac as well?
This should be available for MacOS as well.
Have you maybe not allowed OBS to display notifications?

SysTrayNotification.PNG


Hope that helps!
 

zlayer

New Member
Hello,

I have a macro which starts every 15min using 'timer'. But I want the 2nd macro to begin 15sec after the 1st macro and the 3rd macro another 15sec after 2nd macro etc

Any ideas how this can be done?

Thanks
 

BenAndo

Member
Hey, I can see in the pre-release version you've got 'add option to ignore time component in simple check'
It works wonderfully! I was actually considering requesting this feature.

Will you also be adding an after & before time to the simple settings? I like the simple settings because I can easily select a certain day, as opposed to selecting a date, and then having it repeat every 168 hours. I have found that sometimes due to human error, I've selected a date in the past, and then it never gets updated. Or occasionally it doesn't repeat, perhaps because I don't open OBS on that particular date and so it never matches the condition and updates the date.
 
Top