motioneye-project / motioneye

A web frontend for the motion daemon.
GNU General Public License v3.0
3.98k stars 652 forks source link

What can i do to improve my setup? #1879

Closed gardiol closed 3 years ago

gardiol commented 4 years ago

Hi all! I have been working on my setup for many hours now... i try to describe it to you, then i will ask a couple of questions.

CPU: Intel(R) Xeon(R) CPU E3-1535M v5 @ 2.90GHz RAM: 16GB OS: Gentoo Linux

Cameras: 5 AXIS 211M IP cams 4 Chinese V380 IP cams 2 DAHUA Bullet IP cams 1 Misecu full-hd IP cam

The AXIS cams are configured as http:///snapshot.jpg, at 1280x1024 The V380 cams are configured as RTSP 640x480 (using secondary stream to match resolution) The DAHUA cams are configured as RTSP at 1280x960 The MISECU cam is configured as RTSP at 1920x1080 (again, to match resolution)

My system is running over 200% of CPU, and quite often the V380 cams simply do not show any image ( i get a lot of "connection refused" in the logs). I pinned down the issues to excessive CPU usage (whoa, not that hard eh!),

I did some extensive debug and checks:

Lowering resolution do help a bit, but i cannot lower the MISECU (1920x1080 fixed).

The V380 are a mistery as no settings can be changed and connecting to them is hit and miss, and seems to suck up to 30% CPU.

I do use movie passtrough...

My questions

  1. Is it normal that RTSP uses so much more CPU than snapshot image grabbing?
  2. Does Motion uses multi-core or is it forced to one core only?
  3. Would setup a second pc and share the cameras between the two actually help?
  4. What would you do in my situation? Buy a more powerfull pc?

thank you in general, any suggestion is well accepted.

Park0 commented 4 years ago

I am just playing with the same thing. I think a raspberry pi could be used for transcoding some streams (writing to a NFS share). But i have to try how many it can handle.

gardiol commented 3 years ago

I doubt a pi can handle more than a couple of streams. I improved a bit by enabling passtrough recording on most of the streams. Still not optimal, but i understand it would be a problem to fix in Motion and not in MotionEye.