Send Motion-user mailing list submissions to
        [email protected]

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
        [email protected]

You can reach the person managing the list at
        [email protected]

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


Today's Topics:

   1. Re: limiting framerate on netcams (?ydr?nas Urbonas)
   2. Re: limiting framerate on netcams (Gordon)
   3. Re: limiting framerate on netcams (Matthew Rench)


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

Message: 1
Date: Sun, 23 Aug 2015 11:45:26 +0300
From: ?ydr?nas Urbonas <[email protected]>
Subject: Re: [Motion-user] limiting framerate on netcams
To: Motion discussion list <[email protected]>
Message-ID:
        <cachtdwt4sn-5xmhjogf8gmsxwt_ben8wbarurtbb+qvqnxo...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

You are right, motion can force framerate only for V4L devices.
If you would like to write a patch to limit framerate for network cameras
(MJPEG or RTSP) - I suggest taking MrDave's fork as a base:
https://github.com/Mr-Dave/motion
Don't hesitate to share your progress, I believe there are many people
interested in this functionality who also would like to contribute or help

On Sun, Aug 23, 2015 at 4:35 AM, Matthew Rench <[email protected]> wrote:

> Greetings!
>
> I am using motion with a netcam, and I am interested in limiting the
> framerate to less than the maximum available. It appears from the
> documentation and the source that the "framerate" config option only
> applies for v4l devices, rather than netcams. Is this correct? Is there
> another way to achieve this natively?
>
> If not, I am deciding between hacking motion to honor the "framerate"
> option for netcams, versus writing an mjpeg "proxy server" which would
> limit the framerate. Are there any recommendations here?
>
> Thanks,
> mdr
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> 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: Sun, 23 Aug 2015 11:57:18 -0500 (CDT)
From: Gordon <[email protected]>
Subject: Re: [Motion-user] limiting framerate on netcams
To: Motion discussion list <[email protected]>
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="utf-8"

Maybe you are discussing something different, but Motion's framerate option 
does work with netcams. 

In more than one Motion server example I use Axis video servers and cameras. I 
set Motion to connect to the Axis server MJPEG network stream, and I limit the 
frame rate in the thread conf file. If I set it to 3 FPS I do get a 3 FPS video 
file (properties says 3 FPS, and it's choppy video as I would expect 3 FPS to 
look). The Axis server itself is set to the maximum framerate. 


From: "?ydr?nas Urbonas" <[email protected]> 
To: "Motion discussion list" <[email protected]> 
Sent: Sunday, August 23, 2015 4:45:26 AM 
Subject: Re: [Motion-user] limiting framerate on netcams 

You are right, motion can force framerate only for V4L devices. 
If you would like to write a patch to limit framerate for network cameras 
(MJPEG or RTSP) - I suggest taking MrDave's fork as a base: 
https://github.com/Mr-Dave/motion 
Don't hesitate to share your progress, I believe there are many people 
interested in this functionality who also would like to contribute or help 

On Sun, Aug 23, 2015 at 4:35 AM, Matthew Rench < [email protected] > wrote: 



Greetings! 

I am using motion with a netcam, and I am interested in limiting the framerate 
to less than the maximum available. It appears from the documentation and the 
source that the "framerate" config option only applies for v4l devices, rather 
than netcams. Is this correct? Is there another way to achieve this natively? 

If not, I am deciding between hacking motion to honor the "framerate" option 
for netcams, versus writing an mjpeg "proxy server" which would limit the 
framerate. Are there any recommendations here? 

Thanks, 
mdr 

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

_______________________________________________ 
Motion-user mailing list 
[email protected] 
https://lists.sourceforge.net/lists/listinfo/motion-user 
http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome 






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

_______________________________________________ 
Motion-user mailing list 
[email protected] 
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: 3
Date: Sun, 23 Aug 2015 21:39:28 -0500
From: Matthew Rench <[email protected]>
Subject: Re: [Motion-user] limiting framerate on netcams
To: Gordon <[email protected]>,         Motion discussion list
        <[email protected]>
Message-ID:
        <cag6tzm7qmjbpxqxk4pyyazcryvh572pmp-vh4gsba-zo9ed...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Indeed it does. I was thrown off by the "Basic Features" guide, which says
that "if the netcam_url option is defined all the video4linux options are
ignored", and that "framerate" is a video4linux option.

However, I think there's a (small) bug. In motion_loop, in motion.c, the
"timenow" variable is reset in the middle of the processing loop:

                /* If the camera is a netcam we let the camera decide the
> pace.
>                  * Otherwise we will keep on adding duplicate frames.
>                  * By resetting the timer the framerate becomes maximum
> the rate
>                  * of the Netcam.
>                  */
>                 if (cnt->conf.netcam_url) {
>                     gettimeofday(&tv1, NULL);
>                     timenow = tv1.tv_usec + 1000000L * tv1.tv_sec;
>                 }


In my experiements, this tends to increase the frame time (decrease the
frame rate) from what it should be based on the config (e.g. 3.8 instead of
4). When I comment out this code, it is pretty much spot on.

Thanks for setting me straight,
mdr

On Sun, Aug 23, 2015 at 11:57 AM, Gordon <[email protected]> wrote:

> Maybe you are discussing something different, but Motion's framerate
> option does work with netcams.
>
> In more than one Motion server example I use Axis video servers and
> cameras.  I set Motion to connect to the Axis server MJPEG network stream,
> and I limit the frame rate in the thread conf file.  If I set it to 3 FPS I
> do get a 3 FPS video file (properties says 3 FPS, and it's choppy video as
> I would expect 3 FPS to look).  The Axis server itself is set to the
> maximum framerate.
>
> ------------------------------
> *From: *"?ydr?nas Urbonas" <[email protected]>
> *To: *"Motion discussion list" <[email protected]>
> *Sent: *Sunday, August 23, 2015 4:45:26 AM
> *Subject: *Re: [Motion-user] limiting framerate on netcams
>
> You are right, motion can force framerate only for V4L devices.
> If you would like to write a patch to limit framerate for network cameras
> (MJPEG or RTSP) - I suggest taking MrDave's fork as a base:
> https://github.com/Mr-Dave/motion
> Don't hesitate to share your progress, I believe there are many people
> interested in this functionality who also would like to contribute or help
>
> On Sun, Aug 23, 2015 at 4:35 AM, Matthew Rench <[email protected]> wrote:
>
>> Greetings!
>>
>> I am using motion with a netcam, and I am interested in limiting the
>> framerate to less than the maximum available. It appears from the
>> documentation and the source that the "framerate" config option only
>> applies for v4l devices, rather than netcams. Is this correct? Is there
>> another way to achieve this natively?
>>
>> If not, I am deciding between hacking motion to honor the "framerate"
>> option for netcams, versus writing an mjpeg "proxy server" which would
>> limit the framerate. Are there any recommendations here?
>>
>> Thanks,
>> mdr
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> Motion-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/motion-user
>> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
>>
>>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user


End of Motion-user Digest, Vol 111, Issue 15
********************************************

Reply via email to