Resource icon

Advanced Scene Switcher 1.24.2

Warmuptill

Active Member
Hi there,

After updating to the latest version, I have an issue with timers.

I noticed this, as I have a logo in a scene that plays for 10 seconds. Previously I had a macro that checks if that logo scene is active, and if it is active for more than 9 seconds it will change to my main camera scene. Now I have to set this figure to 3 seconds in order for the next scene to happen after 9 seconds.

Odd.

So, I made a simple test that shows a taskbar notification after the scene is active for 3 seconds. The taskbar notification doesn't appear until around 10 seconds.

Something seems to have changed here. I don't see this as an issue with a macro that needs rewriting for the new ELSE command. Is it?

Any thoughts welcome, thank you.

View attachment 99607
Thanks for reporting the problem! That sounds very odd indeed!
So far I am not able to reproduce the problem with the TEST macro you shared in your screenshot.

Would you mind sharing a log file of the issue? (With verbose logging enabled and preferably of the simple TEST macro)

Also if it is not too much trouble (and you have backed up your settings!) can you confirm, if the change in behaviour was really introduced with the switch to this new version of the plugin?

Just a wild guess:
Are you maybe using a fancy custom transition type?
Do you observe the same issue using a simple "Cut" transition?
 

Warmuptill

Active Member
ah ok ok thanks, i try this. Question, does the latest update 1.24.0 already have this fix?
No, 1.24.0 does not include this change as I don't know if it works as expected.

I don't have any physical midi devices and only tested using virtual devices.
This I why I am asking for your confirmation that the problem is really gone :)

The build I shared with you earlier is very similar to 1.24.0 so you should be able to switch between the two without any issues.
 

shocknoble

New Member
I have done a great deal of searching and I am not currently sure if this is possible but would love some help in making it a reality if it is doable!!

Right now whenever I swap to a new game, I edit my "Current Game" audio application capture source to capture the audio of the newly opened window. I thought I would be able to store the title of any fullscreen window as a variable and then plug that into the updated settings of the audio application capture source, but I cannot find a way to store that window title as a variable. Would love some insight/direction here if doable! Thank you so much!
 
Thanks for reporting the problem! That sounds very odd indeed!
So far I am not able to reproduce the problem with the TEST macro you shared in your screenshot.

Would you mind sharing a log file of the issue? (With verbose logging enabled and preferably of the simple TEST macro)

Also if it is not too much trouble (and you have backed up your settings!) can you confirm, if the change in behaviour was really introduced with the switch to this new version of the plugin?

Just a wild guess:
Are you maybe using a fancy custom transition type?
Do you observe the same issue using a simple "Cut" transition?
Thanks for your reply, I will do some further investigating as soon as possible and let you know the results.
 

ronack

New Member
Can you add a face tracker? Using multiple cameras (2 or 3) it would be nice if when I turn to look to the right that it switch scene to the camera on my right and when I turn left switch scene to the camera in the center or to my left. Basically, Turn Left scene 1 (camera 1), turn center scene 2 (camera 2) turn right scene 3 (camera 3). Is this doabe?
 

AaronD

Active Member
Can you add a face tracker? Using multiple cameras (2 or 3) it would be nice if when I turn to look to the right that it switch scene to the camera on my right and when I turn left switch scene to the camera in the center or to my left. Basically, Turn Left scene 1 (camera 1), turn center scene 2 (camera 2) turn right scene 3 (camera 3). Is this doabe?
I wonder if it would be worth making the "machine vision" stuff into its own sub-plugin? So Adv. SS itself only passes the raw video to that sub-plugin and gets the answer back. Then multiple people (some of which are actual experts in that specific field) can provide their own algorithms to do cool stuff like this. (face detection is hard)

Maybe provide a way to "stack" them too, like OBS itself does with its filters. That would require an "interesting" way to get the answer back, if the expected output is also a video stream...

