Send Motion-user mailing list submissions to
        motion-user@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
        motion-user-requ...@lists.sourceforge.net

You can reach the person managing the list at
        motion-user-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."


Today's Topics:

   1. Motion loses connection to webcam when it is dark (Zan Thorn)
   2. Motion feeding to motion (Adam Goryachev)
   3. Re: Motion loses connection to webcam when it is dark (tosiara)


----------------------------------------------------------------------

Message: 1
Date: Wed, 21 Sep 2016 22:53:44 -0600
From: Zan Thorn <zanth...@gmail.com>
Subject: [Motion-user] Motion loses connection to webcam when it is
        dark
To: motion-user@lists.sourceforge.net
Message-ID:
        <CAAfdRzZw2BbpEw6Wx5j5Nr1EpDzXPWzhHuRfo24GmZB=-of...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I am using motion Version 3.2.12+git20140228 running on Raspbian GNU/Linux
8 (jessie). Motion is working great with my two USB web cams during the
daytime when there is a lot of light but once it's dark, the cameras seem
to disconnect. I am not using any motion detection, just the web stream and
snapshots.

Here is my motion.conf and the two thread conf files:
https://gist.github.com/anonymous/6af2c79a75971c08e0c4cc48e9a035b3

The lights turn off at 20:00 in this instance. Please let me know if my
configuration is wrong or something else is going on. Thanks!

