Raspberry Pi High-Quality camera (attached to an RPi4).
What is the problem?
Most of the time, the video feed works perfectly fine. However, intermittently (usually 2-3 times per hour, but with no specific regular pattern), the camera feed stops (to be more specific, the display within Octoprint shows the last frame of the video feed, so it looks as if the video has paused). Ditto when viewed via octopi.local/webcam/, octopi.local/webcam/?action=stream, and octopi.local:8080.
All other parts of the Octoprint web interface continue to work properly, such as the GCode viewer, etc.
This has happened intermittently for almost a year (when I first switched over to using the HQ camera instead of the normal RPi camera)... I just never got around to submitting a bug report about it until now.
Refreshing the Octoprint web page did not resolve the issue (I had to reboot the entire RPi or SSH into it and manually restart the webcamd service to regain the video feed).
What did you already try to solve it?
I previously set up a work-around solution, which was to add a cron-job every five minutes to the Pi user's cron: */5 * * * * echo "mypasswordhere" | sudo -kS service webcamd restart
Obviously, this restarts the webcamd service every five minutes. Now, with this cron job running regularly, all I have to do is refresh the web browser when the glitch occurs and the video feed resumes, but I'm wondering if there might be a proper solution...
I started writing this post about a month ago, and then thought "I wonder if something has since been updated, I'll disable that cron task, update everything, and see if it still faults". I'm back now, a month later, and yes, it is still having this fault. The attached logs are from almost a month ago.
I have also tried (months ago) to boot Octoprint into safe mode, and replicated the issue there, both with and without the above cron job in effect.
The webcam feed freezing does not correlate with the webcamd service restarting every five minutes. Sometimes it can happen only a few minutes after booting the Octoprint RPi, sometimes it can stay up and running for 30-40 minutes before it freezes. As previously stated, this error occurs regardless of if I have that cron job to restart webcamd, so it's not caused by the cron job.
/var/log/webcamd.log, syslog, dmesg, ... no logs, no support)
- /var/log/webcamd.log did not exist on my system, so I can't upload it.
- Instead, the output of journalctl -u webcamd: webcamd.txt.zip (13.4 KB)
- syslog (192.3 KB)
- dmesg output (12 KB)
- System Info bundle (95.9 KB)
Additional information about your setup (OctoPrint version, OctoPi version, ...)
- OctoPrint v1.6.1, but this has been happening for a good year or so, across multiple versions.
- OctoPi v0.17.0.
- Raspberry Pi 4 Model B Rev 1.1 running Raspbian Buster. (as recently as yesterday, I ran apt-get update && apt-get upgrade, so all packages are up-to-date as well)
- Original Prusa i3 Mk3S
Thanks in advance for any help provided.