Camera model
Logitech C920X
What is the problem?
The camera will show output just fine to Obico, Octoapp, and Octoprint and then it will periodically (without reason so far) stop functioning. It will sometimes come back on its own but most of the time a reboot is necessary.
What did you already try to solve it?
I have increased the video RAM to 256 from 128, I we scoured the forums and logs to try and make sense of any errors that will spell out the issue. I have updated the Octopi and validated that there are no updates for the Octoprint instance. I am using the power cord from the Rasperry Pi4B kit
RAK Raspberry Pi 4 Kit – RAKwireless Store
Logs (/var/log/webcamd.log
, syslog, dmesg, ... no logs, no support)
Partial of webcamd.log
Starting up webcamDaemon...
--- Configuration: ----------------------------
cfg_file: /boot/octopi.txt
camera: auto
usb options: -r 1920x1080 -f 30
raspi options: -fps 10
http options: -w ./www-octopi -n
Explicitly USB device:
Found video devices:
/dev/video0
/dev/video1
/dev/video10
/dev/video11
/dev/video12
/dev/video13
/dev/video14
/dev/video15
/dev/video16
/dev/video18
config file='/boot/octopi.txt':USB device was not set in options, start MJPG-streamer with the first found video device: /dev/video0
<13>Jan 27 16:13:31 root: Starting USB webcam
Checking for VL805 (Raspberry Pi 4)...
- It seems that you don't have VL805 (Raspberry Pi 4).
There should be no problems with USB (a.k.a. select() timeout)
Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_uvc.so -r 1920x1080 -f 30 -d /dev/video0
MJPG Streamer Version: git rev: 5554f42c352ecfa7edaec6fc51e507afce605a34
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 1920 x 1080
i: Frames Per Second.: 30
i: Format............: JPEG
i: TV-Norm...........: DEFAULT
libv4l2: error setting pixformat: Device or resource busy
Unable to set format: 1196444237 res: 1920x1080
Init v4L2 failed !! exit fatal
i: init_VideoIn failed
Partial of syslog
Jan 27 16:14:18 raspberrypi root: Starting USB webcam
Jan 27 16:14:18 raspberrypi MJPG-streamer [28759]: starting application
Jan 27 16:14:18 raspberrypi MJPG-streamer [28759]: MJPG Streamer Version: git rev: 5554f42c352ecfa7edaec6fc51e507afce605a34
Jan 27 16:14:18 raspberrypi MJPG-streamer [28759]: Using V4L2 device.: /dev/video0
Jan 27 16:14:18 raspberrypi MJPG-streamer [28759]: Desired Resolution: 1920 x 1080
Jan 27 16:14:18 raspberrypi MJPG-streamer [28759]: Frames Per Second.: 30
Jan 27 16:14:18 raspberrypi MJPG-streamer [28759]: Format............: JPEG
Jan 27 16:14:18 raspberrypi MJPG-streamer [28759]: TV-Norm...........: DEFAULT
Jan 27 16:14:18 raspberrypi MJPG-streamer [28759]: init_VideoIn failed
Jan 27 16:14:19 raspberrypi systemd[1]: webcamd.service: Succeeded.
Jan 27 16:14:19 raspberrypi systemd[1]: Started the OctoPi webcam daemon with the user specified config.
Jan 27 16:14:20 raspberrypi systemd[1]: webcamd.service: Service RestartSec=1s expired, scheduling restart.
Jan 27 16:14:20 raspberrypi systemd[1]: webcamd.service: Scheduled restart job, restart counter is at 256.
Jan 27 16:14:20 raspberrypi systemd[1]: Stopped the OctoPi webcam daemon with the user specified config.
Jan 27 16:14:20 raspberrypi systemd[1]: Starting the OctoPi webcam daemon with the user specified config...
Jan 27 16:14:20 raspberrypi root: Starting USB webcam
Jan 27 16:14:20 raspberrypi MJPG-streamer [28785]: starting application
Jan 27 16:14:20 raspberrypi MJPG-streamer [28785]: MJPG Streamer Version: git rev: 5554f42c352ecfa7edaec6fc51e507afce605a34
Jan 27 16:14:20 raspberrypi MJPG-streamer [28785]: Using V4L2 device.: /dev/video0
Jan 27 16:14:20 raspberrypi MJPG-streamer [28785]: Desired Resolution: 1920 x 1080
Jan 27 16:14:20 raspberrypi MJPG-streamer [28785]: Frames Per Second.: 30
Jan 27 16:14:20 raspberrypi MJPG-streamer [28785]: Format............: JPEG
Jan 27 16:14:20 raspberrypi MJPG-streamer [28785]: TV-Norm...........: DEFAULT
Jan 27 16:14:21 raspberrypi MJPG-streamer [28785]: init_VideoIn failed
Jan 27 16:14:21 raspberrypi octoprint[433]: #033[33m2023-01-27 16:14:21,745 - octoprint.plugins.octoapp - WARNING - Failed to get webcam snapshot HTTPConnectionPool(host='127.0.0.1', port=8080): Read timed out. (read timeout=5.0)#033[0m
Jan 27 16:14:21 raspberrypi systemd[1]: webcamd.service: Succeeded.
Jan 27 16:14:21 raspberrypi systemd[1]: Started the OctoPi webcam daemon with the user specified config.
Jan 27 16:14:22 raspberrypi octoprint[433]: 2023-01-27 16:14:22,911 - backoff - INFO - Backing off capture_jpeg(...) for 1.2s (requests.exceptions.ReadTimeout: HTTPConnectionPool(host='127.0.0.1', port=8080): Read timed out. (read timeout=5))#033[0m
Jan 27 16:14:23 raspberrypi systemd[1]: webcamd.service: Service RestartSec=1s expired, scheduling restart.
Jan 27 16:14:23 raspberrypi systemd[1]: webcamd.service: Scheduled restart job, restart counter is at 257.
Jan 27 16:14:23 raspberrypi systemd[1]: Stopped the OctoPi webcam daemon with the user specified config.
Jan 27 16:14:23 raspberrypi systemd[1]: Starting the OctoPi webcam daemon with the user specified config...
Jan 27 16:14:23 raspberrypi root: Starting USB webcam
Jan 27 16:14:23 raspberrypi MJPG-streamer [28814]: starting application
Jan 27 16:14:23 raspberrypi MJPG-streamer [28814]: MJPG Streamer Version: git rev: 5554f42c352ecfa7edaec6fc51e507afce605a34
Jan 27 16:14:23 raspberrypi MJPG-streamer [28814]: Using V4L2 device.: /dev/video0
Jan 27 16:14:23 raspberrypi MJPG-streamer [28814]: Desired Resolution: 1920 x 1080
Jan 27 16:14:23 raspberrypi MJPG-streamer [28814]: Frames Per Second.: 30
Jan 27 16:14:23 raspberrypi MJPG-streamer [28814]: Format............: JPEG
Jan 27 16:14:23 raspberrypi MJPG-streamer [28814]: TV-Norm...........: DEFAULT
Jan 27 16:14:23 raspberrypi MJPG-streamer [28814]: init_VideoIn failed
Jan 27 16:14:24 raspberrypi octoprint[433]: #033[31m2023-01-27 16:14:24,238 - octoprint.plugins.obico - ERROR - timed out#033[0m
Jan 27 16:14:24 raspberrypi systemd[1]: webcamd.service: Succeeded.
Jan 27 16:14:24 raspberrypi systemd[1]: Started the OctoPi webcam daemon with the user specified config.
Jan 27 16:14:24 raspberrypi octoprint[433]: #033[31m2023-01-27 16:14:24,273 - webcam_server - ERROR - Exception on / [GET]#033[0m
Jan 27 16:14:24 raspberrypi octoprint[433]: Traceback (most recent call last):
Jan 27 16:14:24 raspberrypi octoprint[433]: File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 2073, in wsgi_app
Jan 27 16:14:24 raspberrypi octoprint[433]: response = self.full_dispatch_request()
Jan 27 16:14:24 raspberrypi octoprint[433]: File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 1519, in full_dispatch_request
Jan 27 16:14:24 raspberrypi octoprint[433]: rv = self.handle_user_exception(e)
Jan 27 16:14:24 raspberrypi octoprint[433]: File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 1517, in full_dispatch_request
Jan 27 16:14:24 raspberrypi octoprint[433]: rv = self.dispatch_request()
Jan 27 16:14:24 raspberrypi octoprint[433]: File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 1503, in dispatch_request
Jan 27 16:14:24 raspberrypi octoprint[433]: return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
Jan 27 16:14:24 raspberrypi octoprint[433]: File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_obico/webcam_stream.py", line 484, in webcam
Jan 27 16:14:24 raspberrypi octoprint[433]: return self.get_snapshot()
Jan 27 16:14:24 raspberrypi octoprint[433]: File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_obico/webcam_stream.py", line 422, in get_snapshot
Jan 27 16:14:24 raspberrypi octoprint[433]: return flask.send_file(io.BytesIO(self.next_jpg()), mimetype='image/jpeg')
Jan 27 16:14:24 raspberrypi octoprint[433]: File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_obico/webcam_stream.py", line 427, in next_jpg
Jan 27 16:14:24 raspberrypi octoprint[433]: s.connect(('127.0.0.1', 14499))
Jan 27 16:14:24 raspberrypi octoprint[433]: socket.timeout: timed out
Jan 27 16:14:24 raspberrypi octoprint[433]: 2023-01-27 16:14:24,278 - werkzeug - INFO - 127.0.0.1 - - [27/Jan/2023 16:14:24] "#033[35m#033[1mGET /?action=snapshot HTTP/1.1#033[0m" 500 -#033[0m
Jan 27 16:14:25 raspberrypi systemd[1]: webcamd.service: Service RestartSec=1s expired, scheduling restart.
Jan 27 16:14:25 raspberrypi systemd[1]: webcamd.service: Scheduled restart job, restart counter is at 258.
Jan 27 16:14:25 raspberrypi systemd[1]: Stopped the OctoPi webcam daemon with the user specified config.
Jan 27 16:14:25 raspberrypi systemd[1]: Starting the OctoPi webcam daemon with the user specified config...
Jan 27 16:14:25 raspberrypi root: Starting USB webcam
Jan 27 16:14:25 raspberrypi MJPG-streamer [28846]: starting application
Jan 27 16:14:25 raspberrypi MJPG-streamer [28846]: MJPG Streamer Version: git rev: 5554f42c352ecfa7edaec6fc51e507afce605a34
Jan 27 16:14:25 raspberrypi MJPG-streamer [28846]: Using V4L2 device.: /dev/video0
Jan 27 16:14:25 raspberrypi MJPG-streamer [28846]: Desired Resolution: 1920 x 1080
Jan 27 16:14:25 raspberrypi MJPG-streamer [28846]: Frames Per Second.: 30
Jan 27 16:14:25 raspberrypi MJPG-streamer [28846]: Format............: JPEG
Jan 27 16:14:25 raspberrypi MJPG-streamer [28846]: TV-Norm...........: DEFAULT
Jan 27 16:14:25 raspberrypi MJPG-streamer [28846]: init_VideoIn failed
Additional information about your setup (OctoPrint version, OctoPi version, ...)
octoprint-systeminfo-20230127161527.zip (1.8 MB)