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: Weird Output for netcam_url file:// (Rainer Dorsch)
   2. Re: motion developer list? (Rainer Dorsch)
   3. [BUG] Restart stream freeze (Bau Dev)
   4. Re: [BUG] Restart stream freeze (tosiara)


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

Message: 1
Date: Mon, 13 Apr 2020 10:22:06 +0200
From: Rainer Dorsch <m...@bokomoko.de>
To: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] Weird Output for netcam_url file://
Message-ID: <1718875.fDy3qlHgN6@h370>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I investigated a little further and found

static void mlp_prepare(struct context *cnt){
[...]
    /*                                                                          
                                                                                
                                                                                
                                                     
     * Calculate detection rate limit. Above 5fps we limit the detection        
                                                                                
                                                                                
                                                     
     * rate to 3fps to reduce load at higher framerates.                        
                                                                                
                                                                                
                                                     
     */
    cnt->process_thisframe = 0;
    cnt->rate_limit++;
    if (cnt->rate_limit >= (cnt->lastrate / 3)) {
        cnt->rate_limit = 0;
        cnt->process_thisframe = 1;
    }

This could explain why there are so many duplicate detection frames reported 
with identical raw changes etc.

I still try to figure out how the implementation matches the comment. lastrate 
of context is initialized by

cnt->lastrate = 25;

How does that relate with the code above to 5 fps?

lastrate then tries to match the actual rate in

    /*                                                                          
                                                                                
                                                                                
                                                     
     * If we have started on a new second we reset the shots variable           
                                                                                
                                                                                
                                                     
     * lastrate is updated to be the number of the last frame. last rate        
                                                                                
                                                                                
                                                     
     * is used as the ffmpeg framerate when motion is detected.                 
                                                                                
                                                                                
                                                     
     */
    if (cnt->lastframetime != cnt->currenttime) {
        cnt->lastrate = cnt->shots + 1;

Funny enough:

In my case I run with 15 fps, for which the code seems to match the comment 
:-)

I general, I think the comment is wrong, it should be 

     * Calculate detection rate as framerate divided by three                   
                                                                                
                                                                                
      

Any confirmation that my conclusions are correct would be very welcome.

If yes, I suggest to move the magic constant 3 in mlp_prepare to a parameter.

Thanks
Rainer

PS: I must miss something in the cnt->lastrate initialization in the log 
output I see that it starts with 1 and not 25, in any case it converges to the 
real rate of 15 after about 2 seconds.

[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:17] mlp_setupmode: Raw changes:   
  
0 - changes after 'EedDl':     0 - labels:   0 - noise level: 89 - lastrate: 1
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:17] mlp_setupmode: Raw changes: 
57900 - changes after 'EedDl':     0 - labels:  60 - noise level: 89 - 
lastrate: 1
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:17] mlp_setupmode: Raw changes: 
57907 - changes after 'EedDl':     0 - labels:  60 - noise level: 89 - 
lastrate: 1
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:18] mlp_setupmode: Raw changes: 
51671 - changes after 'EedDl':     0 - labels:  60 - noise level: 108 - 
lastrate: 3
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:18] mlp_setupmode: Raw changes: 
45665 - changes after 'EedDl':     0 - labels:  31 - noise level: 108 - 
lastrate: 3
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:18] mlp_setupmode: Raw changes: 
41327 - changes after 'EedDl':     0 - labels:  31 - noise level: 108 - 
lastrate: 3
[1:ml1:Cam0-replay] [INF] [ALL] Above message repeats 1 times
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:18] mlp_setupmode: Raw changes: 
41284 - changes after 'EedDl':     0 - labels:  31 - noise level: 108 - 
lastrate: 3
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:18] mlp_setupmode: Raw changes: 
41277 - changes after 'EedDl': 39946 - labels:  31 - noise level: 108 - 
lastrate: 3
[1:ml1:Cam0-replay] [INF] [ALL] Above message repeats 2 times
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:18] mlp_setupmode: Raw changes: 
41273 - changes after 'EedDl': 39936 - labels:  31 - noise level: 108 - 
lastrate: 3
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:18] mlp_setupmode: Raw changes: 
41261 - changes after 'EedDl': 39936 - labels:  31 - noise level: 108 - 
lastrate: 3
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:18] mlp_setupmode: Raw changes: 
41246 - changes after 'EedDl': 39909 - labels:  30 - noise level: 108 - 
lastrate: 3
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:18] mlp_setupmode: Raw changes: 
41198 - changes after 'EedDl': 39871 - labels:  30 - noise level: 108 - 
lastrate: 3
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:18] mlp_setupmode: Raw changes: 
41169 - changes after 'EedDl': 39871 - labels:  30 - noise level: 108 - 
lastrate: 3
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:18] mlp_setupmode: Raw changes: 
41140 - changes after 'EedDl': 39467 - labels:  30 - noise level: 108 - 
lastrate: 3
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:18] mlp_setupmode: Raw changes: 
41089 - changes after 'EedDl': 39467 - labels:  30 - noise level: 108 - 
lastrate: 3
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:19] mlp_setupmode: Raw changes: 
41079 - changes after 'EedDl': 39463 - labels:  30 - noise level: 108 - 
lastrate: 15
[1:ml1:Cam0-replay] [INF] [ALL] Above message repeats 4 times
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:19] mlp_setupmode: Raw changes: 
41058 - changes after 'EedDl': 39457 - labels:  30 - noise level: 108 - 
lastrate: 15
[1:ml1:Cam0-replay] [INF] [ALL] Above message repeats 4 times
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:19] mlp_setupmode: Raw changes: 
41026 - changes after 'EedDl': 39446 - labels:  30 - noise level: 108 - 
lastrate: 15
[1:ml1:Cam0-replay] [INF] [ALL] Above message repeats 4 times
[1:ml1:Cam0-replay] [INF] [ALL] [Apr 13 10:11:20] mlp_setupmode: Raw changes: 
41009 - changes after 'EedDl': 39071 - labels:  29 - noise level: 108 - 
lastrate: 15



