Motion - Feature Request 2005x 09x 26x 003103

Feature Request: Triggering one thread depending upon another thread

Description

I got a problem using motion which I could not work around it. There is a camera at the second level watching a front gateway at the first level. There is a mask in order to ignore the cars passing at the street. The problem is such that the camera could not get in details the faces of the persons that are passing throught the gateway. I can't put the camera at the first level because there is a intense traffic in the street and there is no way to create a mask because the persons would stay at same level of the cars.

I was thinking about an idea where "on _event_start " could initiate a thread and "on_event_end" could then terminate it.

Using the available resources I could start a command invoking another instance of motion but the manual asks not to do so.

-- RonaldoToledo - 26 Sep 2005

Follow up

Comments

You have a good idea how to do it. You just need a last little hint smile

What you should do it start Motion with two threads and as you suggest start and stop the 1st level camera using the on_event_start and on_event_end from the 2nd level camera thread. But instead of starting and stopping a new instance of Motion you simply disable motion detection of the 1st level thread.

Let us say that thread 1 is the camera that is permanently on and camera 2 the camera you turn on and off.

In the thread config file for camera 1 you define:

on_event_start /usr/bin/lwp-request http://localhost:8080/2/detection/start
on_event_end /usr/bin/lwp-request http://localhost:8080/2/detection/pause

When you start motion you need to do it from a small script that could look like this
#!/bin/sh
/usr/local/bin/motion
pause 5
/usr/bin/lwp-request http://localhost:8080/2/detection/pause

Which will start Motion and disable detection right away.

The advantage of this method is also that you can still connect to both cameras on the webcam stream ports. Pausing a thread does not disable the webcam port.

Give it a try.

-- KennethLavrsen - 26 Sep 2005

Hello Kenneth

Thanks for the idea smile and sorry, by that time I had not seen that part of documentation yet frown, sad smile Motion is really a very, very, great software. I'll be back. Thanks, again

-- RonaldoToledo - 26 Sep 2005

FeatureRequestForm edit

TopicTitle Triggering one thread depending upon another thread
FeatureRequestStatus Rejected
SubmittedBy RonaldoToledo
Topic revision: r4 - 30 Oct 2005, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.