-
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 build (20230328122604) #3
Comments
RPi 4B with camera module V3 (no printer). Image booted without incident. OctoPrint backup said it was for a new image so I created a new backup on my RPi 3B (with OctoPi 0.18.0, OctoPrint 1.8.7, camera module V2.1, and LulzBot TAZ 6). New OctoPrint backup installed and camera is working. |
Everything seems to work (including the PiCam V3) except for one very important thing: OctoDash not working despite working fine before the update. Error message on screen (official 7"): "error: XDG_RUNTIME_DIR not set in the environment". Anyone know how to fix this? RPi 4B 8gb |
Everything working on my end (RPi Zero W / v3 Camera). Thank you so much for your amazing work on this and everything else, @foosel! |
You were already on 1.9.0rc3 I take it? In that case, yeah, backup restoration is stopped because things might have changed between 1.8.x and 1.9.x. I think I should maybe allow a manual override here if the user thinks that's a good idea (here it would have worked). Going to add a TODO for that to OctoPrint proper ;) |
Can't say that I have any idea what could be going on here. BUT, this image includes a newer kernel (latest from |
This issue has been mentioned on OctoPrint Community Forum. There might be relevant details there: https://community.octoprint.org/t/setting-up-multiple-webcams-in-octopi-the-right-way/32669/172 |
Anyway to setup multiple cameras on this new stack? I was told the guide above wouldn't apply to this new firmware. I'm not able to access port 8081 on the new firmware using that guide. |
The documentation for the new camera stack linked above has a section at the end for setting up multiple cameras. |
Thanks so much. That was so much easier than the previous method. |
I've got a Pi3+ and I'm working with the v3 camera module, everything seems to be working great. The options I've tried (resolution and framerate) seem to be working as intended. Thanks again @foosel for your hard work. I'm chasing one issue with Octolapse (timelapse only stable with a larger delay >1000ms) but everything with the actual build is great. |
What would be the syntax for AF off and focal point (LensPosition) at the middle range? I'm assuming lens position is from 0 to 32 so middle would be 16. AF on my machine is not really usable since it seems to try to focus constantly due to vibration.
|
You can definitely turn off autofocus by using
The closest explanation I could find of the values was the Raspberry Pi documentation - which doesn't use the same values. It does list some AF modes, but with no numbers attached. Source. I believe it is:
I then played around with LensPosition in the same way as autofocus, eg.
and could set the different values between 0 and 32 and it changed the focal point a lot. Focus scales aren't really linear, so you might not need 16, so I suspect trial and error might help. Alternatively, use AFMode=1 to autofocus once. |
Thanks. This is really helpful. edit: got it focused nicely with lensposition 6 but this thing is a jittery mess when anything is moving (like the printer). I don't think this cam will work for this application. Is there anyone who's having a good experience with these? |
Ideally, I guess this page should be reworked to describe the debugging procedure for camera-streamer. I'll see if I can get a PR together to update the page: Edit: PR #4 |
Everything working? Pi model: Camera: in case of issues: related logs (journalctl -u camera-streamer* | pb and share the generated paste.octoprint.org URL) |
I've been running some tests today, and here are the things I have observed: Everything working: The camera streamer is working as expected I had a minor issue that isn't a big deal, but I figure I'd mention it: my settings backup failed to restore because it was from a 'newer version of OctoPrint'. I know it's due to the version numbering of this pre-release, and that's fine, but in case some people are surprised. However, I did discover a change of behavior between mjpg-streamer and camera-streamer that I thought you all should be aware of: the /snapshot endpoint is delivering a frame from the past, and not the 'next' frame, like mjpg-streamer used to do. This issue seems to affect the raspicam much more than a usb camera (I need to do more testing on the raspi camera, which is why I didn't mention it in the 'used cameras' yet), but it is definitely noticeable when using my C920. Here I will only discuss the USB camera behavior I have tested enough to understand (I think). This was discovered (of course) while testing Octolapse. There is a default delay of 125MS added before requesting a snapshot from the endpoint, and this is no longer enough to get a stable timelapse. This number used to be quite conservative (I typically use delays of < 50MS for my own timelapses, and sometimes much lower). The FPS plays a key role, apparently, in determining how much delay needs to be added. At 15FPS, you get a frame every 66.67MS approx. That means we can be only 1 frame behind for the default 125MS delay to work (66 .67 * 2 = 133.34MS = No bueno). At 30FPS (up from the default of 15), the default delay appears to be sufficient (more testing needed on my part to verify), but only just so. Increasing the default delay will increase oozing and artifacts, unfortunately, so I'd really like to keep it to a minimum. I have added an issue to the camera-streamer repo (feature request, linked above) for an endpoint that is capable of returning the next available frame, and asked if there are any workarounds or alternatives. I took a look at the code, and it would definitely take me quite a bit of time to understand, so hopefully if this feature request is denied, I can at least get some pointers/info so that I can fork and PR. If not, setting the default FPS to 30 (no problem for my RPI 3b) would help quite a bit, though I know that would be problematic. If you feel this comment is polluting the intent of this thread, please feel free to remove it as it isn't exactly a problem for OctoPrint. I will report my findings with the raspicam v2 ASAP. |
It could be related to this being based on OctoPi 1.0, which in turn is now based on a newer Debian version (Bullseye instead of Buster). Which raises the question, much more difficult compared to what?
Absolutely not, that is valuable feedback! :) Also glad to have you back! |
Took me long enough, lol! FYI, there has been some movement on my feature request. I'm always blown away by the open source community. This new webcam stack will be a huge upgrade! |
@foosel Sorry I didn't clarify in my original post. I have been using the 1.0.0-1.8.6-20230222114422 which seemed to be extremely stable for me. I have tested this again on a separate memory card and installing this version and getting it working with HyperPixel and OctoDash was as simple as using the one-line installers for both the screen and OctoDash. I never updated to the stable release. When I installed OctoPi 1.0.0 with OctoPrint 1.8.7-20230328122604 I just found that using the one line installers for both the HyperPixel screen and OctoDash would not work the first time and I had to manually install OctoDash to get it working. I also know that some of the issues could be inexperience on my part but going back to the previous pre-release image, the installation and configuring of the screen and plugin was seamless and quick. |
I guess it could be the difference in kernel versions? If I'm remembering right this image coincided with a kernel upgrade that might have impacted it. |
Could be. There seem to be some kernel shenanigans in general these days, just learned the other day that the firmware updater will now push 64bit kernels on 32bit userspace systems: raspberrypi/linux#5402 🤡 See also this discussion on the OctoDash repo: UnchartedBull/OctoDash#3559 That will need to be addressed for OctoPi-UpToDate in general, even outside of this current camera stack work. Speaking of which... I'm holding back on this currently because of the known issue/regression with vflip/hflip no longer working under current libcamera versions, see known issues above. And the discoveries by @FormerLurker regarding snapshot behaviour also gave me pause, so I'd like to see where this is going first as well. So I guess my original goal of "get this finalized within or very much right after Q1" is out of the window now. Will still see that I get a new build posted with a pin of the 32bit kernel, next week most likely, and it would then be lovely if you could give this a test in your setup @Ruhel786 |
Hi @foosel. I'm on my phone so the GitHub layout is a bit weird. I'm happy to try the versions on my setup. Can you just clarify which one/s you want me to try? Ill be doing the 1.9.0 RC4 this weekend and have a few memory cards so can try a few more. |
@Ruhel786 Nothing to try yet. What I meant was, I'll create a new build of the OctoPi image with camera-streamer stack and current stable OctoPrint (1.8.7) some time next week, that will then make sure the kernel is pinned to 32bit, and then you can check if things are still more difficult or not with regards to OctoDash and Hyperpixel things. |
Ok. I'll keep an eye out for it. I might have another go with this current version and screenshot the errors in case they are relevant to you. |
FYI, I'm installing development build of camera-streamer in preparation for testing. See this issue. |
Installed the new version and tested with a short print @30fps with my USB camera, and it works BEAUTIFULLY! In fact, it's a huge upgrade over the old streamer, shaving off between 100-200MS (I need to re-test with the old streamer to verify the FPS setting I used, which plays a big role) for snapshot acquisition time, and another 125MS by setting the camera delay to 0MS. This should provide a substantial quality boost by eliminating at least 225MS of oozing per frame (maybe up to 325MS!). This is the single biggest per/snapshot performance boost for Octolapse ever, I believe. If not, it's pretty close. I have yet to test the pi camera. Note: the snapshot url needs to change for this test to be valid:
Also be sure to verify the index page of the streamer ( |
Had another go last night and after actually reading the changes that have been made it made sense about the error with OctoDash. |
@Ruhel786 the issue with >1000ms delay for Pi Cam v3 is fixed in the current develop branch of camera streamer. I've had great results so far. |
Did you do a full OctoPi install? Thank you |
Using this RC, yes. OctoPi-UpToDate, 20230328122604. The other changes are documented on the camera-streamer discussion ayufan/camera-streamer/issues/53. I've also added an issue in Octolapse to document logs and other testing FormerLurker/Octolapse/issues/895. |
Using the HQ Cam (IMX477R) on a Pi3 B+ (didn't work with the old mjpeg and high resolutions). |
This issue has been mentioned on OctoPrint Community Forum. There might be relevant details there: https://community.octoprint.org/t/webcam-repeatedly-fails-every-3-minutes/51415/3 |
This issue has been mentioned on OctoPrint Community Forum. There might be relevant details there: https://community.octoprint.org/t/add-support-for-raspberry-pi-camera-v3/49052/9 |
This issue has been mentioned on OctoPrint Community Forum. There might be relevant details there: https://community.octoprint.org/t/new-pi-v2-camera-on-pi-4b-not-working/51456/3 |
After struggling with the official build - this one finally solved the camera issues. Worked great out of the box. Raspberry Pi 4B When will this get into the mainline? |
Did you only install this image and nothing else? I have the same setup as you and cant get the camera to work on this image. Had to go back to a previous build. |
All we did was a flash of this image and it just worked. We didn't restore from backup because we never finished the old install - so maybe that's difference. |
This issue has been mentioned on OctoPrint Community Forum. There might be relevant details there: https://community.octoprint.org/t/raspberry-pi-camera-3-problem/51570/2 |
RPi Zero 2 W with Raspberry Pi Camera Module 3 (Prusa MK3S Printer). Image booted and ran initial setup script as expected.. Camera came online without any additional configuration. I also have a Logitech C270 connected to the USB port which was working on the current release build. I will be attempting to set that up as a second camera next. |
I successfully added the USB camera following these steps: https://community.octoprint.org/t/camera-streamer-configuration-on-octopi-1-0-0/49950 I will be checking timelaps configurations tomorrow. Thanks to everyone who contributed and made this all work so nicely! |
After some upstream bug fixing on the part of @ayufan (THANKS!) I've prepared an updated test image. It includes a new build of |
I tried setting up octodash with the "new camera stack 1.9.0" raspberry sd image on a pi 3B+ I have the official 7" display connected with just the ribbon cable and power. octodash installed fine, but when it booted, the touch screen didn't work. as far as I could tell the touch controller was not being detected. I looked in the config.txt on the boot partition, and uncommented the 2x i2c config lines to enable those ports since I think the touchscreen is attached there?
with that change the touchscreen started working. So possibly octodash setup script needs to enable the i2c port for the touchscreen controller, or the setup should include a note about doing it manually. |
👉 Latest image & feedback ticket can be found here 👈
This is a ticket to collect feedback on the latest build of the new camera stack (some background on that here) for OctoPi-UpToDate, 20230328122604.
Find the image here: https://github.com/OctoPrint/OctoPi-UpToDate/releases/tag/1.0.0-1.8.7-20230328122604Changes compared to the previous version:
deb
and then published on https://apt.octoprint.org. The image build now installs from that apt repo and thus makes it possible to updatecamera-streamer
to a later version as necessary, e.g. for bug fixes or if new backwards incompatible libcamera versions are being released.-
to--
accordinglyraspberrypi-kernel
package(Compare view)
Some first 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
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:
--camera-{v,h}flip
are currently broken incamera-streamer
v0.1-16-gcdb62ef (cdb62ef), see--camera-{v,h}flip
throw an error now when they used to work with the same camera ayufan/camera-streamer#51Common pitfalls:
The text was updated successfully, but these errors were encountered: