Git Product home page Git Product logo

Comments (5)

gen2brain avatar gen2brain commented on July 17, 2024

Those numbers do look high. On my laptop with 4 cores 640x480 uses about 25% of cpu, and for 1024x768 43%. If you are using /html try to disable webgl with -nowebgl option. Also, you can try to raise delay a little with -delay, default is 10ms, but can be raised a little and will still be acceptable.

from cam2ip.

rolfep avatar rolfep commented on July 17, 2024

This evening, I booted the machine, added -nowebgl to the above command, and opened the url in Chrome.

htop showed about 87% CPU, maybe due to a lot of reflected evening sunshine in the frame?

So, I removed that option and added -delay 20

Now, htop shows about 74% CPU, seems stable there for 10 minutes or so.

I'll see what the occasional animal moving in frame looks like, maybe adjust -delay, and can try something else, if you want. It's not too big a deal. Thanks.

from cam2ip.

gen2brain avatar gen2brain commented on July 17, 2024

You can now try with native build, I added support for native V4L implementation, and in my tests it works with much lower CPU usage compared to OpenCV build. Also, I added support for asm base64 on amd64.

from cam2ip.

rolfep avatar rolfep commented on July 17, 2024

image
Ok, that's the top entry for what I've been using,

/home/rolf/cam2ip-1.3-64bit/cam2ip -height 768 -width 1024 -delay 30

where the delay was added to mitigate the high cpu usage. The scene is early morning, low light levels, which reduced cpu, IIRC. I'll try with the native build without delay, to begin with:

/home/rolf/cam2ip-1.5-64bit-native/cam2ip -height 768 -width 1024

image

This is toward the high end of a small range of %CPU that is always above 22%, at this time.

As light increases, not yet sunlight, the mean %CPU seems to shift upward about one-half percent.
This is the scene:

image

The new program looks to be a very significant improvement for me.
Thank you.

from cam2ip.

rolfep avatar rolfep commented on July 17, 2024

image
After my previous post, I noticed %CPU increasing pretty rapidly to over 40. It seemed to me perhaps more than just an increase in light level and I shut down the computers, went for a walk. When I came back, light is, of course, a bit more, no sunlight as yet. Cam2ip is auto-started by a script in KDE. Perhaps a breeze is moving branches a bit more. The initial output is above and a screenie of the scene is here:

image

A few minutes later, something has settled down. I display the scene full-screen in Chrome, usually.

image

Letting it run for a while...

Previous CPU issues with kaffeine on this HTPC machine had me suspecting interactions with other apps, especially kodi. ATM, I opened firefox for a live flash stream and took a screen shot of top:

image

After a while, I started a couple of OTA t.v. recordings in kaffeine, closed Firefox with the cpu-hungry stream, started a different http stream in Chrome, and started another instance of Chrome to display the cam2ip scene. Along in here, the cam2ip scene stopped refreshing and I killed it. I re-started cam2ip and now have a nice live display. Initially and for about 14 minutes until now, the initial %CPU looks stable between high 40s to mid 50s.

image

image

After shutting down the http stream and that instance of Chrome, it sure seems to me the %CPU of cam2ip is affected by other apps running, by the results of top and htop, at least.

image

image

I logged out and in, giving a new start for cam2ip with no other desktop apps, except Chrome to display the scene.

image

The numbers stayed steady for a little while and light is fading, so I want to try one last look after starting kodi. This is the trio of apps I most commonly use on this HTPC.

image

FWIW. Whether or not these observations are relevant, much less CPU is being used. Thanks.

from cam2ip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.