The Raspberry Pi camera worked properly until today morning. Currently I got the error
"Webcam stream not loaded"
If I check the webcamd status I get:
webcamd.service - the OctoPi webcam daemon with the user specified config
Loaded: loaded (/etc/systemd/system/webcamd.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Wed 2020-07-08 17:57:18 CEST; 4min 54s ago
Process: 571 ExecStart=/root/bin/webcamd (code=exited, status=0/SUCCESS)
Jul 08 17:57:18 octopi systemd[1]: webcamd.service: Service RestartSec=100ms expired, scheduling restart.
Jul 08 17:57:18 octopi systemd[1]: webcamd.service: Scheduled restart job, restart counter is at 5.
Jul 08 17:57:18 octopi systemd[1]: Stopped the OctoPi webcam daemon with the user specified config.
Jul 08 17:57:18 octopi systemd[1]: webcamd.service: Start request repeated too quickly.
Jul 08 17:57:18 octopi systemd[1]: webcamd.service: Failed with result 'start-limit-hit'.
Jul 08 17:57:18 octopi systemd[1]: Failed to start the OctoPi webcam daemon with the user specified config.
I get an appropriate response with the commands:
raspivid -v -o testvideo.h264 -t 5000
raspistill -v -o test.jpg
so I don't think it's a camera problem (Anyway I tried to replace the cable, but I got the same result).
Tried also to update and upgrade...
Any suggestion?
octoprint.log (25.4 KB)
/var/log/webcamd.log not found
I'm running octoprint 1.4.0 on Rasperry Pi 3B+
Edit 1:
I managed to get it to work with the commands:
git clone https://github.com/jacksonliam/mjpg-streamer.git
cd mjpg-streamer/mjpg-streamer-experimental
export LD_LIBRARY_PATH=.
make
./mjpg_streamer -i "./input_raspicam.so -fps 15" -o "./output_http.so"
So it's definitely not an hardware problem.
The question now is: what caused the previous problem? and how do I solve it? with this method the stream starts but I should write a script to lunch it at every reboot
Edit 2:
Doing a
sudo service webcamd restart
service webcamd status
I get this output:
- webcamd.service - the OctoPi webcam daemon with the user specified config
Loaded: loaded (/etc/systemd/system/webcamd.service; enabled; vendor preset: enabled)
Active: activating (start) since Wed 2020-07-08 20:44:05 CEST; 505ms ago
Cntrl PID: 2102 (webcamd)
Tasks: 2 (limit: 2077)
Memory: 872.0K
CGroup: /system.slice/webcamd.service
|-2102 /bin/bash /root/bin/webcamd
`-2116 sleep 1
Jul 08 20:44:05 octopi webcamd[2102]: /dev/video0
Jul 08 20:44:05 octopi webcamd[2102]: /dev/video10
Jul 08 20:44:05 octopi webcamd[2102]: /dev/video11
Jul 08 20:44:05 octopi webcamd[2102]: /dev/video12
Jul 08 20:44:05 octopi webcamd[2102]: raspi
Jul 08 20:44:05 octopi webcamd[2102]: config file='/boot/octopi.txt':USB device was not set in options, start MJPG-strea
Jul 08 20:44:05 octopi root[2114]: Starting USB webcam
Jul 08 20:44:05 octopi webcamd[2102]: <13>Jul 8 20:44:05 root: Starting USB webcam
Jul 08 20:44:05 octopi webcamd[2102]: Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_uvc.so -r 64
Jul 08 20:44:05 octopi webcamd[2102]: /root/bin/webcamd: l< C3>< AD>nia 120: ./mjpg_streamer: El fitxer o directori no exi
Could my problem be related to the last line?
Edit 3:
I tried to set "raspi" (instead of "auto") in octopi.txt and now in journalctl -u webcamd
Jul 09 17:37:38 octopi webcamd[20528]: Starting up webcamDaemon...
Jul 09 17:37:38 octopi webcamd[20528]: --- Configuration: ----------------------------
Jul 09 17:37:38 octopi webcamd[20528]: cfg_file: /boot/octopi.txt
Jul 09 17:37:38 octopi webcamd[20528]: camera: raspi
Jul 09 17:37:38 octopi webcamd[20528]: usb options: -r 640x480 -f 10
Jul 09 17:37:38 octopi webcamd[20528]: raspi options: -fps 10
Jul 09 17:37:38 octopi webcamd[20528]: http options: -w ./www-octopi -n
Jul 09 17:37:38 octopi webcamd[20528]: Explicitly USB device:
Jul 09 17:37:38 octopi webcamd[20528]: -----------------------------------------------
Jul 09 17:37:38 octopi webcamd[20528]: Found video devices:
Jul 09 17:37:38 octopi webcamd[20528]: /dev/video0
Jul 09 17:37:38 octopi webcamd[20528]: /dev/video10
Jul 09 17:37:38 octopi webcamd[20528]: /dev/video11
Jul 09 17:37:38 octopi webcamd[20528]: /dev/video12
Jul 09 17:37:38 octopi webcamd[20528]: raspi
Jul 09 17:37:38 octopi webcamd[20528]: config file='/boot/octopi.txt':Start MJPG-streamer with video device: raspi
Jul 09 17:37:38 octopi root[20539]: Starting Raspberry Pi camera
Jul 09 17:37:38 octopi webcamd[20528]: <13>Jul 9 17:37:38 root: Starting Raspberry Pi camera
Jul 09 17:37:38 octopi webcamd[20528]: Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_raspicam.so
Jul 09 17:37:38 octopi webcamd[20528]: /root/bin/webcamd: lnia 120: ./mjpg_streamer: El fitxer o directori no ex
Jul 09 17:38:09 octopi webcamd[20528]: Done bring up all configured video device
Jul 09 17:38:09 octopi webcamd[20528]: Goodbye...
Jul 09 17:38:09 octopi systemd[1]: webcamd.service: Succeeded.
Jul 09 17:38:09 octopi systemd[1]: Started the OctoPi webcam daemon with the user specified config.
Jul 09 17:38:10 octopi systemd[1]: webcamd.service: Service RestartSec=100ms expired, scheduling restart.
Jul 09 17:38:10 octopi systemd[1]: webcamd.service: Scheduled restart job, restart counter is at 4.
Jul 09 17:38:10 octopi systemd[1]: Stopped the OctoPi webcam daemon with the user specified config.
Jul 09 17:27:49 octopi webcamd[19959]: /dev/video10
Jul 09 17:27:49 octopi webcamd[19959]: /dev/video11
Jul 09 17:27:49 octopi webcamd[19959]: /dev/video12
Jul 09 17:27:49 octopi webcamd[19959]: raspi
Jul 09 17:27:49 octopi webcamd[19959]: config file='/boot/octopi.txt':Start MJPG-streamer with video device: raspi
Jul 09 17:27:49 octopi root[19970]: Starting Raspberry Pi camera
Jul 09 17:27:49 octopi webcamd[19959]: <13>Jul 9 17:27:49 root: Starting Raspberry Pi camera
Jul 09 17:27:49 octopi webcamd[19959]: Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_raspicam.so
Jul 09 17:27:49 octopi webcamd[19959]: /root/bin/webcamd: lnia 120: ./mjpg_streamer: El fitxer o directori no ex
Jul 09 17:28:20 octopi webcamd[19959]: Done bring up all configured video device
Jul 09 17:28:20 octopi webcamd[19959]: Goodbye...
Jul 09 17:28:20 octopi systemd[1]: webcamd.service: Succeeded.
Jul 09 17:28:20 octopi systemd[1]: Started the OctoPi webcam daemon with the user specified config.
Jul 09 17:28:20 octopi systemd[1]: webcamd.service: Service RestartSec=100ms expired, scheduling restart.
Jul 09 17:28:20 octopi systemd[1]: webcamd.service: Scheduled restart job, restart counter is at 761.
Jul 09 17:28:20 octopi systemd[1]: Stopped the OctoPi webcam daemon with the user specified config.
Jul 09 17:28:20 octopi systemd[1]: Starting the OctoPi webcam daemon with the user specified config...
Jul 09 17:28:21 octopi webcamd[19983]: Starting up webcamDaemon...
Jul 09 17:28:21 octopi webcamd[19983]: --- Configuration: ----------------------------
Jul 09 17:28:21 octopi webcamd[19983]: cfg_file: /boot/octopi.txt
Jul 09 17:28:21 octopi webcamd[19983]: camera: raspi
Jul 09 17:28:21 octopi webcamd[19983]: usb options: -r 640x480 -f 10
Jul 09 17:28:21 octopi webcamd[19983]: raspi options: -fps 10
Jul 09 17:28:21 octopi webcamd[19983]: http options: -w ./www-octopi -n
Jul 09 17:28:21 octopi webcamd[19983]: Explicitly USB device:
Jul 09 17:28:21 octopi webcamd[19983]: -----------------------------------------------
Jul 09 17:28:21 octopi webcamd[19983]: Found video devices:
Jul 09 17:28:21 octopi webcamd[19983]: /dev/video0
Jul 09 17:28:21 octopi webcamd[19983]: /dev/video10
Jul 09 17:28:21 octopi webcamd[19983]: /dev/video11
Jul 09 17:28:21 octopi webcamd[19983]: /dev/video12
Jul 09 17:28:21 octopi webcamd[19983]: raspi
Jul 09 17:28:21 octopi webcamd[19983]: config file='/boot/octopi.txt':Start MJPG-streamer with video device: raspi
Jul 09 17:28:21 octopi root[19995]: Starting Raspberry Pi camera
Jul 09 17:28:21 octopi webcamd[19983]: <13>Jul 9 17:28:21 root: Starting Raspberry Pi camera
Jul 09 17:28:21 octopi webcamd[19983]: Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_raspicam.so
Jul 09 17:28:21 octopi webcamd[19983]: /root/bin/webcamd: lnia 120: ./mjpg_streamer: El fitxer o directori no ex
Jul 09 17:28:52 octopi webcamd[19983]: Done bring up all configured video device
Jul 09 17:28:52 octopi webcamd[19983]: Goodbye...
Jul 09 17:28:52 octopi systemd[1]: webcamd.service: Succeeded.
Jul 09 17:28:52 octopi systemd[1]: Started the OctoPi webcam daemon with the user specified config.
Jul 09 17:28:52 octopi systemd[1]: webcamd.service: Service RestartSec=100ms expired, scheduling restart.
Jul 09 17:28:52 octopi systemd[1]: webcamd.service: Scheduled restart job, restart counter is at 762.
Jul 09 17:28:52 octopi systemd[1]: Stopped the OctoPi webcam daemon with the user specified config.
Jul 09 17:28:52 octopi systemd[1]: Starting the OctoPi webcam daemon with the user specified config...
Jul 09 17:28:52 octopi webcamd[20007]: Starting up webcamDaemon...
Jul 09 17:28:52 octopi webcamd[20007]: --- Configuration: ----------------------------
Jul 09 17:28:52 octopi webcamd[20007]: cfg_file: /boot/octopi.txt
Jul 09 17:28:52 octopi webcamd[20007]: camera: raspi
it seems to have been trying to start the webcamDaemon all day..