Stream Stops after some time with multiple webcams

Camera model

  • Logitech C922
  • Spedal 920

What is the problem?

The stream for both cameras work when first starting up OctoPrint, but the stream fails after some time.

What did you already try to solve it?

Monitoring stream with Chrome inspection tools.

I am using two cameras with the multi-cam plugin. I used these setup instructions to set up two cameras on the new webcam stack.

Initially only one camera worked, but after I changed FORMAT: YUYV to FORMAT: MJPEG both camera streams work. After a period of time, I notice that the stream stops running in the Chrome inspection tools. The example shown does not show that it has stopped, but it will usually stop after a few hours.

Have you tried running in safe mode?

No

Did running in safe mode solve the problem?

N/A

Systeminfo Bundle

The Syteminfo Bundle was too large, so I have uploaded it to google drive.

Additional information about your setup

  • OctoPrint Version: OctoPrint 1.9.1
  • OctoPi Version: OctoPi 1.0
  • Browser: Google Chrome on Macbook Pro

The camera setups are as follows:

Webcam 1:

Options for USB based cameras

The port on which the webcam server for the camera should listen on.

PORT=8082

The path to the camera device.

DEVICE=/dev/v4l/by-id/usb-046d_C922_Pro_Stream_Webcam_DBDAE4BF-video-index0

The image format of the camera.

FORMAT=MJPEG

The resolution to set on the camera. Defaults to 1280x720.

WIDTH=1280
HEIGHT=720

The framerate to set on the camera. Defaults to 15fps.

FRAMERATE=15

Additional options.

OPTIONS=

Webcam 2:

Options for USB based cameras

The port on which the webcam server for the camera should listen on.

PORT=8081

The path to the camera device.

DEVICE=/dev/v4l/by-id/usb-Sonix_Technology_Co.__Ltd._USB_Live_camera_SN0001-video-index0

The image format of the camera.

FORMAT=MJPEG

The resolution to set on the camera. Defaults to 1280x720.

WIDTH=1280
HEIGHT=720

The framerate to set on the camera. Defaults to 15fps.

FRAMERATE=15

Additional options.

OPTIONS=

Thanks in advance for the help!

Hello @neil-obico !

The log is flooded by octoeverywhere messages, at about 98%. About 1.000.000 lines.

That is way too much.

And in addition, someone activated the DEBUG mode so the flooding was multiplied.

Most recent version of Octoeverywhere is 2.7.0:

Where have you 2.7.1 got from?

|  OctoEverywhere! (2.7.1) = /home/pi/oprint/lib/python3.9/site-packages/octoprint_octoeverywhere

And why not?


Even if it is older, you may have a look on this thread:

Thank you for the quick response @Ewald_Ikemann

Thanks for pointing out that the file is flooded with Octoeverywhere messages.

I am not sure how I ended up with Octoeverywhere version 2.7.1. I see the current version is 2.7.0, but somehow I installed the plugin via the plugin manager last week and got 2.7.1.

I will do some more testing with Octoeverywhere disabled, and with OctoPrint in safe mode and follow up.

Testing In Safe Mode

I tried running in safe mode, but I am not able to sufficiently test the setup in safe mode. The webcam settings do not allow me to select any webcams when I am in safe mode.
As shown, the webcam is not selectable in safe mode:

Not in safe mode, I can see/select the desired default webcam:

I removed Octoeverywhere, so the only plugins installed are:

  • Multicam
  • Resource Monitor

System Info Bundle

Here is a new Syteminfo Bundle

I still experience the same issue.

To reproduce:

Open OctoPrint interface
Open chrome dev tools (I see stream sending data for a period of time, but eventually data stops sending and the stream starts to overlay a black rectangle that increases in vertical size over time)

According your recent systeminfo bundle, octoeverwhere is still installed:

2023-07-10 18:13:33,193 - octoprint.plugin.core - INFO - 22 plugin(s) registered with the system:
...
|  OctoEverywhere! (2.7.1) = /home/pi/oprint/lib/python3.9/site-packages/octoprint_octoeverywhere
...

The log contains information from yesterday and the day before, but it is uninstalled (and data cleaned up) as of last night. In the uploaded log, Octoeverywhere is uninstalled at

2023-07-11 19:24:57,133 - octoprint.plugins.pluginmanager - INFO - Plugin octoeverywhere uninstalled

I am still able to reproduce the problem after uninstalling Octoeverywhere and restarting OctoPrint.

Increasing NBUF in the configuration files for each camera fixed this for me.
I ended up setting the buffers to 10 for each USB camera.

I'm running two Logitech 920's, one USB borescope camera and a PiCam on a Pi4.

Now that the streams do not fail I've run into the persistent stream issue.