motioneye-project / motioneye

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

Multiple Motion Threads #2207

Open dbeckwith01 opened 2 years ago

dbeckwith01 commented 2 years ago

I am evaluating MotionEye to use to monitor multiple IP video cameras around my home. I hoping to run this on my RPI 4B+. I have successfully got MotionEye setup with one RTSP camera but I noticed it's using ~40% of the CPU. Running htop shows a large number of motion process which seem to run across multiple cores. I was hoping that MotionEye would set motion up to use the RPi's hardware encoding.

It is possible to get MotionEye to use the RPI hardware encoder?

image
starbasessd commented 2 years ago

The GPU encoder is used for encoding / decoding the video, not for motion detection. There was a recent issue discovered where when installing motionEye (specifically motion) motion daemon gets installed and auto starts. If you disable it: sudo systemctl stop motion sudo systemctl disable motion and restart the Pi, it will still use motion, but motionEye will control it as it should.

dbeckwith01 commented 2 years ago

@starbasessd,

Thank you for the quick reply!

Currently I'm not running MotionEye with the Motion settings. I'm just testing streaming and recording. I'm running Motion in Docker at the moment on Balena OS.

I'm using MotionEye 0.42.1 and Motion 4.3.2.

image
starbasessd commented 2 years ago

Motion daemon is still turned 'on' unless you turn it off and disable it as shown above. Motion daemon doesn't need to be 'enabled' to be used by motionEye. If you want to use the GPU encoder, you would want to use an OMX enabled format. If you want best performance, I would use Pass Through, but then you won't get video name or time stamp, but you still can get motion detection trigger.