Am Samstag, 21. M?rz 2020, 18:49:52 CEST schrieb Rainer Dorsch via Motion-
user:
> Hi,
> 
> I just noticed that if I I record videos from a netcam with framerate 15 and
> I reply the video with netcam_url file:// pointing to that file with the
> same framerate 15, I get in the logfile always 5 entries in a row with the
> exact same number of raw changes and changes after EedDl and 5 identical
> ppm images.
> 
> (since it is hard to read to the the line breaks, I copy the full log to
> http://scw.bokomoko.de/~rd/motion/5x-issue.log )
> 
> 1:ml1:Cam0-replay] [INF] [ALL] [Mar 15 11:41:21] mlp_setupmode: Raw changes:
> 2138 - changes after 'EedDl':   532 - labels:   2 - noise level: 11
> [1:ml1:Cam0-replay] [NTC] [EVT] [Mar 15 11:41:21] event_newfile: File of
> type 1 saved to:
> /home/rd/replay-motion/Out/2020-03-15_11-38-00-316097724/P_Person/
> CAM0_100-20200227-142255-03/20200315114121-13m.ppm
> [1:ml1:Cam0-replay] [INF] [ALL] [Mar 15 11:41:21] mlp_setupmode: Raw
> changes: 2138 - changes after 'EedDl':   532 - labels:   2 - noise level:
> 11 [1:ml1:Cam0-replay] [NTC] [EVT] [Mar 15 11:41:22] event_newfile: File of
> type 1 saved to:
> /home/rd/replay-motion/Out/2020-03-15_11-38-00-316097724/P_Person/
> CAM0_100-20200227-142255-03/20200315114121-14m.ppm
> [1:ml1:Cam0-replay] [INF] [ALL] [Mar 15 11:41:22] mlp_setupmode: Raw
> changes: 2138 - changes after 'EedDl':   532 - labels:   2 - noise level:
> 11 [1:ml1:Cam0-replay] [NTC] [EVT] [Mar 15 11:41:22] event_newfile: File of
> type 1 saved to:
> /home/rd/replay-motion/Out/2020-03-15_11-38-00-316097724/P_Person/
> CAM0_100-20200227-142255-03/20200315114122-00m.ppm
> [1:ml1:Cam0-replay] [INF] [ALL] [Mar 15 11:41:22] mlp_setupmode: Raw
> changes: 2138 - changes after 'EedDl':   532 - labels:   2 - noise level:
> 11 [1:ml1:Cam0-replay] [NTC] [EVT] [Mar 15 11:41:22] event_newfile: File of
> type 1 saved to:
> /home/rd/replay-motion/Out/2020-03-15_11-38-00-316097724/P_Person/
> CAM0_100-20200227-142255-03/20200315114122-01m.ppm
> [1:ml1:Cam0-replay] [INF] [ALL] [Mar 15 11:41:22] mlp_setupmode: Raw
> changes: 2138 - changes after 'EedDl':   532 - labels:   2 - noise level:
> 11 [1:ml1:Cam0-replay] [NTC] [EVT] [Mar 15 11:41:22] event_newfile: File of
> type 1 saved to:
> /home/rd/replay-motion/Out/2020-03-15_11-38-00-316097724/P_Person/
> CAM0_100-20200227-142255-03/20200315114122-02m.ppm
> [1:ml1:Cam0-replay] [INF] [ALL] [Mar 15 11:41:22] mlp_setupmode: Raw
> changes: 2251 - changes after 'EedDl':   673 - labels:   1 - noise level:
> 11 [1:ml1:Cam0-replay] [NTC] [EVT] [Mar 15 11:41:22] event_newfile: File of
> type 1 saved to:
> /home/rd/replay-motion/Out/2020-03-15_11-38-00-316097724/P_Person/
> CAM0_100-20200227-142255-03/20200315114122-03m.ppm
> [1:ml1:Cam0-replay] [INF] [ALL] [Mar 15 11:41:22] mlp_setupmode: Raw
> changes: 2251 - changes after 'EedDl':   673 - labels:   1 - noise level:
> 11 ...
> 
> The images are bitwise identical:
> 
> rd@master:~/replay-motion/Out/best/P_Person/CAM0_100-20200227-142255-03$
> diff 20200315114121-13m.ppm 20200315114121-14m.ppm
> rd@master:~/replay-motion/Out/best/P_Person/CAM0_100-20200227-142255-03$
> 
> First I thought this is because for an unknown reason the same image on the
> mkv file is processed five times instead of once....but this should then not
> result in raw changes anymore, starting from the second time.
> 
> Has anybody an idea how this can happen? Any idea or hint is welcome...
> 
> Thanks
> Rainer


