guysoft / OctoPi

Scripts to build OctoPi, a Raspberry PI distro for controlling 3D printers over the web
GNU General Public License v3.0
2.45k stars 366 forks source link

Stream from Raspberry Cam stopped working #798

Open eli-l opened 1 year ago

eli-l commented 1 year ago

The issue: stream from Raspi Cam v1.3 became unavailable after a casual boot up.

There was an issue with /root/bin/webcamd script because of the output of vcgencmd get_camera has been changed from expected supported=1 detected=1 to supported=1 detected=1, libcamera interfaces=0

Solution: Replace /root/bin/webcamd:219-:220 with raspi_cam=$(vcgencmd get_camera | sed 's/,.*//' | tr -d \\n) if [ "$raspi_cam" == "supported=1 detected=1" ]; then

It uses sed and tr to trim all the obsolete information, as I assume supported and detected are still fully enough to run the stream. Unluckily I was not patient enough to continue searching for the source code of /root/bin/webcamd for opening a pull request, nevertheless I am fine to do so if someone knows where it is stored.

cp2004 commented 1 year ago

This should already be fixed in the nightly builds after I put in #790. If you could test either the Release Candidate or nightly builds that would be wonderful.

With the Raspberry Pi cameras, they also still work with the v4l2/uvc mode, so using usb or auto mode should allow the stream to continue working.

eli-l commented 1 year ago

Unluckily I have spotted this in my production environment, thought it might be quite specific and instead of checking issues spent a while to debug and fix it on my own, I might deploy an RC the other day, though and check my h/w setup. BTW thanks for OctoPi, it's great!

Upd: I actually took PR you have mentioned and edited the script directly - it works as expected with regex. Hopefully release is somewhere behind the corner.

guysoft commented 1 year ago

Hey, just saw this now - is there anything else left to fix?

andycarver101 commented 7 months ago

update your instance sudo apt update sudo apt upgrade

guysoft commented 7 months ago

Closing if no reply form OP