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

Camera Video stops after some period of time, full frame or partial frame #11

Open John-RB opened 10 months ago

John-RB commented 10 months ago

What OctoPi-UpToDate modification is involved?

01-update-octoprint

The problem

While video stream is running, it stops after some period of time either with a full frame or a partial frame. Sometimes refreshing the browser page will get it started again. Browser is Firefox 117.0 (64-bit).

I initially had this problem with a Pi Zero 2 W and a Pi camera 3. Tried a Pi camera 3 wide and same issue. Switched to a Pi 3B with both cameras and same issue. Tried 2 different power supplies and same issue. Tried with an older Pi camera and it took a lot longer to have the video freeze but it did finally fail.

I am now running the Pi 3b with old camera stream and a Pi camera 3 and all is well.

I have not looked at the source code so I don't know if things are interrupt driven. If so, my guess is that an interrupt is being lost and all video stops waiting for the interrupt to be processed.

Please confirm you have understood that you can ONLY report issues with the particular OctoPi-UpToDate build scripts here, not general OctoPrint or OctoPi issues.

Additional information & file uploads

I have several logic analyzers (retired IBM Engineer) and have the ability to monitor GPIO(s) pins to help troubleshoot if required.

foosel commented 10 months ago

Which image are we talking about here, old or new camera stack? What build? If it's the new stack this is likely an issue with camera-streamer, upstream, and out of my hands. I've seen some problems like this and it's one of the reasons why the new stack has not yet been made the default.

John-RB commented 10 months ago

Yes, this is with the new stack.

The old stack works fine except I don't think it supports camera 3. At least mine did not work, I had to go back to a 2.1 camera.

John-RB commented 10 months ago

Info on builds installed in attached JPG.

Stable build works fine with old cameras. Camera 3 does not function.

New Camera Stack is the build that fails with every Pi camera I own.

OctoPi Builds

cp2004 commented 10 months ago

Can you share some logs, a systeminfo bundle maybe?

John-RB commented 10 months ago

Installed current version on Pi Zero 2 W along with a standard lens camera 3. No printer attached to the USB port. Failure occurred quickly.

JPG of installed new camera support version attached along with systeminfo bundle. 2023-09-06 OctoPi with new camera stack

John-RB commented 10 months ago

Selected Close in error.

Systeminfo Bundle attached here. octoprint-systeminfo-20230906153357.zip

John-RB commented 10 months ago

Info on builds installed in attached JPG.

Stable build works fine with old cameras. Camera 3 does not function.

New Camera Stack is the build that fails with every Pi camera I own.

OctoPi Builds

John-RB commented 10 months ago

Did a little more testing today. Problem still exists. I have found that after the video stream stoppage I can go to OctoPrint Settings -> Webcam and Timelapse -> Fallback Webcam and click on the Snapshot Webcam link and the video will start again in the new browser tab as well as OctoPrint Control.

It appears that all is well with the camera stream but something is happening to stop embedding the stream.

Anything I can do to provide more information?

foosel commented 9 months ago

So... That sounds like camera-streamer keeps running in these cases, but the stream in the frontend just stops? If so it might rather be an OctoPrint issue (or a browser issue, e.g. OctoPrint/OctoPrint#4863), rather than the stale stream issue with camera-streamer we've seen again and again in logs and which is tracked in ayufan/camera-streamer#94

Patronics commented 4 months ago

I'm encountering this issue as well with the current release version of octopi with new camera stack, the video will often update with around 1-10 frames a second for a little while, then just stop completely with a partial frame (the rest of the frame being solid grey. Reloading the page gets a new frame at least, but it often fails partway through the frame or shortly afterwards.

This is on a Pi 3B+