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. Re: Motion feeding to motion (Mike Wilson)
   2. Re: Motion loses connection to webcam when it is dark
      (Mike Wilson)


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

Message: 1
Date: Thu, 22 Sep 2016 19:22:47 +0000
From: Mike Wilson <knobby2...@gmail.com>
Subject: Re: [Motion-user] Motion feeding to motion
To: Motion discussion list <motion-user@lists.sourceforge.net>
Message-ID:
        <CAAVeUCr=fs+qimnoqzknfmag_y-6d2g6r8gu4cep81k6wvp...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Writing directly to the NFS mount will potentially bog things down some as
the video has to wait on the network IO to write the frames. I would think
this could generate less than ideal videos. I suggest that you write it
locally and then spawn a script on the video complete event to move it to
the NFS drive. This wouldn't be an issue for any network or IO delays, but
it could fail so I would want the script to move anything it can find to
the proper place on the NFS drive. It's also possible this won't work well
without a daemon to do it due to timings and things. I think you're on the
correct path though of pushing the processing out to the nodes.

On Thu, Sep 22, 2016 at 3:19 AM Adam Goryachev <
mailingli...@websitemanagers.com.au> wrote:

> 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
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> 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...

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

Message: 2
Date: Thu, 22 Sep 2016 19:25:01 +0000
From: Mike Wilson <knobby2...@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:
        <caaveucroap9e8u_axvvpdeev_1tzgo-ag1krqgg18wdkv3_...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Are you powering the cameras off the pi? When it gets dark and the leds
turn on the camera will pull more current than during the day. It's
possible you're going over the current abilities of the pi.

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

> I actually set motion up with just one camera at first and saw the exact
> same behavior as two cameras.
>
> Interesting that the cameras should drop the frame rate in the dark... I
> might try reducing the FPS to 1 and see if there is any difference. I
> really appreciate your time and help tosiara!
>
> On Thu, Sep 22, 2016 at 8:15 AM, tosiara <tosi...@gmail.com> wrote:
>
>> When you turn light off your camera drops fps to the minimum available -
>> 5 fps?. But you already use this frame rate in config. Still worth trying
>> to use single camera with single thread and see if that works
>>
>> On Thu, Sep 22, 2016 at 5:07 PM, Zan Thorn <zanth...@gmail.com> wrote:
>>
>>> When the lights are on, both streams work great at 720p. It's only when
>>> the lights turn off, and the room goes entirely dark, that either camera
>>> has issues so I don't think it is a performance problem. The CPU usage is
>>> pretty low at 50% or less and the memory usages is fine too at ~300MB used
>>> out of the 1GB available.
>>>
>>> On Thu, Sep 22, 2016 at 7:59 AM, tosiara <tosi...@gmail.com> wrote:
>>>
>>>> I'm just curious is it powerful enough to handle two USB cameras with
>>>> 720p resolution?
>>>> Can you try to lower resolution and disconnect each camera to see if
>>>> correlates
>>>>
>>>> On Thu, Sep 22, 2016 at 4:09 PM, Zan Thorn <zanth...@gmail.com> wrote:
>>>>
>>>>> Yes I am doing two 720p streams. One camera is a logitech c510 and the
>>>>> other is a c920 that is 1080p capable but have both set for 720p in the
>>>>> configuration file. This is on a raspberry pi 2b.
>>>>>
>>>>> On Sep 22, 2016 2:40 AM, "tosiara" <tosi...@gmail.com> wrote:
>>>>>
>>>>>> 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
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>>>
>>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>>
>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> 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
>>>>
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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
>>
>>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> 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 8
*******************************************

Reply via email to