Pi3 Performance on multiple Cameras

143 views
Skip to first unread message

licht77

unread,
Nov 15, 2020, 9:35:47 AM11/15/20
to motioneye
Hi guys, 

i built a little smart home for a hedgehog and am wondering about the camera performance. 

used hardware:

cam1 = picamera via mmal
cam 2 = OV2710 chip via USB 
cam 3 = another OV2710 via USB but wideangle

the cams are all capable up to 1920/1280

Everything runs fine on low resolutions - but as soon as the 2 USB cams are both running on 720p then one of them is stopping to work after some time. USB should be able to deal with the bandwith and raspberry temperature is high but ok so far.

When one of them is running eg. 320*240 -> then there is no problem at all.

do you have the same experience and what is the best setting when using 3 cams?





Kevin Shumaker

unread,
Nov 15, 2020, 10:09:12 AM11/15/20
to licht77, motioneye
I run 5 cameras at 800x600x15fps, 1 USB & 3 Network 1 CSI PiCam.and 1 rtsp @ 1280x720x15fps om a Pi4 with a 3A power supply (not phone charger) and active cooling.
Your issue is more likely relates to
A] 2 USB devices with same manufacturer IDs,
B] overheating
To check overheating / throttling run after one camera fails:
vcgencmd get throttled [enter]
If it reports back anything than 0x0 you have issues
I would be concerned for 2 USB camera devices on a PI anyway, especially if you have a keyboard and monitor and the CSI camera. All are pulling power, and even if you are running a 3a supply, may be exceeding available power on a 3B.
[and before you say it works at lower resolution, that's because you are not 'stressing' the processor as much at lower resolutions.]

 

--
You received this message because you are subscribed to the Google Groups "motioneye" group.
To unsubscribe from this group and stop receiving emails from it, send an email to motioneye+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/motioneye/180346a1-277d-4578-a66e-883211af6e92n%40googlegroups.com.


--
Thanks

Kevin Shumaker


N38° 19' 56.52"
W85° 45' 8.56"

Semper Gumby
“Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
Ethics are what we do when no one else is looking.
Quis custodiet ipsos custodes?
“There is no end to the good you can do if you don’t care who gets the credit.” - C Powell
You know we're sitting on four million pounds of fuel, one nuclear weapon and a thing that has 270,000 moving parts built by the lowest bidder. Makes you feel good, doesn't it?

licht77

unread,
Nov 15, 2020, 10:37:31 AM11/15/20
to motioneye
Hi there!  Thanks for the quick feedback!

Throttling is not an issue as far as i see: cpu temperature is beeing monitored permanentely and is never above 60 degrees celcius.
I had power issues in my mind but the pi itself is pretty stable.

I am not using keyboard/mouse and am powering the whole thing from 3Amps via POE. :-)
https://igelcam.valki.com <-- just for fun

So maybe I have to take a deeper look into the adressing of those manufactorer IDs...

Kevin Shumaker

