SceneSwitcher icon indicating copy to clipboard operation
SceneSwitcher copied to clipboard

Can SceneSwitcher be used to start video recording when motion is detected?

Open rajhlinux opened this issue 3 years ago • 5 comments

Is your feature request related to a problem? Please describe. How to activate video recording when motion is detected.

Describe the solution you'd like Allow SceneSwitcher to detect motion and start video recording when motion is detected.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. None

Additional context Add any other context or screenshots about the feature request here. None

rajhlinux avatar Jul 04 '22 03:07 rajhlinux

Yea, you could use pattern match for that. Choose Video as trigger and enable pattern match. I assume it would work well. You take a screenshot of the current frame to use as the pattern and play around with sensitivity

nacalai avatar Jul 04 '22 12:07 nacalai

Just to add to the comment by @nacalai:

The video condition also supports the more generic "has changed" / "has not changed" check types, which also support pattern matching so minor changes in the image will not trigger the condition. This way you will not have to provide any particular screenshot but can instead detect any changes in the image. As usual you can also add duration modifiers to the condition to specify an amount of time for which a condition needs to be true so short term changes in the image will not trigger whatever actions you have specified unexpectedly.

Here is an example: MotionDetection

Let me know if that covers what you were looking for! :)

WarmUpTill avatar Jul 06 '22 11:07 WarmUpTill

Hello

I've tried a few examples incl. the above, but it works not as I hoped.

I want to check my webcam for motion. If this is the case, OBS should start recording. I have done this with a macro which works, but it starts recording immediately.

Then I've created a second macro which should stop the recording if the video has not changed for the last 5 seconds. But that does not work at all. The recording never stops.

Can you help me please ?

donsenilo1968 avatar Jul 21 '22 16:07 donsenilo1968

I have done this with a macro which works, but it starts recording immediately.

You can modify the macro not not start recording immediately by adding a duration modifier to the condition triggering the recording start.

Then I've created a second macro which should stop the recording if the video has not changed for the last 5 seconds. But that does not work at all. The recording never stops.

I assume you used the "has not changed" check without any pattern matching, correct?

Be aware that even a single pixel changing will reset this condition's duration modifier in that case. As there is most likely going to be some noise when using a video camera as a source this can cause issues.

I would recommend to enable pattern matching with a very high threshold for this use case.

WarmUpTill avatar Jul 21 '22 19:07 WarmUpTill

Thank you for your reply.

I thought I could use it with my Kinect to start recording if motion (Stickfigure) is detected. But as you wrote there's almost all the time noise It was worth the try.

donsenilo1968 avatar Jul 21 '22 20:07 donsenilo1968