Stream camera feed from one Pi4 to another using Tkinter
I am currently working on a robot that runs on a Pi4 and it’s remotely controlled from another Pi4 with a Tkinter GUI. The robot Pi and the controller GUI Pi are connected with an umbilical cable allowing ethernet connection between the two Pi4s.
Tkinter and Raspberry Pi Camera Module 3 Causing Pi5 to Lag After Some Time
I am attempting to monitor a Pi Camera Module 3 with tkinter. When I start running my program it runs fine, but after a few hours of running the camera and entire Raspberry Pi 5 system begin to lag heavily. The second I terminate the program the system returns back to normal operation. Can someone please help me figure out what is causing the system to lag so this program can run indefinitely without lagging? I notice that Xwayland CPU usage begins to creep up to 100% as the program runs. I have monitored memory/cpu/interrupts/context switches none seem to be raise as the program runs. I have tried changing the nice value and priority of the program to -20 and neither seem to do anything. I have pasted my code below (app has a camera has a video capture). Any help would be much appreciated.