[0] [ERR] [ALL] [Sep 21 20:00:34] main: Thread 1 - Watchdog timeout, trying
to do a graceful restart
[0] [ERR] [ALL] [Sep 21 20:00:35] main: Thread 2 - Watchdog timeout, trying
to do a graceful restart
[0] [ERR] [ALL] [Sep 21 20:01:34] main: Thread 1 - Watchdog timeout, did
NOT restart graceful,killing it!
[0] [NTC] [STR] [Sep 21 20:01:34] stream_stop: Closing motion-stream listen
socket & active motion-stream sockets
[0] [NTC] [STR] [Sep 21 20:01:34] stream_stop: Closed motion-stream listen
socket & active motion-stream sockets
[0] [INF] [ALL] [Sep 21 20:01:34] motion_cleanup: Calling vid_close() from
motion_cleanup
[0] [NTC] [VID] [Sep 21 20:01:34] vid_close: Closing video device
/dev/video1
[1] [ERR] [VID] [Sep 21 20:01:34] v4l2_next: VIDIOC_DQBUF:
[2] [INF] [ALL] [Sep 21 20:01:34] motion_loop: Lightswitch detected
[2] [NTC] [ALL] [Sep 21 20:01:34] motion_loop: Thread exiting
[2] [NTC] [STR] [Sep 21 20:01:34] stream_stop: Closing motion-stream listen
socket & active motion-stream sockets
[2] [NTC] [STR] [Sep 21 20:01:34] stream_stop: Closed motion-stream listen
socket & active motion-stream sockets
[2] [INF] [ALL] [Sep 21 20:01:34] motion_cleanup: Calling vid_close() from
motion_cleanup
[2] [NTC] [VID] [Sep 21 20:01:34] vid_close: Closing video device
/dev/video0
[0] [NTC] [ALL] [Sep 21 20:01:35] main: Motion thread 1 restart
[0] [NTC] [ALL] [Sep 21 20:01:35] main: Motion thread 2 restart
[1] [NTC] [ALL] [Sep 21 20:01:35] motion_init: Thread 1 started , motion
detection Enabled
[1] [NTC] [VID] [Sep 21 20:01:35] vid_v4lx_start: Using videodevice
/dev/video1 and input -1
[1] [NTC] [VID] [Sep 21 20:01:35] v4l2_get_capability:
------------------------
cap.driver: "uvcvideo"
cap.card: "HD Pro Webcam C920"
cap.bus_info: "usb-3f980000.usb-1.4"
cap.capabilities=0x84200001
------------------------
[1] [NTC] [VID] [Sep 21 20:01:35] v4l2_get_capability: - VIDEO_CAPTURE
[1] [NTC] [VID] [Sep 21 20:01:35] v4l2_get_capability: - STREAMING
[1] [NTC] [VID] [Sep 21 20:01:35] v4l2_select_input: name = "Camera 1",
type 0x00000002, status 00000000
[1] [NTC] [VID] [Sep 21 20:01:35] v4l2_select_input: - CAMERA
[1] [WRN] [VID] [Sep 21 20:01:35] v4l2_select_input: Device doesn't support
VIDIOC_G_STD
[2] [NTC] [ALL] [Sep 21 20:01:35] motion_init: Thread 2 started , motion
detection Enabled
[1] [NTC] [VID] [Sep 21 20:01:35] v4l2_do_set_pix_format: Testing palette
YUYV (1280x720)
[1] [NTC] [VID] [Sep 21 20:01:35] v4l2_do_set_pix_format: Using palette
YUYV (1280x720) bytesperlines 2560 sizeimage 1843200 colorspace 00000008
[1] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: found control
0x00980900, "Brightness", range 0,255
[1] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: "Brightness", default
-8193, current 128
[1] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: found control
0x00980901, "Contrast", range 0,255
[1] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: "Contrast", default
57343, current 128
[1] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: found control
0x00980902, "Saturation", range 0,255
[1] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: "Saturation", default
57343, current 128
[1] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: found control
0x00980913, "Gain", range 0,255
[1] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: "Gain", default
57343, current 0
[1] [NTC] [VID] [Sep 21 20:01:35] vid_v4lx_start: Using V4L2
[2] [NTC] [VID] [Sep 21 20:01:35] vid_v4lx_start: Using videodevice
/dev/video0 and input -1
[2] [NTC] [VID] [Sep 21 20:01:35] v4l2_get_capability:
------------------------
cap.driver: "uvcvideo"
cap.card: "UVC Camera (046d:081d)"
cap.bus_info: "usb-3f980000.usb-1.2"
cap.capabilities=0x84200001
------------------------
[2] [NTC] [VID] [Sep 21 20:01:35] v4l2_get_capability: - VIDEO_CAPTURE
[2] [NTC] [VID] [Sep 21 20:01:35] v4l2_get_capability: - STREAMING
[2] [NTC] [VID] [Sep 21 20:01:35] v4l2_select_input: name = "Camera 1",
type 0x00000002, status 00000000
[2] [NTC] [VID] [Sep 21 20:01:35] v4l2_select_input: - CAMERA
[2] [WRN] [VID] [Sep 21 20:01:35] v4l2_select_input: Device doesn't support
VIDIOC_G_STD
[1] [NTC] [ALL] [Sep 21 20:01:35] image_ring_resize: Resizing pre_capture
buffer to 1 items
[2] [NTC] [VID] [Sep 21 20:01:35] v4l2_do_set_pix_format: Testing palette
YUYV (1280x720)
[2] [NTC] [VID] [Sep 21 20:01:35] v4l2_do_set_pix_format: Using palette
YUYV (1280x720) bytesperlines 2560 sizeimage 1843200 colorspace 00000008
[2] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: found control
0x00980900, "Brightness", range 0,255
[2] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: "Brightness", default
-8193, current 128
[2] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: found control
0x00980901, "Contrast", range 0,255
[2] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: "Contrast", default
57343, current 32
[2] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: found control
0x00980902, "Saturation", range 0,255
[2] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: "Saturation", default
57343, current 34
[2] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: found control
0x00980913, "Gain", range 0,255
[2] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: "Gain", default
57343, current 64
[2] [NTC] [VID] [Sep 21 20:01:35] vid_v4lx_start: Using V4L2
[2] [NTC] [ALL] [Sep 21 20:01:35] image_ring_resize: Resizing pre_capture
buffer to 1 items
[1] [NTC] [DBL] [Sep 21 20:01:36] motion_init: Database backend postgresql
[1] [NTC] [STR] [Sep 21 20:01:36] http_bindsock: motion-stream testing :
IPV4 addr: 0.0.0.0 port: 3001
[1] [NTC] [STR] [Sep 21 20:01:36] http_bindsock: motion-stream Bound : IPV4
addr: 0.0.0.0 port: 3001
[1] [NTC] [ALL] [Sep 21 20:01:36] motion_init: Started motion-stream server
in port 3001 auth Disabled
[2] [NTC] [DBL] [Sep 21 20:01:50] motion_init: Database backend postgresql
[2] [NTC] [STR] [Sep 21 20:01:50] http_bindsock: motion-stream testing :
IPV4 addr: 0.0.0.0 port: 3002
[2] [NTC] [STR] [Sep 21 20:01:50] http_bindsock: motion-stream Bound : IPV4
addr: 0.0.0.0 port: 3002
[2] [NTC] [ALL] [Sep 21 20:01:50] motion_init: Started motion-stream server
in port 3002 auth Disabled
[2] [NTC] [ALL] [Sep 21 20:01:50] image_ring_resize: Resizing pre_capture
buffer to 5 items
[0] [ERR] [ALL] [Sep 21 20:02:05] main: Thread 1 - Watchdog timeout, trying
to do a graceful restart
[0] [ERR] [ALL] [Sep 21 20:03:05] main: Thread 1 - Watchdog timeout, did
NOT restart graceful,killing it!
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 2
Date: Thu, 22 Sep 2016 17:18:02 +1000
From: Adam Goryachev <mailingli...@websitemanagers.com.au>
Subject: [Motion-user] Motion feeding to motion
To: motion-user@lists.sourceforge.net
Message-ID:
        <a168751a-611e-45e1-11d5-3fd4935ed...@websitemanagers.com.au>