At that point, maybe just use OBS's existing list of video filters, with a monitoring window after each one or simply at the end, to see that it's actually working as expected. There's already a well-known standard for that. The side-effect, though, is that OBS itself would also have some video filters available that are not suited at all to see directly. Maybe that's okay?

Or maybe just use a scene in OBS, that is not meant to be seen directly, and has all of the machine vision processing on it as a native OBS thing, and then use that scene to feed an intentionally simple Video condition in Adv. SS.

At any rate, someone would still have to make those filters for OBS - they exist elsewhere, but not here - for an application that most people would probably not use.
 

Warmuptill

Active Member
I have done a great deal of searching and I am not currently sure if this is possible but would love some help in making it a reality if it is doable!!

Right now whenever I swap to a new game, I edit my "Current Game" audio application capture source to capture the audio of the newly opened window. I thought I would be able to store the title of any fullscreen window as a variable and then plug that into the updated settings of the audio application capture source, but I cannot find a way to store that window title as a variable. Would love some insight/direction here if doable! Thank you so much!
While you can quite easily modify the setting using an action setup similar to this ...
1701201673845.png

... it seems like not only the window title is needed, but also the process name as well as the window class name.
So for example:
Advanced Scene Switcher | Page 159 | OBS Forums — Mozilla Firefox:MozillaWindowClass:firefox.exe

Unfortunately, at the moment the plugin does not expose the window class name.
So at the moment you only have to option to setup a number of macros which each map a window title to one of those strings.

Yeah i don't think i'm using port 8080 for anything else as far as i am ware of.
I'm not sure i should share the URL here but it's something like "http://localhost:8080/auth#access_token=" and then a bunch of numbers and letters
Is there maybe a firewall blocking the plugin from using the port?
I will try to add additional logging to confirm that this is really the issue.

Can you add a face tracker? Using multiple cameras (2 or 3) it would be nice if when I turn to look to the right that it switch scene to the camera on my right and when I turn left switch scene to the camera in the center or to my left. Basically, Turn Left scene 1 (camera 1), turn center scene 2 (camera 2) turn right scene 3 (camera 3). Is this doabe?
The ability to detect faces is already implemented in the "Video" condition type's option to check if a given video input contains an object:
The plugin ships with a few example object detection models from OpenCV which also includes face detection.

The Twitch integration update is fantastic.
Is it possible to include updating the Twitch channel's classification labels?
Yes, that might be possible.
I can't give an ETA when I will get around to it though.
 
Last edited:

Bairespm

Member
No, 1.24.0 no incluye este cambio porque no sé si funciona como se esperaba.

No tengo ningún dispositivo midi físico y solo lo probé usando dispositivos virtuales.
Por eso le pido su confirmación de que el problema realmente desapareció :)

La compilación que compartí con ustedes anteriormente es muy similar a la 1.24.0, por lo que debería poder cambiar entre las dos sin ningún problema.
ah ok ok, thanks i try this.
 

ronack

New Member
I wonder if it would be worth making the "machine vision" stuff into its own sub-plugin? So Adv. SS itself only passes the raw video to that sub-plugin and gets the answer back. Then multiple people (some of which are actual experts in that specific field) can provide their own algorithms to do cool stuff like this. (face detection is hard)

Maybe provide a way to "stack" them too, like OBS itself does with its filters. That would require an "interesting" way to get the answer back, if the expected output is also a video stream...

At that point, maybe just use OBS's existing list of video filters, with a monitoring window after each one or simply at the end, to see that it's actually working as expected. There's already a well-known standard for that. The side-effect, though, is that OBS itself would also have some video filters available that are not suited at all to see directly. Maybe that's okay?

Or maybe just use a scene in OBS, that is not meant to be seen directly, and has all of the machine vision processing on it as a native OBS thing, and then use that scene to feed an intentionally simple Video condition in Adv. SS.