-- 
Rainer Dorsch
http://bokomoko.de/





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

Message: 2
Date: Mon, 13 Apr 2020 10:29:50 +0200
From: Rainer Dorsch <m...@bokomoko.de>
To: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] motion developer list?
Message-ID: <1726342.YeyxhZSZfF@h370>
Content-Type: text/plain; charset="us-ascii"

Am Freitag, 10. April 2020, 21:46:12 CEST schrieb csspcmotion:
> Is there a more specific list for developer(s) of motion to exchange
> questions/answers? Than this list?

I think there are so few messages on this list, that it does not hurt to have 
developers questions/answers here... ;-)

Rainer


-- 
Rainer Dorsch
http://bokomoko.de/





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

Message: 3
Date: Mon, 13 Apr 2020 12:30:49 +0200
From: Bau Dev <baudev.cont...@gmail.com>
To: motion-user@lists.sourceforge.net
Subject: [Motion-user] [BUG] Restart stream freeze
Message-ID:
        <cao-pi1uetg6xtmeapbmonvzd+c+vrbjijrx683c8rdkvojl...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi,

>From what I understand it is asked to prefer the list to the Github issues.
So I report the bug here.

*Abnormal behavior:*

When motion is restarted with the command /action/restart the stream may
not work. There is a stream but it is frozen on a single frame.