Content-Type: text/plain; charset=utf-8; format=flowed

Hi all,

I've been working on a security camera solution for a small business in 
my area. Initially I threw together a Raspberry Pi Model B with a camera 
and SD card/etc and sticky taped it to the window. I eventually found 
mjpg_streamer which could send the video in near real-time to motion 
which I installed on a VM.

This worked really (really really) well, so we started looking at how to 
expand it. I added the raspberry Pi PoE addon card, a PoE switch, and 
started putting more of them together. This was still working really well.

Now we have around 20 cameras, and have started to find that there is a 
performance issue on the server. Part of this is simply the huge amount 
of disk IO to record all the video, but also part of it is related to 
the CPU.

So I thought now that we are using quad core Raspberry Pi 3 I thought 
maybe I could run motion on the raspberry itself, and then only feed the 
video that needs to be recorded to disk up to the server. This should 
massively reduce the CPU needs on the server.

I know I can use the netcam options to point to the remote motion http 
port streaming the video, but then the central server will still use CPU 
attempting to process the video.

I figure this issue must have been solved by many people in the past, 
but I'm not sure of the "right" option.

1) I could setup a NFS mount (or whatever network FS method) and let 
each raspberry pi write files directly onto the server. This means 
network traffic is limited to video motion, and cpu is minimal on the 
server.

2) I could try to let the server run motion looking at the http 
streaming port of the camera. I see that the camera can send less frames 
when there is no motion (stream_motion), I can adjust the central server 
options to minimise CPU (threshold, noise_tune, despeckle_filter, maybe 
others?). This should reduce network traffic, and also cpu usage, but 
still allow all the same features.

Is there some other options, or methods I should consider? I'm hoping to 
extend to at least 30 cameras, and possibly more.

Regards,
Adam



------------------------------

Message: 3
Date: Thu, 22 Sep 2016 11:31:11 +0300
From: tosiara <tosi...@gmail.com>
Subject: Re: [Motion-user] Motion loses connection to webcam when it
        is dark
To: Motion discussion list <motion-user@lists.sourceforge.net>
Message-ID:
        <cachtdwq2rczehgtlugt7kos0-qxseveve3g9yq9zxaax708...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Are you running two USB 720p web cams on a Rpi?

On Thu, Sep 22, 2016 at 7:53 AM, Zan Thorn <zanth...@gmail.com> wrote:

