Resource icon

Advanced Scene Switcher 1.25.5

AaronD

Active Member
My current macro is set up to switch to a different scene if the video feed on either side of the main track has changed. While this recognises when my hand crosses through the area, the snail appears to enter the restricted section too slowly for the software to notice the change. Is there a way to improve the accuracy of this set-up? Or are there different macro conditions that might work better?
Sounds to me like you need a static detector instead of a dynamic one. "This area not empty" instead of "this area changed." I haven't used the machine vision part of Adv. SS, but maybe you can give it a picture of an empty track to compare to, along with a detection area? (might be in the same picture, depending on how it actually works)
 

Warmuptill

Active Member
I'm using OBS to record snail locomotion from multiple angles with overlays to improve speed measurements for a research project. I'd like to use advanced scene switcher to make an "alarm system" that changes the scene briefly to flash red and play an alarm sound when the snail ventures off the desired path to let me know I need to reset and abandon the run. My current macro is set up to switch to a different scene if the video feed on either side of the main track has changed. While this recognises when my hand crosses through the area, the snail appears to enter the restricted section too slowly for the software to notice the change. Is there a way to improve the accuracy of this set-up? Or are there different macro conditions that might work better?
I agree with @AaronD.
Instead of using the "has changed" check type using "matches pattern" might yield better results.
The pattern would be the background where the alarm should be triggered (without any snail).
A macro would then trigger if a snail ventures into the given area of the screen and thus the pattern no longer matches the empty background.

An example of using the pattern matching can be found here:

I must admit I could have never imagined the plugin being used for something like this when I created it and that kind of made my day!
So thanks for that! :D

Let me know if you have any questions!
 

MattEatsMochi

New Member
Quick question about Video -> Brightness. Am I able to make the macro trigger if the brightness goes under a set level? I think by default it only triggers of it goes over the value.

Thx <3
 

Attachments

  • brightness.png
    brightness.png
    10.7 KB · Views: 15

Héraès

Member
Any suggestions on how to trigger the ASS to write the replay buffer
@kdarroch
Do you know this plugin ? It is supposed to do a part of what you want : it allows you to push a key to write the content of the replay buffer, and also to switch to a scene (in wich you can play the replay as a media source). It allows delay, to let the buffer to be written.
I don't know if that's what you want, given that you talked about detecting on-screen changes, but hey, I prefer to try ;)
 

AaronD

Active Member
There's a "Go to download" button at the top right of every plugin page: Overview, Forum Discussion, etc. That gets you the latest version. I would not be surprised at all if the repo version is so horribly out of date that it doesn't even run.

Case in point: OBS in the Ubuntu 22.04 repo is version 27. We're on version 29 now, and from 27 to 28 is a major graphics update that breaks almost everything, both upgrading and downgrading. Add the OBS-specific repo to get v29, and then the up-to-date plugins (from the download button here) will work too.
 

khaver

Member
The pattern matching macro seems to not work if matching to a solid black area of the video source. I'm trying to detect when a person is not at a podium. The stage behind the podium is black. If I restrict the area to check just above the microphone, a black area, the pattern (solid black) is never matched. It seems there must be some variation in the area to be checked in order for a match to be found. I do not want to include the microphone in the check area in case the camera or microphone is moved slightly.

Is there any workaround for this? Thanks.

I'm using v1.17.7. (I can't upgrade from OBS 17.2.5 at this time)
 

Warmuptill

Active Member
The pattern matching macro seems to not work if matching to a solid black area of the video source. I'm trying to detect when a person is not at a podium. The stage behind the podium is black. If I restrict the area to check just above the microphone, a black area, the pattern (solid black) is never matched. It seems there must be some variation in the area to be checked in order for a match to be found. I do not want to include the microphone in the check area in case the camera or microphone is moved slightly.

Is there any workaround for this? Thanks.

I'm using v1.17.7. (I can't upgrade from OBS 17.2.5 at this time)
The pattern matching algorithm does not work when providing a solid black pattern as there are no features the check for in the given pattern.

As you seem to be testing for a solid black area would it not work to check if a given area has not changed for X amount of time using a condition similar to this? (The exact values are of course only examples)

Video.PNG


I hope all of the required functionality was already implemented in the particular version you are stuck on.
 

AaronD

Active Member
The pattern matching algorithm does not work when providing a solid black pattern as there are no features the check for in the given pattern.
So we can't check for "not black"?

...would it not work to check if a given area has not changed for X amount of time using a condition similar to this? (The exact values are of course only examples)

View attachment 91633
I can see a potential problem with this, as some people may stand still enough to fool a motion-based thing. (I've seen some that are practically statues in front of an audience) But if it works in practice with the actual people involved, then I guess it works.
 

CodeYan

Member
Also, if "perform check only in area" is enabled, what size is expected of the selected file? Is it supposed to be the same size, as in only the selected part? What happens if the file is of a different size?
 

CodeYan

Member
How come this is matched when my template is pure black?

View attachment 91643View attachment 91642
This is my selected file
View attachment 91644
Ah lol, I see this was answered "The pattern matching algorithm does not work when providing a solid black pattern as there are no features the check for in the given pattern." How can I make it so i can match a pure black AND similar colors?

Also, does adv-ss load the selected file again if I overwrite the file?
 

kdarroch

Member
hERE IS AN ENHANCMENT REQUEST TO THE PLUGIN

Would it be possible to act on macro's that are grouped, as a group?

For instance, another macro might pause or un-pause the group of macro's

That would be awesome,
 

Warmuptill

Active Member
Also, if "perform check only in area" is enabled, what size is expected of the selected file? Is it supposed to be the same size, as in only the selected part? What happens if the file is of a different size?
The size can be the same or smaller than the selected area.
If the pattern is larger than the video source / selected area a match cannot be found.

Also, does adv-ss load the selected file again if I overwrite the file?
No, the plugin will only reload the file on "startup" / when changing the path to the file.

How can I make it so i can match a pure black AND similar colors?
The current algorithm does not really allow an emphasis on only color similarity.
I will try to investigate if there is an alternative approach to handle this use case as well (I assume there is).

hERE IS AN ENHANCMENT REQUEST TO THE PLUGIN

Would it be possible to act on macro's that are grouped, as a group?

For instance, another macro might pause or un-pause the group of macro's

That would be awesome,
Thanks for the suggestion!
I will add it to the todo list.

Unfortunately I am rather busy at the moment and cannot really spend much time on the plugin, so I can't promise that I will get around to it soon.
 
Last edited:

kdarroch

Member
Also, if "perform check only in area" is enabled, what size is expected of the selected file? Is it supposed to be the same size, as in only the selected part? What happens if the file is of a different size?
Here is a TIP I recently figured out.
The match pattern works so much better if you have the pattern you are trying to match in the area where you want to look and instead of use existing file use the screen capture option to create the file exactly the size of the area you set. Just need to set the area first and then go back up and create the matching file using the screen capture option.

works really well.

kirk
 

LexXxusTV

New Member
I don't know what happen with this last update but this just simply doesn't work for me any more.
I had all my scenes set up correctly with each scene fading audio with timed transitions and all.
Now nothing works properly for me.
I have been sitting here for 6 hours trying to fix this and not a chance!
I give up ,I'm tired.
 
Top