At any rate, someone would still have to make those filters for OBS - they exist elsewhere, but not here - for an application that most people would probably not use.
Have you seen the Face Tracker plugin? https://obsproject.com/forum/resources/face-tracker.1294/ However it does not switch scenes. Also there is a plugin that switches cameras via audio.
 

Gunthrek

New Member
Greetings!

I've tried to sift through the options, but there doesn't seem to be a way to reference the recording timer at the bottom of the window. I can set events to happen based on what I assume is a timer running in the background after I press the record button, but this seems independent of the actual recording time tracker in OBS. The reason I believe this to be the case is that pausing the recording seems to have no effect on when the things I've tied to the recording dropdown and set to specific times actually activate. For example, I want a notice to pop up every ten minutes, but if I pause the video, it shows up early...which I think means it's basing it's timer on when I press the record button and not the actual timer showing at the bottom of the screen that let's you know how long the recording is so far.

I'm primarily using the plugin to allow me to pause recordings with a scene transition to a blank screen so it doesn't just jarringly jump to the next part. I have my hotkeys set up so I can just press a single button, switch from the main scene to a black screen scene with a transition and pause the recording, then when I press it again it transitions back to the main scene and continues recording. I've basically made it so I have all my logos and notices pop-up during my recordings, which was really the only video editing I was doing, but I'm having to base them on a timer that checks for returning to the main scene and popping them up after like 3 minutes. While this works, it makes the popups inconsistent since it's based on my random pausing and unpausing rather than a fixed time value based on how long the video is so far.

Am I missing an option somewhere? Or is this something the could be implemented in the plugin? Being able to reference the current video time rather than a separate internal timer would be extremely valuable.

Thanks!
 
Last edited:

Warmuptill

Active Member
Greetings!

I've tried to sift through the options, but there doesn't seem to be a way to reference the recording timer at the bottom of the window. I can set events to happen based on what I assume is a timer running in the background after I press the record button, but this seems independent of the actual recording time tracker in OBS. The reason I believe this to be the case is that pausing the recording seems to have no effect on when the things I've tied to the recording dropdown and set to specific times actually activate. For example, I want a notice to pop up every ten minutes, but if I pause the video, it shows up early...which I think means it's basing it's timer on when I press the record button and not the actual timer showing at the bottom of the screen that let's you know how long the recording is so far.

I'm primarily using the plugin to allow me to pause recordings with a scene transition to a blank screen so it doesn't just jarringly jump to the next part. I have my hotkeys set up so I can just press a single button, switch from the main scene to a black screen scene with a transition and pause the recording, then when I press it again it transitions back to the main scene and continues recording. I've basically made it so I have all my logos and notices pop-up during my recordings, which was really the only video editing I was doing, but I'm having to base them on a timer that checks for returning to the main scene and popping them up after like 3 minutes. While this works, it makes the popups inconsistent since it's based on my random pausing and unpausing rather than a fixed time value based on how long the video is so far.

Am I missing an option somewhere? Or is this something the could be implemented in the plugin? Being able to reference the current video time rather than a separate internal timer would be extremely valuable.

Thanks!
I would set this up using four different macros:
  • One macro which has the central timer component.
    For testing purposes as the actions for this macro I have chosen a "System tray notification" and I have set the timer which triggers the actions to 10 seconds. You will of course have to adjust this to your needs.
    1701288003378.png
  • Next I have set up a macro which handles the case that the recording was just started.
    This simply resets the timer on the macro from above to its initial value.
    Note that the "Perform actions only on condition change" checkbox is checked, which ensures that this action is only performed when the recording just started.
    1701288111221.png
  • Next a macro which handles the case that the recording was stopped.
    It also resets the timer, but this time continuously.
    1701288177797.png
  • Finally a macro which handles the case of the recording being paused.
    It will pause the timer at its current value while the recording is paused and continue the timer otherwise.
    1701288261027.png
