Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

Warmuptill

Active Member
@attaboyBrad a build with the functionality to display the current foreground window name / foreground process name is available here on GitHub:
Note that you have to be logged into GitHub to be able to download it - let me know if that should be an issue.

The name of current foreground the window / process will be displayed if the focus option is selected:

Focus2.PNG

Focus1.PNG


I am very interested in what is being shown there on your end.
Let me know if you have any questions! :)
 

KiraRedpaw

New Member
Hey, I am having an issue with the new Advanced Scene Switcher and OBS 28.1.0. The old OBS 27.x.x would run my macro but the new advanced scene switcher will not.

The scene switch should come when the audio track of my choice is finished playing and the volume of that track is below 10% for 10 seconds then the scene switches to me scene labeled Gaming, but it never switches. What am I doing wrong?
 

Attachments

  • Advanced Scene.PNG
    Advanced Scene.PNG
    42.2 KB · Views: 20

AaronD

Active Member
Hey, I am having an issue with the new Advanced Scene Switcher and OBS 28.1.0. The old OBS 27.x.x would run my macro but the new advanced scene switcher will not.

The scene switch should come when the audio track of my choice is finished playing and the volume of that track is below 10% for 10 seconds then the scene switches to me scene labeled Gaming, but it never switches. What am I doing wrong?
That screenshot shows Above 10%. Unless your Starting Music is shorter than 10 seconds, that should have switched way too early. I assume you've fixed that already?

This might be one for Warmuptill: Do the audio conditions still match when the source is finished? (not playing = 0% volume, and the conditions continue to work normally with that) If they don't, then it could mean that the Audio condition can't work for what you're doing.

If you want to trigger on the end of a media file, I'd use the Media condition anyway, not the Audio one. Tell it directly what you want; try to avoid "proxy conditions". If it's a streaming source that doesn't really have an end, but does indeed send you silence, then the Audio condition would be the way to go.
 

KiraRedpaw

New Member
That screenshot shows Above 10%. Unless your Starting Music is shorter than 10 seconds, that should have switched way too early. I assume you've fixed that already?

This might be one for Warmuptill: Do the audio conditions still match when the source is finished? (not playing = 0% volume, and the conditions continue to work normally with that) If they don't, then it could mean that the Audio condition can't work for what you're doing.

If you want to trigger on the end of a media file, I'd use the Media condition anyway, not the Audio one. Tell it directly what you want; try to avoid "proxy conditions".
Havent changed anything, music is 4:00 long and the first 10 seconds is silence.

when the song is over the audio is at 0% yes.

Also I have 3 macros based on audio and none of them work.
 

KiraRedpaw

New Member
Havent changed anything, music is 4:00 long and the first 10 seconds is silence.

when the song is over the audio is at 0% yes.

Also I have 3 macros based on audio and none of them work.
Also I'm trying the media option. Streaming right now so I'll let you know if that works.

Thanks
 

AaronD

Active Member
Havent changed anything, music is 4:00 long and the first 10 seconds is silence.

when the song is over the sudio is at 0% yes.
The *meter* says 0%, but that doesn't necessarily mean that the conditions are still running. It could be that the meter updates and the conditions run on every new sample or block of samples, so that if there are no more samples (end of file), nothing happens. So the meter shows whatever the last few ms was (which is usually low), and no condition works because they're not even running. I don't actually *know* that that's the case here, but it's definitely a possibility without digging through the code to look.

If you haven't changed anything, then you should have switched about 10 seconds into the music, not 10 seconds after the end. (well, 10 seconds after the volume exceeded 10%, which should be almost always for a decently-produced track) If you didn't, then there's something else going on, and it doesn't matter (yet) whether the conditions continue to run or not after the file is over.
 

KiraRedpaw

New Member
The *meter* says 0%, but that doesn't necessarily mean that the conditions are still running. It could be that the meter updates and the conditions run on every new sample or block of samples, so that if there are no more samples (end of file), nothing happens. So the meter shows whatever the last few ms was (which is usually low), and no condition works because they're not even running. I don't actually *know* that that's the case here, but it's definitely a possibility without digging through the code to look.

