-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feedback for the latest camera-streamer based webcam stack builds (builds 2023.07.20.144556, 2023.10.09.154319) #9
Comments
Just out of curiosity (while I download and install the new image), I thought there was a package being created for camera-streamer that could be installed/updated with apt so that libcamera updates didn't require a new image. What happened to that project? |
There is. This new image was needed because there was an issue in the basic image I built two days ago. The update-able package is alive and well (and used here), but since this is the first image to ship with the 0.2.5 version out of the box, I figured this merits a new feedback ticket. |
Hi Gina, Thanks for the blazing fast response. I have good and possibly bad news.
All I did was change ports of libcamera and usb camera to 8081 and 8082 respectively and rebooted. Journal shows no errors and services listening in respective ports. However, netstat shows the following which explains why i cannot connect from another computer but only from rpi itself.
Snippets from journal below:
I will keep looking around to see if I missed something .... Danke, |
I modified the systemd configuration file to add '--http-listen=0.0.0.0 ' and restarted the service. Cameras are now accessible from other computers since service bound to all interfaces. Not sure if this is the proper fix but I'm now unblocked. :D Thanks, |
I put a heads-up into the changes list up in the very first post for that exact reason ;) |
LOL. RTFM for me then! :D Impatience got the "best" of me. All seems to be working fine. Will keep testing and report if I came across anything else. I doubt it but you never know. Thanks, |
Sems like the camera-streamer is missing in my case. |
Danke Gina for the very swift update. The update works for me on my RPi4B with Camera Module 3 noIR |
All the versions never worked for me with a Raspberry Pi Zero 2 W but I just tried same backup with a Pi 4B+ and it worked |
Can I update my way out of the this or do I have to reinstall octopi from the beginning?
|
A new camera-streamer-raspi package should be available, try installing that. Side note, hard pinning the libcamera0 version like this is sadly necessary as libcamera0 (currently?) happily changes its ABI on version updates, pulling the rug from underneath camera-streamer's feet and making a recompilation of the latter necessary to still work. It just has happened again with this update. |
Define "never worked". As it is, that comment sadly is utterly unhelpful. |
I don't see it: prusamk3mmu ~ # apt update
Hit:1 https://apt.octoprint.org/debian bullseye InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Hit:3 http://archive.raspberrypi.org/debian bullseye InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
prusamk3mmu ~ # apt remove camera-streamer*
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'camera-streamer' for glob 'camera-streamer*'
Note, selecting 'camera-streamer-raspi' for glob 'camera-streamer*'
Note, selecting 'camera-streamer-stack' for glob 'camera-streamer*'
Package 'camera-streamer-raspi' is not installed, so not removed
Package 'camera-streamer-stack' is not installed, so not removed
Package 'camera-streamer' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
prusamk3mmu ~ # apt install camera-streamer-raspi
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
camera-streamer-raspi : Depends: libcamera0 (= 0~git20230707+2783c8d8-1) but 0~git20230720+bde9b04f-1 is to be installed
E: Unable to correct problems, you have held broken packages. |
Ooooh, libcamera apparently pulled the rug from beneath our feet YET AGAIN. FFS... on it. |
New camera-streamer-raspi package now built and pushed, and also another day spent on improving automating things so that stuff like this in the future happens semi-automatically (final PR for package addition ton the repo needs to be merged manually) on every libcamera0 update detected on the RPi repo. |
Thank you very much for your effort! |
sorry I forgot to say that the camera stream never loaded on the PiZero2W, I had a lot of random reboot too When using libcamera-hello, there was an error about the ressource already used |
I test against RPi3b, which is pretty much the same CPU, albeit in a different form factor. Not sure what you are running into there, everything green over here and I can also see at least 81 instances on an RPiZero2 running one of the images with the new camera build in the anonymous usage tracking data. Random reboot sounds like insufficient power or some other hardware issue. |
Hi, libcamera --list-cams
system log
libcamera-hello
But the Camera works with stable Octopi release. Any hints? |
I noticed a small problem with camera-streamer. But when I boot up and not open the web interface for some time (it's reproduceable 100% of the time when I wait at least 60min.) and then load the web interface, I don't get any stream from camera-streamer. "systemctl status camera-streamer" reports the service as active. Logs: https://paste.octoprint.org/OYXd3AsGW5 (The entries after "Jul 28 23:56:32" are the ones when it fails) This also happened before the recent libcamera0 & camera-streamer-raspi updates. Restarting the camera-streamer service fixes the problem. ("systemctl restart camera-streamer") |
@sarusani since that looks like it's rather an internal issue with camera-streamer than something related to the image including it, could you please report this on the camera-streamer repo? |
Sure, I'll do. 👍 |
Perhaps it's related to my issue at ayufan/camera-streamer#88? |
did you consider switching to the actual video stream? |
That's the whole point of this new stack. It's no longer using the MJPEG stream (only as a fallback). It's using the way more efficient WebRTC stream. 😃 (You can look at WebRTC as a browser friendly way to transport the h264) |
This image doesn't view the h264 stream out of the box, it will still use the mjpg stream. I created https://github.com/cp2004/OctoPrint-CameraStreamer-Control to view those streams. It's incomplete, but it works and has a reasonable number of users despite not being published yet... |
Edit 08/25 I just ran an Everything working?
Pi model used cameras in case of issues: related logs |
Everything working? Pi model used cameras in case of issues: related logs I tried : libcamera-hello --list-cameras Next, new fresh install with OctoPi 1.0.0 with OctoPrint 1.8.6 instead of the last one (1.9.2) I tried many releases, to resume which one is working with my raspi camera V3: |
Why two versions 1.0.0/1.9.2 ? The one labeled latest (854 on 18 jul) is not working for me, the other one (556) on 20 jul is working |
The first is the OctoPi version (operating system on the Raspberry Pi) and the second is the OctoPrint version (Python application that can be installed on many different operating systems). The number at the end is the date and time the image was created. The first post contains the release notes which document the changes made in the "...556" version and as you have discovered, one of those changes directly affects you. |
Thank you ! Now I understand why I lost a lot of time :-) |
Everything working? Pi model Used Camera Connecting the camera and using the provided image in the thread worked with the camera (feed shows up on the dashboard) but it was not able to autofocus. Checking the logs and testing with In the end, I managed to work around it by doing the following:
Hope this helps whoever else that may be having errors with autofocus Arducams!
@MrUpStry This might help you as the error message I got when debugging with that camera-streamer was missing as well. |
Howdy, I installed the New Camera Stack image yesterday and my camera was autodetected and working pretty much out of the box. The power surged today during a storm, and since then I get a "webcam is not configured" error only through the UI. Obico still sees the stream, and I can view the stream directly at /webcam/?action=stream. Everything working? Pi Model Used Camera Troubleshooting Outputs/Configs journalctl -u camera-streamer\* | pb
https://paste.octoprint.org/<!doctype html>
<html lang=en>
<title>413 Request Entity Too Large</title>
<h1>Request Entity Too Large</h1>
<p>The data value transmitted exceeds the capacity limit.</p> However journalctl -u camera-streamer doesn't show any issues, restarting the camera-streamer service has no effect Sep 22 12:53:53 3dprint systemd[1]: Starting camera-streamer...
Sep 22 12:53:53 3dprint camera-streamer-control[545]: Running start for camera-streamer-libcamera.service...
Sep 22 12:53:53 3dprint camera-streamer-control[545]: ... done.
Sep 22 12:53:53 3dprint camera-streamer-control[545]: Adding path unit for autolaunch of camera-streamer-usb@default
Sep 22 12:53:54 3dprint camera-streamer-control[545]: Running start for camera-streamer-usb-default.path...
Sep 22 12:53:55 3dprint camera-streamer-control[545]: ... done.
Sep 22 12:53:55 3dprint systemd[1]: Finished camera-streamer.
Sep 22 13:10:30 3dprint systemd[1]: Stopping camera-streamer...
Sep 22 13:10:30 3dprint camera-streamer-control[1482]: Running stop for camera-streamer-libcamera.service...
libcamera-hello --list shows the camera libcamera-hello --list
Available cameras
-----------------
0 : imx708 [4608x2592] (/base/soc/i2c0mux/i2c@1/imx708@1a)
Modes: 'SBGGR10_CSI2P' : 1536x864 [30.00 fps - (0, 0)/0x0 crop]
2304x1296 [30.00 fps - (0, 0)/0x0 crop]
4608x2592 [30.00 fps - (0, 0)/0x0 crop] Here is the libcamera.conf file, I tried differed width/height resolutions, changing fps, and adding the --camera-nbufs=3 based on a previous issue on this thread. I also tried adding a dtoverlay=imx708 to the config.txt file to no avail. PORT=8080
WIDTH=1920
HEIGHT=1080
# The height to use for the video stream. Defaults to 720.
VIDEO_HEIGHT=720
# The height to use for the snapshots. Defaults to 1080.
SNAPSHOT_HEIGHT=1080
# The framerate to set on the camera. Defaults to 15fps.
FRAMERATE=15
# Additional options. By default enables continuous auto focus (if possible).
OPTIONS='--camera-options="AfMode=2" --camera-options="AfRange=2" --camera-nbufs=3'
I'm trying to think of what else could be useful... I disabled obico to see if that was an issue, no dice there. I didn't see anything relevant in the octoprint logs. I'm at a loss, not sure why the stream isn't being picked up when it's clearly there when I use the IP address. Perhaps it's something obvious I'm missing but I'm a few hours in to troubleshooting and not sure what else to try. Thanks for any help! When the Rpi cam 3 was working it was fantastic, night and day better than the usb webcam I had been using. Edit - really not sure what's happening now but the webcam is working again. Somehow it's working through the classic webcam plugin which I thought the point of the new camera stack was that it didn't work through the classic camera mode? Perhaps I misinterpreted that. I tried disabling/clearing the data on any camera related apps but my system kept re-enabling the plugins each time I rebooted the system so it was impossible to get it back to a "neutral" plugin-less state. I suspect that some of the plugins are conflicting with each other which doesn't surprise me if they're not actually being disabled/uninstalled properly. |
FYI, for now I've considered the crashes with "stale stream" in the log that many of you have observed a blocker for the general roll-out of this stack. Upstream ticket is here: ayufan/camera-streamer#94, we'll have to wait for action there. |
Please, please find a way to identify the camera-streamer version as OctoPi 1.0.1 (or something) because people keep posting that they are running OctoPi 1.0.0 without adding the build identifier and it requires another back and forth exchange to figure out how to help them. |
I cannot in good conscience change the version number as that would interfere with potential versioning of the base image and cause even a more ton of confusion considering the other image without the new cam stack. What I can do is put a suffix "cam" on the version identifier in the web interface (e.g. "OctoPi* 1.0.0cam (build 2023.10.09.154319)") and also make sure the bundle viewer makes it more visible. |
The new camera-streamer based camera stack will now get a "cam" suffix on the version in the footer. The information which camera stack was found is also now included in the system info bundle for the bundleviewer to utilize. As requested in OctoPrint/OctoPi-UpToDate#9
I believe this is an acceptable solution, thanks! |
And it's already rolling out. |
Does this mean it is possible to install the camera streamer on a different machine to OctoPrint? Should be possible as the interface seems to be entirely through URL. Could I, for example, install the streamer and camera on an up-to-date Pi OS 64-bit and run the standard Docker Image of OctoPrint on top of this? If this would work, would it be possible to add some documentation for this scenario (which would be the same as running the two components on different hardware platforms). |
You can install camera-streamer on a variety of platforms, wherever you like. The 'camera stack' that the OctoPi image comes with (the control scripts and using You can use the docker version of OctoPrint (not OctoPi, this is specifically an OS image) and install camera-streamer yourself, or try and trace the steps used in the OctoPi image if you wanted an exact clone, using the scripts & apt.octoprint.org binaries. |
Made some corrections. So 'camera-streamer-raspi' is the OctoPi 'camera stack' maintained by the OctoPrint project? I guess this will only work on Bullseye, so I cannot use it to update Buster based OctoPi or OctoPrint Docker images to work with Camera Module 3? |
Buster based images are too old to support the Pi Cam V3 (and camera-streamer), Bullseye is the minimum. |
Everything working? Pi model used cameras My first problem was with the wifi setup. On my first attempt I couldn't manage to connect my Pi to my Wifi. Connection via ethernet worked but I didn't want to run an extra cable to the pi. I also found that my wifi infromation from Raspberry Pi Imager was nowhere to be seen in I can't really say how all this happened. I eventually found some info that setting the wifi country in raspi-config can cause such problems and I definitively set the wifi country in raspi-config on my first unsuccessful attempt to set up wifi. But after re-flashing the SD again with the correct wifi password I can't recollect doing that. My second headache was getting the camera to work. It was properly listed in lsusb but i constantly got a 'server error' when trying to access it. I can't fully recollec what I did but I remember chasing after that remark to set '--http-listen=0.0.0.0' as well but that didn't help either. At least in my currently working configuration I can't find that option anymore. But now everything works so far and I'm happy with the new camera-streamer stack for OctoPrint. |
@ryantang30 - Hello! Thanks for your post about autofocus on the Arducam IMX-519; I have been wondering about that feature. I followed your instructions and can see the camera feed in OctoPrint, but I get errors with libcamera-still: "Unable to set controls: Device or resource busy" and "Pipeline handler in use by another process." Do you have any idea what's wrong? |
Sound like the streamer is still running, the camera can't be used by more than one process. So you have to stop the streamer before you can use libcamera-still. |
@cp2004 - That makes sense. Thanks! Dumb question: How do I stop the streamer? |
|
Thank you, @jneilliii |
Just one stupid question: the Raspberry Pi Cam v1 & v2 should still be supported by this stack, isn't it? |
@ascheucher |
Thanks. Did a reinstall on two RPis (4&3b) with v1 clone cameras. They both can’t detect the cam anymore. Worked for years before with the classic cam stack. Also tried to switch to shorter ribbon cables and another original v1 cam. On one I applied a backup from octopi 0.17 /octoprint 1.9.3. then it detected the camera with libcamera-hello —list-cameras, but didn’t start the streamer. I assumed the applied backup destroyed something. Hence, I deleted the SD and tried with a newly flashed cam stack version, but then it didn’t detect the cam anymore at all. As only the v3 is mentioned in all the posts, blog posts and questions, I started to question the support of older cams Running out of ideas. |
I noticed that camera-streamer doesn't stop streaming the video when I close chrome or the chrome tab, but it stops properly if I change tabs within OctoPrint. How to reproduce:
I assume that whatever code is run between switching the OctoPrint tabs should also been executed on "visibilitychange". Not sure if that's something in OctoPrint or if I should report this on the Camera Streamer Control plugin... Edit: |
FYI, the key used for signing the packages on I've already published the new public key that can validate both the old soon-to-expire signing key and the new one that won't expire until 2034, and you can re-import it on the command line like this:
That's also documented on https://apt.octoprint.org and in #14. For now you'll still be able to |
This is a ticket to collect feedback on the latest build of the new camera stack (some background on that here) for OctoPi-UpToDate.
Currently, that is 2023.10.09.154319. Find the image here: https://github.com/OctoPrint/OctoPi-UpToDate/releases/tag/1.0.0-1.9.3-20231009154319
Config docs are available here: https://faq.octoprint.org/camera-streamer-config
The source tree used for the build is here: https://github.com/OctoPrint/OctoPi-UpToDate/tree/camera-streamer
Changelog
Changes in build 2023.10.09.154319 from 2023-10-09
Changes in build 2023.07.20.144556 from 2023-07-20
--http-listen
to define which network interfaces to listen on, and by default only listens on localhost. If you have cameras configured that are currently not behind haproxy on the same device, you'll need to add--http-listen=0.0.0.0
to theOPTIONS
of your camera config. The docs have been updated accordingly.Please provide feedback on your experience with this image in this ticket, whether things work for you or not. Make sure to at least include the following:
journalctl -u camera-streamer\* | pb
and share the generated paste.octoprint.org URL)Known issues:
Common pitfalls:
The text was updated successfully, but these errors were encountered: