Webcam freezing after a few seconds

Camera model
[https://www.amazon.de/gp/product/B07XCQKTQR/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1

What is the problem?
Camera is freezing in Octoprint UI and if i view it directly over the Browser. It works for a few seconds again after a website refresh.
It worked a few days and then the problem started.

What did you already try to solve it?
-reboot in safe mode
-check if the webcam still works vorrectly (via windows 10)
-Check for too high temperature (36°C) or undervoltage (ok)
-down the resolution to 480p and frames to 1
-restart webcamd (got a timeout)

Logs (/var/log/webcamd.log, syslog, dmesg, ... no logs, no support)
octoprint.log (276.2 KB)
webcamd_recommended commands_after_timeout.log (3.0 KB)
webcamd.log (2.5 KB)

Additional information about your setup (OctoPrint version, OctoPi version, ...)
-latest stable Octoprintversion
-Raspberry Pi 4, 4GB
-3A power supply

Thanks for the help and thanks for the great software that Octoprint is! its amazing what some people can do with the right hardware and the right skills... always seems like magic to me :relaxed:

Had a similar problem with my two USB web cams on my pi 4+. I found somewhere that USB web cams had problems on USB3 so I changed them to the USB 2 ports, two printers, pi4's and cameras, and all is well.
A no cost solution that worked for me.

1 Like

Sorry for the late reply, a construction company dug on the street next to my house and cut my glass fiber in the process. not its working again :+1:
i tried using the USB2 Ports but the problem is still there.

I just purchased a new wlan-router because the one im using now seems to die soon (wlan cuts of from time to time and only works after a reboot) maybe the router is the problem.
Will write here when it is here and everything is set up and tested

1 Like

ok, installed the new router and the stream runs smoother (fps-wise) but it still freezes after 10-20 seconds and stays that way till i refresh

Not sure if it's same issue or different, but I noticed that systemd constantly restarts webcamd, and the stream freezes right when it restarts. I fixed the problem by changing Type=forking to Type=simple in /etc/systemd/system/webcamd.service and then running systemctl daemon-reload; systemctl stop webcamd; systemctl start webcamd.

1 Like

That worked for me. Thank you.

1 Like