Camera Module 3 not showing up in octoprint

Camera model

Camera Module 3

What is the problem?

I'm getting the classic message:

Webcam stream not loaded

It might not be configured correctly or require authentication. You can change the URL of the stream under "Settings" > "Classic Webcam" > "Stream URL". If you don't have a webcam you can also just disable webcam support there.

Currently configured stream URL: /webcam/?action=stream

After installing crowsnest i get the message NO SIGNAL

Via SSH I get these info:

vcgencmd get_camera

supported=1 detected=0, libcamera interfaces=1

libcamera-hello --list-cameras

Available cameras
----------------
0 : imx708 [4608x2592] (/base/soc/i2c0mux/i2c@1/imx708@1a)
Modes: 'SRGGB10_CSI2P' : 1536x864 [120.13 fps - (768, 432)/3072x1728 crop]
2304x1296 [56.03 fps - (0, 0)/4608x2592 crop]
4608x2592 [14.35 fps - (0, 0)/4608x2592 crop]

libcamera-hello -v3

Preview window unavailable
Running without preview window
Opening camera...
[30:14:52.653447460] [22469] INFO Camera camera_manager.cpp:297 libcamera v0.0.5+83-bde9b04f
[30:14:52.794213886] [22470] INFO RPI vc4.cpp:437 Registered camera /base/soc/i2c0mux/i2c@1/imx708@1a to Unicam device /dev/media3 and ISP device /dev/media0
[30:14:52.794325916] [22470] INFO RPI pipeline_base.cpp:1101 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
Acquired camera /base/soc/i2c0mux/i2c@1/imx708@1a
Configuring viewfinder...
Viewfinder size chosen is 2304x1296
[30:14:52.795827307] [22469] INFO Camera camera.cpp:1033 configuring streams: (0) 2304x1296-YUV420
[30:14:52.796478134] [22470] INFO RPI vc4.cpp:565 Sensor: /base/soc/i2c0mux/i2c@1/imx708@1a - Selected sensor format: 2304x1296-SBGGR10_1X10 - Selected unicam format: 2304x1296-pBAA
Camera streams configured

What did you already try to solve it?

  • Fresh install of Octoprint - both stable and new camera stack from Pi Imager
  • Checked cable, plugged flex cable in and out of camera and pi and confirmed correct direction of flex cable
  • Updated camera-streamer and sudo apt update / sudo apt upgrade
  • sudo apt update / sudo apt upgrade libcamera*

Have you tried running in safe mode?

Yes

Did running in safe mode solve the problem?

No

Systeminfo Bundle

octoprint-systeminfo-20240229193756.zip (22.3 KB)

Additional information about your setup

Pi: Raspberry Pi 3 Model B
Octo: Octoprint 1.9.3 new camera stack from Pi Imager
Cam: Pi Camera Module v3

Config.txt file:

(USER)@(RASPBERRYPI):~ $ sudo nano /boot/config.txt

GNU nano 5.4 /boot/config.txt
[cm4]

Enable host mode on the 2711 built-in XHCI USB controller.

This line should be removed if the legacy DWC2 controller is required

(e.g. for USB device mode) or if USB support is not required.

otg_mode=1

[all]

[pi4]
dtoverlay=vc4-fkms-v3d

Run as fast as firmware / board allows

arm_boost=1

[all]

enable raspicam

start_x=1
gpu_mem=256

camera=auto

camera-streamer.conf file

GNU nano 5.4 /boot/camera-streamer/libcamera.conf

one camera, leave at 8080. If you have more, change to 8081, 8082, etc. The p>

camera will be considered the one with 8080.

PORT=8080

The resolution to request on the camera sensor. Defaults to 1280x720.

WIDTH=320
HEIGHT=240

The height to use for the video stream. Defaults to 720.

VIDEO_HEIGHT=240

The height to use for the snapshots. Defaults to 1080.

SNAPSHOT_HEIGHT=240

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

FRAMERATE=15

Additional options. By default enables continuous auto focus (if possible).

OPTIONS='--camera-options="AfMode=2" --camera-options="AfRange=2"'

requires the new camera stack OctoPrint image from Pi Imager.

From my post: " Octo: Octoprint 1.9.3 new camera stack from Pi Imager"

Sorry, wasn't paying attention. The resolution needs to match the actual camera's sensor full available resolution I think. So your 320x240 might be the problem. Another thing to double-check is that your config.txt has camera-auto-detect=1 in it? You can check by SSH to the pi and running sudo nano /boot/config.txt.

and might need to do a sudo apt update and sudo apt upgrade as well. If the autodetect isn't working right you may want to force the correct dtoverlay.

Software Configuration section....so

dtoverlay=imx708

Thanks for the help. After these steps I still get this webcam view in Octo:

OK. I tried to do a full clean install of Octoprint new camera stack since i've messed around with crowsnest i.e. Could you please walk me through what to look for?

UPDATE: A clean install and bumping up GPU to 256 + setting the right width and height did the trick. Thank you so much!!

1 Like

Cool, good pointer on the gpu_mem setting. Not sure if it's 100% required, but in case someone else comes around can definitely recommend that as well.

And also to clear up any future confusion, crowsnest is using ustreamer (at least with how you've installed it here) which does not support libcamera/RPi cam V3.