I believe this does what you are trying to set up.
If you want to import this example you can use this code:
Code:
AAAROnic7VjbahsxEP2VRc/BeDfOpXlLg0sLDQ2x25digqKV1yKytEizTozxv3dGe/FuDKkTSuOAHwzSXI9mdGaFV2zOhbOeXfxeMcPnkl2wWymsS5XJokfuIw/cgUzZEct54VE/5dpL2jmutdSNwJqrGTcZWoArcO8fVD58kuKHGVGIxi5ztsibXWrFw0gCYDoEsWJOZsqDdI3BjPvbwnwuAKypQ6PshsBsSTETFP47v2/hmqlspvEH36ZX1qQKlDV+jB6Nhavjj+UTUAEKUx+3Iw85UVOYbd3PUoZa0UlSIqqMNvkj7mREsHsdjy8E6CWXgLjH1kdl3y4FqRqbUa4VYPFurA/70NWcupvE/fVRvT4/WU+qAEMMVwZ5wXdw1vj2ybPu0VcLD3LpW1cCK1AK0XvSFKotAptlWt48F29KEPIKqzXPPV67OrbCJSaubiYWTdtMCQSEV6hwnFyvbaqmiq7OioGayzsM6sFxZSDYeUlZwi1bcE39bxb9HuphmdNyTbhV6bKQzodaxGsUIxUALRKqARd/RUsYHCKVht9rUpbXNNS9QzNFLLN5HlhWn+aNMGtk42AVoMqmxwR3Qr3cYnoHws5ErwQHpu8R0+PjQcPW+OzTq5geD+ID01tM7/8bpo9JHV2H3f8leDfz4QP+cWmdJBtaJ6eD133Ak9M9oXVNlHegdGXwMv/inQhYR0jeTGEn53gyGm9VSs8X8nYjbPcjbRFU+pndELEVcrc55ZdU0uWdsYDFFmUZtseW9J7TGGAgPaAeFGjaXqYLboRMo5GQRkajRwViFvqpBMFg7DmmXZ4e1SEPz44PPZ/iQdLMmOOT49c9O9pPlvP48PDYmdDv9/Dob9N7D1FiHQnngjtFqTt/cwyf+DzXRCgavuUxymbLKS80/CpzMhYi1BlY3EsGvT5b/wHv8gRD

Hope that helped!



P.S: I might simply export the current recording time as a "macro property" in a future version.
 

Warmuptill