unread,
Nov 15, 2020, 10:55:30 AM11/15/20
to licht77, motioneye
If you can ssh into the PI you can still run the vcgencmd.
Heat is an issue at 60`C.
PoE on Pi requires massive active cooling if you are using any of the HATs. and have known issues supplying power to USB:

licht77

unread,
Nov 16, 2020, 1:59:14 AM11/16/20
to motioneye
Mini-Update: 

Thanks to kevin, I read into Pi3  docs and realized that indeed the temperature management changed and a new temp_soft_limit has been introduced. This kicks in at 60 degrees  - 10 degrees before the "real" temperature throttling  at 70 degrees. 
In this phase, the CPU goes down 200 MHz from 1400 -> 1200 and voltage drops from 1.375 -> 1.2688 Volts.

One can bypass this by setting eg. temp_soft_limit=70 in config.txt to maintain the PI2 behaviour. 

Only bad options here so far...  active cooling is no option as this would much likely annoy the hedgehogs :)
The PoE adapter is external and no issue for the PI ( https://amzn.to/38GLnN8 ) and the sole additional power consumers are the 2 USB cams and 2 IR diodes, 2 bosch sensors from the 3V3 pins what I cannot remove.

So I am afraid going down with the resolution is the only thing I can do so far... - I am going to find out how big the impact is on the object detection on lower resolutions :)

licht77

unread,
Nov 16, 2020, 7:24:29 AM11/16/20
to motioneye
OK this annoys me  - i had a closer look:

first off: no throttling so far:
 
[root@igelcam ~]# vcgencmd get_throttled
throttled=0x0


These are the 3 actual cams:

Cam ID 1 aka "Schlafraum":
type MMAL set to 240x320
Streaming to http://192.168.3.100:8081with 240x320

Cam ID 5 aka "Eingang IR":
type USB OV2710  set to 320x240
Streaming to http://192.168.3.100:8083  with  320x240

Cam ID 2 aka "Weitwinkel IR":
type USB OV2710  set to 1280x720
Stream: - not available (?!)  

But beside the fact that the the stream is not working - i see this error: 
Nov 16 12:20:08 igelcam user.warn motion: [3:ml3:Weitwinkel ] [WRN] [VID] v4l2_pixfmt_set: Adjusting resolution from 1280x720 to 640x480.

-> changed this cam in the GUI to 640x480 what removes the error but still no stream  via http://192.168.3.100:8082 (while normal snapshot, embed URL as well as GUI are working aka "Cam itself is ok")
I also tried different framerates but it always falls down from 1280 to 640.  

!! But at least all 3 cams are working (so rather no systematic UID problem?) !!

Now when increasing resolution on Cam ID 5 to 640x480 as well -> images stop and watchdog starts killing motion:

Nov 16 12:41:07 igelcam user.notice motion: [0:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /data/etc/motion.conf
Nov 16 12:41:07 igelcam user.notice motion: [0:motion] [NTC] [ALL] config_camera: Processing camera config file camera-5.conf
Nov 16 12:41:07 igelcam user.notice motion: [0:motion] [NTC] [ALL] config_camera: Processing camera config file camera-1.conf
Nov 16 12:41:07 igelcam user.notice motion: [0:motion] [NTC] [ALL] config_camera: Processing camera config file camera-2.conf
Nov 16 12:41:07 igelcam user.notice motion: [0:motion] [NTC] [ALL] motion_startup: Logging to syslog
Nov 16 12:41:07 igelcam user.notice motion: [0:motion] [NTC] [ALL] motion_startup: Motion 4.2.2+gitUNKNOWN Started
Nov 16 12:41:07 igelcam user.notice motion: [0:motion] [NTC] [ALL] motion_startup: Using default log type (ALL)
Nov 16 12:41:07 igelcam user.notice motion: [0:motion] [NTC] [ALL] motion_startup: Using log type (ALL) log level (WRN)
Nov 16 12:41:17 igelcam daemon.info dhclient: DHCPREQUEST on eth0 to 192.168.3.1 port 67
Nov 16 12:41:17 igelcam daemon.info dhclient: DHCPACK from 192.168.3.1
Nov 16 12:41:17 igelcam daemon.info dhclient: bound to 192.168.3.100 -- renewal in 145 seconds.
Nov 16 12:41:26 igelcam user.notice throttlewatch: currently: ok, temperature: 67 C
Nov 16 12:41:37 igelcam user.err motion: [0:motion] [ERR] [ALL] motion_watchdog: Thread 1 - Watchdog timeout. Trying to do a graceful restart
Nov 16 12:41:47 igelcam user.err motion: [0:motion] [ERR] [ALL] motion_watchdog: Thread 1 - Watchdog timeout did NOT restart, killing it!
Nov 16 12:41:54 igelcam user.notice motion: [0:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /data/etc/motion.conf


going back to 320x480:  motion restarts  atop and all 3 cams are working again.
Fun fact: Cam 2 and 5 are interchangeable regarding this issue: one on "high" resolution dropping back to 640 and the other 320... both 640 or higher: bam! :)






Kevin Shumaker

unread,
Nov 16, 2020, 7:50:51 AM11/16/20
to licht77, motioneye
Nov 16 12:41:26 igelcam user.notice throttlewatch: currently: ok, temperature: 67 C
Not good, and setting the temp higher in config.txt may or may not be helping. Since 2 of the cameras are USB, can you put the Pi outside the hutch and just run the cables into the hutch? It may be a problem for the CSI PiCam, but if you set the PiCam up on a PiZeroW, and Fast Network Camera, it shouldn't have the heat issues the Pi3 does...

--
You received this message because you are subscribed to the Google Groups "motioneye" group.
To unsubscribe from this group and stop receiving emails from it, send an email to motioneye+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages