OctoPrint / OctoPi-UpToDate

Latest OctoPi image with OctoPrint already updated to the latest release
GNU General Public License v3.0
58 stars 7 forks source link

Feedback for the latest camera-streamer based webcam stack builds (builds 2023.07.20.144556, 2023.10.09.154319) #9

Open foosel opened 1 year ago

foosel commented 1 year ago

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


Please note

This image needs to be flashed to your SD card, wiping it in the process. So if you want to keep anything on there, make a backup first! You can also create an OctoPrint backup, download that, flash, restore from backup. There's no way to update to the contents of this image without a full reflash.

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:

Known issues:

Common pitfalls:

apphd78 commented 6 months ago

@cp2004 - That makes sense. Thanks! Dumb question: How do I stop the streamer?

jneilliii commented 6 months ago

sudo service camera-streamer stop

apphd78 commented 6 months ago

Thank you, @jneilliii

ascheucher commented 6 months ago

Just one stupid question: the Raspberry Pi Cam v1 & v2 should still be supported by this stack, isn't it?

sarusani commented 6 months ago

@ascheucher Yes. I'm currently using a v2 and it works fine.

ascheucher commented 6 months ago

@ascheucher Yes. I'm currently using a v2 and it works fine.

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.

sarusani commented 6 months ago

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: check CPU usage with top

  1. switch from control tab to any other tab that isn't showing the cam (ex. temp) -> camera-streamer CPU usage falls bellow 1%
  2. switch back to control tab -> camer-streamer usage goes back up (depending on the settings, usually somewhere between 5% - 20%)
  3. close chrome tab or browser -> camera-streamer CPU usage stays up. Only way to bring it down is to restart the camera-streamer service.

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: I figured it out. It's a problem with the plugin. It's using a 5 seconds timeout before it stops the stream. So if the tab/browser is closed it's never executed.

foosel commented 4 months ago

FYI, the key used for signing the packages on apt.octoprint.org will expire on Friday. I've spent some time the past months trying to figure out a way to create a new signing sub key that will be recognized by apt with the current public key for apt.octoprint.org, but sadly there seems to be no way apart from re-importing the new public key.

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:

curl -s --compressed "https://apt.octoprint.org/octoprint.gpg.key" | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/octoprint.gpg > /dev/null
sudo apt update

That's also documented on https://apt.octoprint.org and in #14.

For now you'll still be able to apt update and apt install from apt.octoprint.org without this, but I'll rotate the signing key on Thursday and from then on you'll get an error when apt reads the packages list off apt.octoprint.org unless the above steps have been done.

WarrenSchultz commented 1 month ago

Poking around with the new camera stack build, after checking out camera-streamer independently. This is a brand new OctoPi instance I'm setting up, and looking back through this thread as much as possible, if I understand correctly, you've got a separate package for raspi-camera-streamer that manages this package for OctoPrint (?). I tried pulling down the latest version of camera-streamer (2.8) and ran into held packages issues from apt, which tells me you did this on purpose to prevent people like me from breaking things :)

Is it possible to update the package to match the source repo? Thanks!

JohnHind commented 1 month ago

This is a brand new OctoPi instance I'm setting up

Is there some reason you do not want to use the OctoPi from Raspberry Pi Imager? In my case, I prefer to use the OctoPrint Docker Container and I have been trying to find another Docker Container containing a compatible camera streamer which I really expected would exist entirely independently of OctoPrint as this must surely be a common use case for all sorts of applications. All the leads I've followed up seem to work only with USB Webcams or only with the old Raspberry Pi Camera Module 2. I am wondering if you are trying to make such a thing using the OctoPi package? Not sure why this is being added to the @foosel workload as it seems more like a job for the wider Raspberry Pi community!

cp2004 commented 1 month ago

I don't think docker comes into the picture at all here. As I understand the comment, it is asking if the camera-streamer and camera-streamer-raspi packages that come with the OctoPi image, from https://apt.octoprint.org, could be updated to match the latest source of https://github.com/ayufan/camera-streamer.

JohnHind commented 1 month ago

I don't think docker comes into the picture at all here. As I understand the comment, it is asking if the camera-streamer and camera-streamer-raspi packages that come with the OctoPi image, from https://apt.octoprint.org, could be updated to match the latest source of https://github.com/ayufan/camera-streamer.

Yes, but these packages come already installed in the OctoPi image. If Warren wants to install the streamer separately, presumably he is trying to do something else and it would be useful (or at least interesting) to know what.

WarrenSchultz commented 1 month ago

Sorry I wasn't clear. I am working from the Imager build, but as cp2004 said, I'd like to have the octoprint apt repository updated to match the upstream.

Thanks!

JohnHind commented 1 month ago

Sorry I wasn't clear. I am working from the Imager build, but as cp2004 said, I'd like to have the octoprint apt repository updated to match the upstream.

OK, I guess the question is still why? Given the journey this has been on, presumably the version in the OctoPi image now works with OctoPrint and are we sure the upstream does, or will continue to? I'm kind of hoping that if the upstream, presumably more generic, version has accepted all pushes from @foosel perhaps I (or someone more patient and smart than me) can package it in a Docker Container as a service to the wider Pi community?

cp2004 commented 1 month ago

Bugs are fixed, features adjusted and new things added. Yes you can't be sure it works, but that's what testing is for. The new camera stack is not claimed to be "stable", and we do know of a few bugs.

Camera-streamer now publishes compiled binaries as part of the releases over there. So it should be relatively easy to install that in a docker container. Don't try and use this repository- start at the source for camera streamer and use that. The "new stack" OctoPi image uses exactly the same streamer, the only things that are done here are the auto start scripts and the like.