Active Member
Thank you! this helps a lot. Could you explain what 'set to substring of current value' means, what regular expressions are (especially (\w*) ? Are they too written in lua?
thanks a lot again
The "set to substring of current value" was used to extract the values received from the midi device and assign them to a variable.
This got a bit easier to set up since the last update of the plugin.
You don't need to worry about regular expressions to match text patterns to extract only the specific value you need.
Instead you can directly assign the required values to a variable using "Set to macro property" option.

So something like this should work just fine:

1701290413251.png


If you want to import this example you can use this code:
Code:
AAAIoXicnVbbbtswDP0VQU+7NFmSXlb0betSLMC6Bk3Xl6EYFJt2hMqSIclZuiL/PlKyHSXFNmAPBWReD8lDps+8Epk1jl98f+ZaVMAv+HQjqloBP+K1aBxKCqEc0JcVSoHqBUZfroQudxbuUdbTDWQ3euGF9b28tKap+6/cZI8L8F7qEvM+cwuldB5sb7AS7rbRHxvvjeYX3jZRNic0L6SYyTfui1gmwFayXCn887Pi0uhcemm0u0OP3sJ28e9ggzg55uvq3ZOHnKhp9EvdtyhDbbaXJCJqjXb5mbDACPZwz+OKAP3NJSAe8u1RHNWHjFS9zaJW0mPz5saF7zDImgZ6fD7eHiXvhzbAFMPFIH/xPTnufUfk2c3os/GP8OQSTmAHohC9H/pGpSJvylLB/FC8a0HImxmlRO0g72NLfPJK5hL7pUwpM8SC7GmsIK9rk8tCEmueuZcV/MB4zlshtQ92DihBINhaKBp9/xgNUe+fanpuCbKMLmuwLrRhvKVuY+ZrcE6UwZfsZ+6mptxiR7UYZvz+DAvCZdDEwj7ROE2jjU9BvE91hwgHiWcL5ROsZdYjCXhrQzuGYLGbIvtnK9fCSrEMiw2aHnm3Rp3mazwA90Y1FZl18kmrmGnEJ3MW5GoJzIGCkBiNsfn3ET3HL91U90m3+2Ej3jMaTlmB9rN8E2t1zXLhLR6E9m6MUpH8FctFDsJmLoixGIYP3/BWdi18tgqx0KqQOkdHNKB1Yt4wkgTTWokM9nWtkP2UftWFw90qZEmdjm1KD6CXNPvYNVO3LR+F3fSr6aa2SJhQJX/Fxuwtm7A37Ji9Zu/YCV0RB5eN86aaW1PVu/sodd34TsY/YIhSs0AFwthN4SJGmAVjQr0yKk/Opnyh4IMBdhks81juYBAGv5bWaGr+/f7Qvy2mt/Pbm6vZlykNMwMNi366KevaXwk6SB6qGsPs1GOiWpxDSzmsYcK3dEz+wErR5NK8pGS35v+5v0cx7sI09mBpdEdlbw3VINoKJzhDg5GMjfR70tlNUTjwaeI07VIoobN9XKd7Sx3XaM+938Fky9rWoQeWnNqPRweVFiLfsZE+7rqqfgq5o5NY4mGgE7+Gq9Qj6Q9eDOh/B+hqPJCoQ/eHfwecWLce8RJDIRrl+6WnIeuDC/Ivl4cEFR8PJyfD0eBsUJ5n2YmYnJ/y7W/j9Oyo
You will of course adjust the MIDI condition settings to your devices.

If you need more guidance feel free to send me a message!
 

kinross07

New Member
Sorry if this has come up before, but I didn't notice it in the past page or so. When I open the plugin, all I get is this window which I don't see any reference to in the wiki. OBS 30.0.0 on w11 (portable if that also makes a difference).

obs64_DVT4LWJ3YO.png
 

Gunthrek

New Member
Ok, I think I sort of understand, but let me show you how I have it set up and maybe you can clear up why it didn't work as originally intended:

First, I have my pause macro which switches to my black scene, then pauses the video:
Pause.png


The unpause macro just reverses the above.

After that I have my channel logo macro, which is based on when the recording starts:
Logo Show.png


And then another that changes to Hide after 10 seconds of recording.

And finally the widget display, which originally had the same settings as my logo macro (just with different times), but I changed it to the following because it wasn't working like I thought it would:
Like Show.png


So that said, let me be sure I understand what you're suggesting with the macro set you listed in your response. In lieu of tracking the OBS recording timer (which I do hope you'll implement in a future build!), I set up my own timer, have it start and stop with the recording, and use that for setting specific times for my popups? I did try to do exactly that when I realized the "recording for exactly x seconds" wasn't working like I thought, but it was still giving me the same problem. Of course, the devil is in the details, so I probably missed one somewhere.

The other thing is that I'm trying to make it so that my pauses don't just cut the video as soon as I press the button. I have a luma wipe that switches to the black scene before it actually pauses via the macro, which means I can't use the actual OBS pause hotkey because that would cut the video immediately before the nice transition, so I have to base it on when it switches to the black scene.

Full disclosure...I detest video editing and I've already got this set up so I don't have to do it anymore. The tracking of actual recording time would just be the cherry on top to make it so my videos come out at the end of the recording looking exactly the way they do now. The only reason I'm doing all this is so I don't have to wait for video renders at the end just to put on logos and overlays.

Thanks for the detailed response!
 
Top