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. Limit the number of images saved per second (Chris Harrison)
   2. Re: mp4 video stalls, skips (tosiara)
   3. Re: Limit the number of images saved per second (tosiara)


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

Message: 1
Date: Tue, 8 May 2018 22:07:54 -0600
From: Chris Harrison <chrisharriso...@gmail.com>
To: motion-user@lists.sourceforge.net
Subject: [Motion-user] Limit the number of images saved per second
Message-ID:
        <CAFYbgnNE=HF6_MHne8if1_w=kn+jridvio8mxpezr5ycy_o...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

motion Version 4.1.1

My use case is an RTSP doorbell camera, configured to 10 FPS for
comfortable live viewing. When motion is detected I want to trigger a
facial recognition process on each file created. When the doorbell button
is ultimately pressed, I can then retrieve the most recent facial
recognition results to include in a push notification, i.e. "Front door:
John Smith". By performing facial recognition on images as the person walks
up to the doorbell, rather than waiting for them to push the button, I hope
that the push notification will be relatively instantaneous (the facial
recognition could take 1-2 seconds).

The issue I have encountered is thus: when motion is detected, motion saves
multiple files per second. As the file name is %H-%M-%S though, only the
last file created each second is retained. I have noticed this behaviour
upon calling a script with the on_picture_save configuration option,
passing the file name (%f) and epoch time (%s), in order to detect and
identify faces in the images using dlib. The result is that I end up with
multiple facial recognition processes running on the same image file,
introducing delays.

I am wondering whether any of the following are possible:

   1. Limit the rate at which images are saved, e.g. to once per second. I
   have tried the minimum_frame_time option, but this also affected the frame
   rate of the live stream in the web interface (I'm using motionEye), which
   is suboptimal. It looks as though the deprecated minimum_gap may have done
   this; is there a currently-available alternative?
   2. Include milliseconds in the file name when saving images, such that
   multiple files may be created for each second.
   3. Somehow trigger my "on_picture_save" script only once per second,
   after the final image for that second has been saved.

Any advice is gratefully received.

Thanks,

Chris
-------------- next part --------------
An HTML attachment was scrubbed...

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

Message: 2
Date: Wed, 09 May 2018 05:53:14 +0000
From: tosiara <tosi...@gmail.com>
To: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] mp4 video stalls, skips
Message-ID:
        <CACHTdwTbnEd3THuCL0yuSNa+DkESeqkRg=ozxjkptqyhr8u...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Can you provide the full log?

On Wed, May 9, 2018, 02:30 Terry Parker <terry...@gmail.com> wrote:

> I removed version 4.0 and installed:
>
> stretch_motion_4.1.1-1_amd64.deb
>
>
> Now when I start motion with: $ sudo service motion start, I get:
>
>
> netcam_start: Network Camera starting for camera ((null))
>
>
> netcam_start: Invalid netcam service 'rtsp' - must be http, ftp, mjpg,
> mjpeg, v4l2 or file.
>
>
> The netcam_url value was working in version 4.0
>
>
> Searching the internet suggests this was a problem in older versions of
> Motion.
>
>
> Does anyone have a solution?
>
> Terry
>
> On Tue, May 8, 2018 at 12:28 AM, tosiara <tosi...@gmail.com> wrote:
>
>> Try the latest version 4.1
>>
>> On Tue, May 8, 2018 at 2:08 AM, Terry Parker <terry...@gmail.com> wrote:
>>
>>> I have motion version 4.0 running on Debian 9 (stretch, stable). Motion
>>> detection works as expected.  FFMPEG version is 3.2.10.
>>>
>>> The problem I am having is that the video will "freeze" a few seconds
>>> after starting to record. After about 15 seconds the video will skip
>>> forward and proceed normally.
>>>
>>> framerate 13
>>> pre_capture 3
>>> post_capture 6
>>> event_gap 60
>>> ffmpeg_output_movies on
>>> ffmpeg_bps 160000
>>> ffmpeg_video_codec mp4
>>>
>>>
>>> My computer has 12 GB of ram and 4x Intel Core i5-4440 running at 3.1Ghz.
>>> The video camera is a Dericam set at 15 FPS and 2080 kbps
>>>
>>> I have tried mkv and hevc, both have the same behavior as mp4.
>>> I have read that setting pre_capture too high will cause the problem I
>>> am having, but even if I set it to 0 I still get the freeze problem.
>>> With pre_capture set to 0, my motion log has a line that says:
>>> "image_ring_resize: Resizing pre_capture buffer to 2 items"
>>>
>>> Can anyone suggest how to get the video to record without stalling,
>>> freezing or skipping?
>>> Thanks,
>>> Terry
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Motion-user mailing list
>>> Motion-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/motion-user
>>> https://motion-project.github.io/
>>>
>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Motion-user mailing list
>> Motion-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/motion-user
>> https://motion-project.github.io/
>>
>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Motion-user mailing list
> Motion-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
-------------- next part --------------
An HTML attachment was scrubbed...

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