If you haven't changed anything, then you should have switched about 10 seconds into the music, not 10 seconds after the end. (well, 10 seconds after the volume exceeded 10%, which should be almost always for a decently-produced track) If you didn't, then there's something else going on, and it doesn't matter (yet) whether the conditions continue to run or not after the file is over.
Yeah nothing is happening, here are all my macros in the attachments. I had all of these working in the old version of Advanced Scene Switcher before the big OBS update.

Start is suppose to switch scene from Stream Starting to Gaming Using the macro "Start"

I click starting stream in Obs and Play the starting music literally called "Starting music". The first 10 seconds of the song has no sound but I guess with the media function I can just choose to scene switch at the end of the song?

Anyways it doesn't work. Check the screen capture and tell me what I am doing wrong.

The second macro Ending Is suppose to switch the scenes from "Stream Credits" (Which Is the scene the obs would be currently playing) to "Stream End" after 10 seconds after Ending music has finished. I just testing the macro which I have a screenshot attached and it doesn't work. Any ideas?

And even the last Macro doesn't work. Simply when the scene switches to the scene "Stream End" it is suppose to end the stream but it does nothing. is the plugin broken?
 

Attachments

  • Start.PNG
    Start.PNG
    41.4 KB · Views: 20
  • Ending.PNG
    Ending.PNG
    40.5 KB · Views: 20
  • Close.PNG
    Close.PNG
    37.3 KB · Views: 21

AaronD

Active Member
Yeah nothing is happening, here are all my macros in the attachments. I had all of these working in the old version of Advanced Scene Switcher before the big OBS update.

Start is suppose to switch scene from Stream Starting to Gaming Using the macro "Start"

I click starting stream in Obs and Play the starting music literally called "Starting music". The first 10 seconds of the song has no sound but I guess with the media function I can just choose to scene switch at the end of the song?

Anyways it doesn't work. Check the screen capture and tell me what I am doing wrong.

The second macro Ending Is suppose to switch the scenes from "Stream Credits" (Which Is the scene the obs would be currently playing) to "Stream End" after 10 seconds after Ending music has finished. I just testing the macro which I have a screenshot attached and it doesn't work. Any ideas?

And even the last Macro doesn't work. Simply when the scene switches to the scene "Stream End" it is suppose to end the stream but it does nothing. is the plugin broken?
Hmm... I think those screenshots should work. What does your General tab look like?
 

AwakenedCloud

New Member
Yeah nothing is happening, here are all my macros in the attachments. I had all of these working in the old version of Advanced Scene Switcher before the big OBS update.

Start is suppose to switch scene from Stream Starting to Gaming Using the macro "Start"

I click starting stream in Obs and Play the starting music literally called "Starting music". The first 10 seconds of the song has no sound but I guess with the media function I can just choose to scene switch at the end of the song?

Anyways it doesn't work. Check the screen capture and tell me what I am doing wrong.

The second macro Ending Is suppose to switch the scenes from "Stream Credits" (Which Is the scene the obs would be currently playing) to "Stream End" after 10 seconds after Ending music has finished. I just testing the macro which I have a screenshot attached and it doesn't work. Any ideas?

And even the last Macro doesn't work. Simply when the scene switches to the scene "Stream End" it is suppose to end the stream but it does nothing. is the plugin broken?

This will sound dumb, but make sure you set it to Stream Switcher to active in the general tab. I finally updated mine to be compatible with OBS 28 and forgot this had to be switched to on for anything to work.
 

AaronD

Active Member
I installed the new version for obs 28 without exporting my old macros, is there a way to get them back or is everything over written?

The settings are saved as part of the scene collection.
I assume what happened is that you updated to OBS 28, the plugin failed to load, and you closed OBS, causing OBS to overwrite the scene collection data without any data of the advanced scene switcher.

If you have backed up your scene collection data or exported your settings to a file previously you can use those files to restore the settings.
Is there a FAQ for things like this?
  • Where did all my settings go?! I updated and the tabs are all gone! (uncheck the box on the General tab)
  • Where did all my settings go?! I updated and they're all wiped out! (see quote above, though you really need to know that BEFORE you update to v28!)
  • How do I get some common useful behaviors?
  • Etc.
 
Last edited:

serenmew

New Member
Thank you very much for pointing that out.
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.
If that is an issue for you let me know and I will share it somewhere else.
Works fantastic thank you so much!
 

