At a guess a UVC device is encoding the video stream in hard where so your CPU doesn’t have to. The IP cam sends individual jpegs which the server then has to encode to mpeg.

Is the encoded webcam video stream then sent to some OpenCV style code? In which case the video stream could again be decoded and analysed in hardware on the GPU. thus requiring very little input from the CPU. Your high CPU usage could be due to not having the right (or any) GPU or GPU drivers for any kind of hard where acceleration, and so all the analysis would default to using the CPU.


Ric


On 30 January 2013 16:44, Roman Gargulak <roman@cncwings.com> wrote:
Fabio,

Not sure why the CPU load is so small (with mjpg-streamer), but I
believe there are more knowledgeable people on this form than myself
that would chip in with an opinion...
I remember reading somewhere that is has to do something with ffmpeg

Roman

On 1/30/2013 10:42 AM, Fabio Cecamore wrote:
> Hi Roman,
> my cam is an IP Cam so I think it isn't compatible..
> But why this program should run with a small load than motion alone ?
>
> Fabio
>
>> I use mjpg-streamer as mentioned:
>> <http://sourceforge.net/projects/mjpg-streamer/>
>>
>> You have to have UVC compatible camera though...
>> <http://www.ideasonboard.org/uvc/>
>>
>> Running 640x480 stream from Logitech Sphere MP gives a CPU load below 1%.
>> That stream is piped to motion.
>>
>> Running motion alone gives CPU load about 95-98%  (running on small ARM
>> device Seagate Dockstar, Marvell 1.2GHZ processor, 128MB RAM)
>> When mjpg-streamer stream is piped to motion for motion detection, CPU
>> load produced by motion drops down to 68-69%.
>>
>> In motion.conf you need to tell motion where is the stream coming from
>> by specifying netcam_url value
>> Mine is as follows:
>> netcam_urlhttp://localhost:8082/?action=stream
>> and of course, when running mjpg_streamer, you need to specify a port in
>> to which is the stream streamed, in this case 8082
>>
>> Hope that helps,
>>
>> Roman
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_jan
> _______________________________________________
> 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
>
>


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
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