Message: 3
Date: Wed, 9 May 2018 09:47:53 +0300
From: tosiara <tosi...@gmail.com>
To: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] Limit the number of images saved per second
Message-ID:
        <cachtdwqaoubk4avtmop4jwrn7j__da+doi6eqauvfaexgcf...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

There is no way to limit picture save. Motion will save ALL frames that it
is able to capture. So, if you limit frame rate this is naturally affecting
live stream, as you already pointed out
If the problem is overwriting pictures - you can change picture file name
template to include frame number "%q". This will give you unique file names
If you want advanced picture processing - you can write your own script
that reads pictures from extpipe and processes them as you like. It can
have custom rate control, face recognition, file save strategy and whatever
you implement. Motion will feed your script with pictures at stdin - and
you will be on your own what to do with it

On Wed, May 9, 2018 at 7:07 AM, Chris Harrison <chrisharriso...@gmail.com>
wrote:

> motion Version 4.1.1
>
> My use case is an RTSP doorbell camera, configured to 10 FPS for
> comfortable live viewing. When motion is detected I want to trigger a
> facial recognition process on each file created. When the doorbell button
> is ultimately pressed, I can then retrieve the most recent facial
> recognition results to include in a push notification, i.e. "Front door:
> John Smith". By performing facial recognition on images as the person walks
> up to the doorbell, rather than waiting for them to push the button, I hope
> that the push notification will be relatively instantaneous (the facial
> recognition could take 1-2 seconds).
>
> The issue I have encountered is thus: when motion is detected, motion
> saves multiple files per second. As the file name is %H-%M-%S though, only
> the last file created each second is retained. I have noticed this
> behaviour upon calling a script with the on_picture_save configuration
> option, passing the file name (%f) and epoch time (%s), in order to detect
> and identify faces in the images using dlib. The result is that I end up
> with multiple facial recognition processes running on the same image file,
> introducing delays.
>
> I am wondering whether any of the following are possible:
>
>    1. Limit the rate at which images are saved, e.g. to once per second.
>    I have tried the minimum_frame_time option, but this also affected the
>    frame rate of the live stream in the web interface (I'm using motionEye),
>    which is suboptimal. It looks as though the deprecated minimum_gap may have
>    done this; is there a currently-available alternative?
>    2. Include milliseconds in the file name when saving images, such that
>    multiple files may be created for each second.
>    3. Somehow trigger my "on_picture_save" script only once per second,
>    after the final image for that second has been saved.
>
> Any advice is gratefully received.
>
> Thanks,
>
> Chris
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Motion-user mailing list
> Motion-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
-------------- next part --------------
An HTML attachment was scrubbed...

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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

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

Subject: Digest Footer

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


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

End of Motion-user Digest, Vol 143, Issue 10
********************************************

Reply via email to