Warmuptill

Active Member
Do the audio conditions still match when the source is finished? (not playing = 0% volume, and the conditions continue to work normally with that) If they don't, then it could mean that the Audio condition can't work for what you're doing.
Yes, audio conditions also function on audio sources that are not currently playing anything.

Is there a FAQ for things like this?
  • Where did all my settings go?! I updated and the tabs are all gone! (uncheck the box on the General tab)
  • Where did all my settings go?! I updated and they're all wiped out! (see quote above, though you really need to know that BEFORE you update to v28!)
  • How do I get some common useful behaviors?
  • Etc.
Great idea!
I will add a wiki entry and also link it on the plugin's overview page.
Thank you very much for replying to those types of questions all the time :)

Done: https://github.com/WarmUpTill/SceneSwitcher/wiki/FAQ

And even the last Macro doesn't work. Simply when the scene switches to the scene "Stream End" it is suppose to end the stream but it does nothing. is the plugin broken?
This very much sounds like the plugin is not started.
Can you please check this on the General tab?

If you ever want to investigate if a condition is working as expected you can use the methods mentioned here to make the testing easier:
 
Last edited:

Warmuptill

Active Member
Hi, can you please add some functionality for automatically interacting with browser sources? The OBS API provides functions for sending mouse/key events to browser sources. See https://obsproject.com/docs/reference-sources.html#c.obs_source_send_mouse_click

Would be really helpful since I have a two browser sources set to YouTube that I have to set to full screen every time I open OBS.
Thanks for the suggestion!
I have added it to the list, but I am not sure when I will get around to it.
 

AaronD

Active Member
...I have a two browser sources set to YouTube that I have to set to full screen every time I open OBS.
For that specific application, does YT have an API function for that? Probably an option to put in the URL, like there is to start at a non-zero time.
(...youtube.com/watch/<code>?t=34s to start 34 seconds into the video instead of the beginning)
 

attaboyBrad

Member
I am very interested in what is being shown there on your end.
Let me know if you have any questions! :)
Progress! Now things seem to work properly with "Process" macros. However, 'Window' Macros only ever show "StatusIndicator" as the current foreground window, as below.

Screenshot 2022-11-05 at 17.25.31.png


Screenshot 2022-11-05 at 17.24.55.png


As a practical matter, having "process" Macros working is adequate to my needs for the moment, but I thought this feedback might help you quash further bugs. Thanks so much for your help with this! Happy to test anything else if it would be helpful.
 

AaronD

Active Member
Interesting! https://www.youtube.com/watch?v=iZqoRzmtaU4 This video shows a trick make youtube auto full screen and auto play by using the embed link. Thank you!
Okay, I got it slightly wrong. I was going from memory. The video code itself is an example of a URL option. There's only the one "watch" page, and the video code is an option. For *any* site that uses them, not just YouTube, the first option is denoted by ?<name>=<value>, and the remaining options are &<name>=<value>. (? for the first, & for the rest, no spaces anywhere) Use as many as you want like that. You just have to know the names and what values they accept. So my example should have been ...youtube.com/watch?v=<code>&t=34s to start 34 sec in.

I wonder if this still works: ...youtube.com/watch?v=<code>&start=16&end=130&autoplay=true, or a variation of it? (start and end are in seconds, and could be big)
They have their own snippet function now (whatever they call it), that requires an account, and then you can specify the video and two endpoints, and it provides a new random URL with no options, to play just that section anonymously. (or you can make it private or unlisted like a regular video, but the one it refers to doesn't have to be yours) But that requires an account, and I don't like that. I'm sure they're using it to track the account owners' interests...
 

Bairespm

Member
Hi @Warmuptill please helpme sorry for my english

if scene is A then hotkey Alt+e , this works but the same hotkey continues to be pressed and this causes me problems, how can I make it so that when I go to a scene A or B or C the Hotkey Alt+e is activated only once once and when you exit those scenes to any other the same hotkey Alt+e is activated again once. I use it as a switch with another program in windows that if it is in one of those scenes it is activated and when it exits those scenes it must be deactivated. The only way that program accepts me is by pressing the same hotkey again. How do I do it, thank you, your program is incredible.
 
Top