Stuck on "webcam stream loading"

First off, please let me apologize in advance if there is a thread with a solution to a similar problem I'm having, I tried to researching, fixing the problem myself, I've been pulling my hair out for 2 days now and still can't find the fix to this problem. That's out of the way let's get into it.

The webcam feed in on my Octopi stuck on "webcam stream loading". My setup was working perfectly for a few days since I set it up(webcam stream, printing control and everything works as it should), the system started having a problem when I install a few plug-ins, problem connecting to the printer and PIP error on the plug-ins manage page, the webcam still works fine tho. I decided to just do a fresh install and start everything over, PIP error still wasn't fixed, I tried running "sudo apt-get install python-pip" command via Putty, that finally fixed the PIP error.

After that, I notice that the webcam stuck on the "webcam stream loading" I tried another fresh install of octopi, still didn't' fix anything. going to http://octopi.local/webcam/?action=stream showing a black screen when the webcam is plugged in and " The webcam server is currently not running" when I unplugged the webcam.

below are the result from commands suggested in others webcam problem posts

pi@octopi:~ $ lsusb
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 1908:2311 GEMBIRD
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

pi@octopi:~ $ lsusb -t
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 4: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 4: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M

pi@octopi:~ $ systemctl status webcamd
● webcamd.service - the OctoPi webcam daemon with the user specified config
Loaded: loaded (/etc/systemd/system/webcamd.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2019-11-24 08:21:03 GMT; 54min ago
Process: 336 ExecStart=/root/bin/webcamd (code=exited, status=0/SUCCESS)
Main PID: 450 (mjpg_streamer)
Tasks: 12 (limit: 4915)
Memory: 4.1M
CGroup: /system.slice/webcamd.service
└─450 ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_uvc.so -r 640x480 -f 10 -d /dev/video0
Nov 24 08:21:03 octopi mjpg_streamer[450]: MJPG-streamer [450]: commands.............: disabled
Nov 24 08:21:03 octopi mjpg_streamer[450]: MJPG-streamer [450]: starting input plugin input_uvc.so
Nov 24 08:21:03 octopi mjpg_streamer[450]: MJPG-streamer [450]: starting output plugin: output_http.so (ID: 00)
Nov 24 08:21:03 octopi webcamd[336]: Done bring up all configured video device
Nov 24 08:21:03 octopi webcamd[336]: Goodbye...
Nov 24 08:21:03 octopi systemd[1]: Started the OctoPi webcam daemon with the user specified config.
Nov 24 08:21:08 octopi webcamd[336]: i: select() timeout
Nov 24 08:21:08 octopi webcamd[336]: i: cleaning up resources allocated by input thread
Nov 24 08:21:08 octopi mjpg_streamer[450]: MJPG-streamer [450]: select() timeout
Nov 24 08:21:08 octopi mjpg_streamer[450]: MJPG-streamer [450]: cleaning up resources allocated by input thread

pi@octopi:~ $ ps -ax|grep mjpg
450 ? Sl 0:00 ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_uvc.so -r 640x480 -f 10 -d /dev/video0
4194 pts/0 S+ 0:00 grep --color=auto mjpg

pi@octopi:~ $ ps -ax|grep webcam
4239 pts/0 S+ 0:00 grep --color=auto webcam

pi@octopi:~ $ /var/log/webcamd.log
-bash: /var/log/webcamd.log: No such file or directory

Camera model
Generic USB webcam

What is the problem?
stuck on "webcam stream loading"

What did you already try to solve it?
-fresh install of octopi (many times)
-running various command via Putty
-runs update/upgrade
-tried using another identical webcam
-test both webcam on my windows 10 machine, they still work fine.

Logs
Octoprint.log : https://pastebin.com/MUAi8iBR

pi@octopi:~ $ /var/log/webcamd.log
-bash: /var/log/webcamd.log: No such file or directory

pi@octopi:~ $ /var/log/syslog
-bash: /var/log/syslog: Permission denied

Additional information about your setup (OctoPrint version, OctoPi version, ...)
RaspberryPi4 4GB, latest octopi image,Generic USB webcam

1 Like

similar issue here only mine never worked from the start... same setup... been going crazy trying to figure out the issue countless install guides, fresh installs nothing has worked...

Just switch to a Pi camera and it works without issue. Still not sure why my old webcam works at first then stopped working.

yes but they suck and are terrible to find good positioning. I like my set up to LOOK good as well as function good. Who the hell wants a long ribbon everywhere?

My web cam was working at first and then after a reboot was stuck loading.

I then switched usb ports and ran this command:

systemctl restart webcamd

This solved my issue. Switching USB ports is probably not necessary.