*How to reproduce this bug :*

1. Launch motion and open the stream.
2. Stop motion using the command /action/quit
3. Restart motion using the /action/restart command
4. Stop motion again with the command /action/quit
5. Wait about 30 seconds (I'm not sure waiting is really the cause but I've
noticed that the longer I wait at this stage the more likely the problem is
to appear).
6. Restart motion with the /action/restart command.
7. Watch the stream. Normally it's frozen on a single frame.

The problem may not always occur. In this case the steps must be repeated
again (perhaps waiting more in step 5?).

*Notes :*

Reviewed guide and contributing documents: Yes
1. version: 4.3.1
2. installed as a package or compiled from sources [deb, rpm, git, other]:
deb (and I tried from sources also)
3. standalone or part of third party [motion, MotionEyeOS, other]: motion
4. video stream source [V4L (card or USB), net cam (mjpeg, rtsp, other),
mmal]: mmal and also PC webcam
5. hardware [x86, ARM, other]: x86_64
6. operating system [16.04, Stretch, etc, FreeBSD, other]: Kubuntu and
raspbian buster


I can attach my configuration file if necessary but I don't think it's
specific to my configuration (I've changed a lot of settings and the
problem keeps appearing)

Thank you in advance for your help.
Have a nice day!
-------------- next part --------------
An HTML attachment was scrubbed...

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

Message: 4
Date: Mon, 13 Apr 2020 13:35:29 +0300
From: tosiara <tosi...@gmail.com>
To: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] [BUG] Restart stream freeze
Message-ID:
        <CACHTdwQRW63tGuxFK9XbBoORjvo0Ackv-OFQ=mn4pnaiaxm...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

How do you "open" the stream?

On Mon, Apr 13, 2020, 13:32 Bau Dev <baudev.cont...@gmail.com> wrote:

> Hi,
>
> From what I understand it is asked to prefer the list to the Github
> issues. So I report the bug here.
>
> *Abnormal behavior:*
>
> When motion is restarted with the command /action/restart the stream may
> not work. There is a stream but it is frozen on a single frame.
>
> *How to reproduce this bug :*
>
> 1. Launch motion and open the stream.
> 2. Stop motion using the command /action/quit
> 3. Restart motion using the /action/restart command
> 4. Stop motion again with the command /action/quit
> 5. Wait about 30 seconds (I'm not sure waiting is really the cause but
> I've noticed that the longer I wait at this stage the more likely the
> problem is to appear).
> 6. Restart motion with the /action/restart command.
> 7. Watch the stream. Normally it's frozen on a single frame.
>
> The problem may not always occur. In this case the steps must be repeated
> again (perhaps waiting more in step 5?).
>
> *Notes :*
>
> Reviewed guide and contributing documents: Yes
> 1. version: 4.3.1
> 2. installed as a package or compiled from sources [deb, rpm, git, other]:
> deb (and I tried from sources also)
> 3. standalone or part of third party [motion, MotionEyeOS, other]: motion
> 4. video stream source [V4L (card or USB), net cam (mjpeg, rtsp, other),
> mmal]: mmal and also PC webcam
> 5. hardware [x86, ARM, other]: x86_64
> 6. operating system [16.04, Stretch, etc, FreeBSD, other]: Kubuntu and
> raspbian buster
>
>
> I can attach my configuration file if necessary but I don't think it's
> specific to my configuration (I've changed a lot of settings and the
> problem keeps appearing)
>
> Thank you in advance for your help.
> Have a nice day!
> _______________________________________________
> 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...

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



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

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 166, Issue 8
*******************************************

Reply via email to