> I am using motion Version 3.2.12+git20140228 running on Raspbian GNU/Linux
> 8 (jessie). Motion is working great with my two USB web cams during the
> daytime when there is a lot of light but once it's dark, the cameras seem
> to disconnect. I am not using any motion detection, just the web stream and
> snapshots.
>
> Here is my motion.conf and the two thread conf files: https://gist.github.
> com/anonymous/6af2c79a75971c08e0c4cc48e9a035b3
>
> The lights turn off at 20:00 in this instance. Please let me know if my
> configuration is wrong or something else is going on. Thanks!
>
> [0] [ERR] [ALL] [Sep 21 20:00:34] main: Thread 1 - Watchdog timeout,
> trying to do a graceful restart
> [0] [ERR] [ALL] [Sep 21 20:00:35] main: Thread 2 - Watchdog timeout,
> trying to do a graceful restart
> [0] [ERR] [ALL] [Sep 21 20:01:34] main: Thread 1 - Watchdog timeout, did
> NOT restart graceful,killing it!
> [0] [NTC] [STR] [Sep 21 20:01:34] stream_stop: Closing motion-stream
> listen socket & active motion-stream sockets
> [0] [NTC] [STR] [Sep 21 20:01:34] stream_stop: Closed motion-stream listen
> socket & active motion-stream sockets
> [0] [INF] [ALL] [Sep 21 20:01:34] motion_cleanup: Calling vid_close() from
> motion_cleanup
> [0] [NTC] [VID] [Sep 21 20:01:34] vid_close: Closing video device
> /dev/video1
> [1] [ERR] [VID] [Sep 21 20:01:34] v4l2_next: VIDIOC_DQBUF:
> [2] [INF] [ALL] [Sep 21 20:01:34] motion_loop: Lightswitch detected
> [2] [NTC] [ALL] [Sep 21 20:01:34] motion_loop: Thread exiting
> [2] [NTC] [STR] [Sep 21 20:01:34] stream_stop: Closing motion-stream
> listen socket & active motion-stream sockets
> [2] [NTC] [STR] [Sep 21 20:01:34] stream_stop: Closed motion-stream listen
> socket & active motion-stream sockets
> [2] [INF] [ALL] [Sep 21 20:01:34] motion_cleanup: Calling vid_close() from
> motion_cleanup
> [2] [NTC] [VID] [Sep 21 20:01:34] vid_close: Closing video device
> /dev/video0
> [0] [NTC] [ALL] [Sep 21 20:01:35] main: Motion thread 1 restart
> [0] [NTC] [ALL] [Sep 21 20:01:35] main: Motion thread 2 restart
> [1] [NTC] [ALL] [Sep 21 20:01:35] motion_init: Thread 1 started , motion
> detection Enabled
> [1] [NTC] [VID] [Sep 21 20:01:35] vid_v4lx_start: Using videodevice
> /dev/video1 and input -1
> [1] [NTC] [VID] [Sep 21 20:01:35] v4l2_get_capability:
> ------------------------
> cap.driver: "uvcvideo"
> cap.card: "HD Pro Webcam C920"
> cap.bus_info: "usb-3f980000.usb-1.4"
> cap.capabilities=0x84200001
> ------------------------
> [1] [NTC] [VID] [Sep 21 20:01:35] v4l2_get_capability: - VIDEO_CAPTURE
> [1] [NTC] [VID] [Sep 21 20:01:35] v4l2_get_capability: - STREAMING
> [1] [NTC] [VID] [Sep 21 20:01:35] v4l2_select_input: name = "Camera 1",
> type 0x00000002, status 00000000
> [1] [NTC] [VID] [Sep 21 20:01:35] v4l2_select_input: - CAMERA
> [1] [WRN] [VID] [Sep 21 20:01:35] v4l2_select_input: Device doesn't
> support VIDIOC_G_STD
> [2] [NTC] [ALL] [Sep 21 20:01:35] motion_init: Thread 2 started , motion
> detection Enabled
> [1] [NTC] [VID] [Sep 21 20:01:35] v4l2_do_set_pix_format: Testing palette
> YUYV (1280x720)
> [1] [NTC] [VID] [Sep 21 20:01:35] v4l2_do_set_pix_format: Using palette
> YUYV (1280x720) bytesperlines 2560 sizeimage 1843200 colorspace 00000008
> [1] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: found control
> 0x00980900, "Brightness", range 0,255
> [1] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: "Brightness",
> default -8193, current 128
> [1] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: found control
> 0x00980901, "Contrast", range 0,255
> [1] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: "Contrast", default
> 57343, current 128
> [1] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: found control
> 0x00980902, "Saturation", range 0,255
> [1] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: "Saturation",
> default 57343, current 128
> [1] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: found control
> 0x00980913, "Gain", range 0,255
> [1] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: "Gain", default
> 57343, current 0
> [1] [NTC] [VID] [Sep 21 20:01:35] vid_v4lx_start: Using V4L2
> [2] [NTC] [VID] [Sep 21 20:01:35] vid_v4lx_start: Using videodevice
> /dev/video0 and input -1
> [2] [NTC] [VID] [Sep 21 20:01:35] v4l2_get_capability:
> ------------------------
> cap.driver: "uvcvideo"
> cap.card: "UVC Camera (046d:081d)"
> cap.bus_info: "usb-3f980000.usb-1.2"
> cap.capabilities=0x84200001
> ------------------------
> [2] [NTC] [VID] [Sep 21 20:01:35] v4l2_get_capability: - VIDEO_CAPTURE
> [2] [NTC] [VID] [Sep 21 20:01:35] v4l2_get_capability: - STREAMING
> [2] [NTC] [VID] [Sep 21 20:01:35] v4l2_select_input: name = "Camera 1",
> type 0x00000002, status 00000000
> [2] [NTC] [VID] [Sep 21 20:01:35] v4l2_select_input: - CAMERA
> [2] [WRN] [VID] [Sep 21 20:01:35] v4l2_select_input: Device doesn't
> support VIDIOC_G_STD
> [1] [NTC] [ALL] [Sep 21 20:01:35] image_ring_resize: Resizing pre_capture
> buffer to 1 items
> [2] [NTC] [VID] [Sep 21 20:01:35] v4l2_do_set_pix_format: Testing palette
> YUYV (1280x720)
> [2] [NTC] [VID] [Sep 21 20:01:35] v4l2_do_set_pix_format: Using palette
> YUYV (1280x720) bytesperlines 2560 sizeimage 1843200 colorspace 00000008
> [2] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: found control
> 0x00980900, "Brightness", range 0,255
> [2] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: "Brightness",
> default -8193, current 128
> [2] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: found control
> 0x00980901, "Contrast", range 0,255
> [2] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: "Contrast", default
> 57343, current 32
> [2] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: found control
> 0x00980902, "Saturation", range 0,255
> [2] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: "Saturation",
> default 57343, current 34
> [2] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: found control
> 0x00980913, "Gain", range 0,255
> [2] [NTC] [VID] [Sep 21 20:01:35] v4l2_scan_controls: "Gain", default
> 57343, current 64
> [2] [NTC] [VID] [Sep 21 20:01:35] vid_v4lx_start: Using V4L2
> [2] [NTC] [ALL] [Sep 21 20:01:35] image_ring_resize: Resizing pre_capture
> buffer to 1 items
> [1] [NTC] [DBL] [Sep 21 20:01:36] motion_init: Database backend postgresql
> [1] [NTC] [STR] [Sep 21 20:01:36] http_bindsock: motion-stream testing :
> IPV4 addr: 0.0.0.0 port: 3001
> [1] [NTC] [STR] [Sep 21 20:01:36] http_bindsock: motion-stream Bound :
> IPV4 addr: 0.0.0.0 port: 3001
> [1] [NTC] [ALL] [Sep 21 20:01:36] motion_init: Started motion-stream
> server in port 3001 auth Disabled
> [2] [NTC] [DBL] [Sep 21 20:01:50] motion_init: Database backend postgresql
> [2] [NTC] [STR] [Sep 21 20:01:50] http_bindsock: motion-stream testing :
> IPV4 addr: 0.0.0.0 port: 3002
> [2] [NTC] [STR] [Sep 21 20:01:50] http_bindsock: motion-stream Bound :
> IPV4 addr: 0.0.0.0 port: 3002
> [2] [NTC] [ALL] [Sep 21 20:01:50] motion_init: Started motion-stream
> server in port 3002 auth Disabled
> [2] [NTC] [ALL] [Sep 21 20:01:50] image_ring_resize: Resizing pre_capture
> buffer to 5 items
> [0] [ERR] [ALL] [Sep 21 20:02:05] main: Thread 1 - Watchdog timeout,
> trying to do a graceful restart
> [0] [ERR] [ALL] [Sep 21 20:03:05] main: Thread 1 - Watchdog timeout, did
> NOT restart graceful,killing it!
>
>
>
>
> ------------------------------------------------------------
> ------------------
>
> _______________________________________________
> Motion-user mailing list
> Motion-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/motion-user
> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
>
>
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------------


------------------------------

_______________________________________________
Motion-user mailing list
Motion-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/motion-user


End of Motion-user Digest, Vol 124, Issue 3
*******************************************

Reply via email to