OctoPi-UpToDate icon indicating copy to clipboard operation
OctoPi-UpToDate copied to clipboard

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

Open John-RB opened this issue 2 years ago • 10 comments

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.

  • [X] I confirm that my issue is NOT about OctoPrint.
  • [X] I confirm that my issue is NOT about OctoPi.
  • [X] I confirm that my issue is ONLY about OctoPi-UpToDate.

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.

John-RB avatar Sep 05 '23 16:09 John-RB

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.

foosel avatar Sep 05 '23 16:09 foosel

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 avatar Sep 05 '23 17:09 John-RB

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 avatar Sep 06 '23 14:09 John-RB

Can you share some logs, a systeminfo bundle maybe?

cp2004 avatar Sep 06 '23 15:09 cp2004

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 avatar Sep 09 '23 09:09 John-RB

Selected Close in error.

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

John-RB avatar Sep 09 '23 10:09 John-RB

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 avatar Sep 14 '23 21:09 John-RB

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?

John-RB avatar Sep 14 '23 21:09 John-RB

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

foosel avatar Oct 02 '23 09:10 foosel

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+

Patronics avatar Mar 09 '24 03:03 Patronics