RPi 5 + Octopi + Pi Camera 1.3 (OV5647)

What is the problem?

I am trying to set up a Raspberry Pi 5 to replace a dying Rpi3+ reusing the Pi camera 1.3 (ov5647) but I cannot get the video stream to work in Octoprint.

I have tried multiple times both versions of Octopi using Raspberry pi imager up to date to no avail.

The camera is detected by the system, I can take a test picture, rpicam-hello is working too but no streaming in Octoprint.

rpicam-hello --list-cameras
Available cameras
-----------------
0 : ov5647 [2592x1944 10-bit GBRG] (/base/axi/pcie@120000/rp1/i2c@80000/ov5647@36)
    Modes: 'SGBRG10_CSI2P' : 640x480 [58.92 fps - (16, 0)/2560x1920 crop]
                             1296x972 [43.25 fps - (0, 0)/2592x1944 crop]
                             1920x1080 [30.62 fps - (348, 434)/1928x1080 crop]
                             2592x1944 [15.63 fps - (0, 0)/2592x1944 crop]
rpicam-still -o test.jpg
[0:52:44.238411179] [1662]  INFO Camera camera_manager.cpp:330 libcamera v0.5.2+99-bfd68f78
[0:52:44.251795417] [1665]  INFO RPI pisp.cpp:720 libpisp version v1.2.1 981977ff21f3 29-04-2025 (14:17:26)
[0:52:44.260884724] [1665]  INFO IPAProxy ipa_proxy.cpp:180 Using tuning file /usr/share/libcamera/ipa/rpi/pisp/ov5647.json
[0:52:44.275060979] [1665]  INFO Camera camera_manager.cpp:220 Adding camera '/base/axi/pcie@120000/rp1/i2c@80000/ov5647@36' for pipeline handler rpi/pisp
[0:52:44.275102702] [1665]  INFO RPI pisp.cpp:1179 Registered camera /base/axi/pcie@120000/rp1/i2c@80000/ov5647@36 to CFE device /dev/media2 and ISP device /dev/media0 using PiSP variant BCM2712_C0
WARNING: Capture will not make use of temporal denoise
         Consider using the --zsl option for best results, for example:
         rpicam-still --zsl -o test.jpg
Made DRM preview window
Preview window unavailable
Mode selection for 1296:972:12:P
    SGBRG10_CSI2P,640x480/0 - Score: 3296
    SGBRG10_CSI2P,1296x972/0 - Score: 1000
    SGBRG10_CSI2P,1920x1080/0 - Score: 1349.67
    SGBRG10_CSI2P,2592x1944/0 - Score: 1567
Stream configuration adjusted
[0:52:44.513376843] [1662]  INFO Camera camera.cpp:1215 configuring streams: (0) 1296x972-YUV420/sYCC (1) 1296x972-GBRG_PISP_COMP1/RAW
[0:52:44.513503731] [1665]  INFO RPI pisp.cpp:1483 Sensor: /base/axi/pcie@120000/rp1/i2c@80000/ov5647@36 - Selected sensor format: 1296x972-SGBRG10_1X10/RAW - Selected CFE format: 1296x972-PC1g/RAW
#10 (0.00 fps) exp 33222.00 ag 8.00 dg 1.00
#11 (30.02 fps) exp 33222.00 ag 8.00 dg 1.00
#12 (30.01 fps) exp 33222.00 ag 8.00 dg 1.00
<.... SNIPPED...>

Mode selection for 2592:1944:12:P
    SGBRG10_CSI2P,640x480/0 - Score: 7832
    SGBRG10_CSI2P,1296x972/0 - Score: 5536
    SGBRG10_CSI2P,1920x1080/0 - Score: 4238.67
    SGBRG10_CSI2P,2592x1944/0 - Score: 1000
Stream configuration adjusted
[0:52:49.533226606] [1662]  INFO Camera camera.cpp:1215 configuring streams: (0) 2592x1944-YUV420/sYCC (1) 2592x1944-GBRG_PISP_COMP1/RAW
[0:52:49.538794255] [1665]  INFO RPI pisp.cpp:1483 Sensor: /base/axi/pcie@120000/rp1/i2c@80000/ov5647@36 - Selected sensor format: 2592x1944-SGBRG10_1X10/RAW - Selected CFE format: 2592x1944-PC1g/RAW
Still capture image received

All terminal information are from an ssh terminal, no redirection of anything.

dmesg | grep ov5647
[    1.909380] platform 1f00128000.csi: Fixed dependency cycle(s) with /axi/pcie@120000/rp1/i2c@80000/ov5647@36
[    5.502151] rp1-cfe 1f00128000.csi: found subdevice /axi/pcie@120000/rp1/i2c@80000/ov5647@36
[    5.502176] rp1-cfe 1f00128000.csi: Using sensor ov5647 4-0036 for capture

rpicam-hello
[0:13:27.738047332] [1500]  INFO Camera camera_manager.cpp:330 libcamera v0.5.2+99-bfd68f78
[0:13:27.751660921] [1505]  INFO RPI pisp.cpp:720 libpisp version v1.2.1 981977ff21f3 29-04-2025 (14:17:26)
[0:13:27.760737634] [1505]  INFO IPAProxy ipa_proxy.cpp:180 Using tuning file /usr/share/libcamera/ipa/rpi/pisp/ov5647.json
[0:13:27.775011380] [1505]  INFO Camera camera_manager.cpp:220 Adding camera '/base/axi/pcie@120000/rp1/i2c@80000/ov5647@36' for pipeline handler rpi/pisp
[0:13:27.775056029] [1505]  INFO RPI pisp.cpp:1179 Registered camera /base/axi/pcie@120000/rp1/i2c@80000/ov5647@36 to CFE device /dev/media2 and ISP device /dev/media0 using PiSP variant BCM2712_C0
Made DRM preview window
Preview window unavailable
Mode selection for 1296:972:12:P
    SGBRG10_CSI2P,640x480/0 - Score: 3296
    SGBRG10_CSI2P,1296x972/0 - Score: 1000
    SGBRG10_CSI2P,1920x1080/0 - Score: 1349.67
    SGBRG10_CSI2P,2592x1944/0 - Score: 1567
Stream configuration adjusted
[0:13:28.017923009] [1500]  INFO Camera camera.cpp:1215 configuring streams: (0) 1296x972-YUV420/sYCC (1) 1296x972-GBRG_PISP_COMP1/RAW
[0:13:28.018049177] [1505]  INFO RPI pisp.cpp:1483 Sensor: /base/axi/pcie@120000/rp1/i2c@80000/ov5647@36 - Selected sensor format: 1296x972-SGBRG10_1X10/RAW - Selected CFE format: 1296x972-PC1g/RAW
#10 (0.00 fps) exp 33222.00 ag 8.00 dg 1.00
#11 (30.02 fps) exp 33222.00 ag 8.00 dg 1.00
#12 (30.02 fps) exp 33222.00 ag 8.00 dg 1.00
#13 (30.01 fps) exp 33222.00 ag 8.00 dg 1.00
#14 (30.02 fps) exp 33222.00 ag 8.00 dg 1.00

libcamera-hello --list-cameras
-bash: libcamera-hello: command not found

What did you already try to solve it?

Reinstall Octopi from scratch switching from the 2 versions multiple times and trying the streaming in Octoprint after editing the /boot/firmware/config.txt to add the dtoverlay=ov5647 line and disabling the camera auto-detect.
In the stable version, the webcam logs showed that it could not find a USB camera.

Starting up webcamDaemon...

--- Configuration: ----------------------------
cfg_file:      /boot/firmware/octopi.txt
camera:        auto
usb options:   -r 640x480 -f 10
raspi options: -fps 10
http options:  -w ./www-octopi -n --listen 127.0.0.1

Explicitly set USB device: 
-----------------------------------------------

Found video devices:
/dev/video19
/dev/video20
/dev/video21
/dev/video22
/dev/video23
/dev/video24
/dev/video25
/dev/video26
/dev/video27
/dev/video28
/dev/video29
/dev/video30
/dev/video31
/dev/video32
/dev/video33
/dev/video34
/dev/video35
config file='/boot/firmware/octopi.txt':USB device was not set in options, starting MJPG-streamer with the first found video device: /dev/video19
<13>Nov 19 08:40:10 root: Starting USB webcam
Checking for VL805 (Raspberry Pi 4)...
  - It seems that you don't have VL805 (Raspberry Pi 4).
    There should be no problems with USB (a.k.a. select() timeout)
Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n --listen 127.0.0.1 -i input_uvc.so -r 640x480 -f 10 -d /dev/video19
MJPG Streamer Version.: 2.0
 i: Using V4L2 device.: /dev/video19
 i: Desired Resolution: 640 x 480
 i: Frames Per Second.: 10
 i: Format............: JPEG
 i: TV-Norm...........: DEFAULT
Error opening device /dev/video19: video capture not supported.
Init v4L2 failed !! exit fatal
 i: init_VideoIn failed
Done bringing up all configured video devices
Scanning again in two minutes
Found video devices:
/dev/video19
/dev/video20
/dev/video21
/dev/video22
/dev/video23
/dev/video24
/dev/video25
/dev/video26
/dev/video27
/dev/video28
/dev/video29
/dev/video30
/dev/video31
/dev/video32
/dev/video33
/dev/video34
/dev/video35
config file='/boot/firmware/octopi.txt':USB device was not set in options, starting MJPG-streamer with the first found video device: /dev/video19
<13>Nov 28 12:12:59 root: Starting USB webcam
Checking for VL805 (Raspberry Pi 4)...
  - It seems that you don't have VL805 (Raspberry Pi 4).
    There should be no problems with USB (a.k.a. select() timeout)
Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n --listen 127.0.0.1 -i input_uvc.so -r 640x480 -f 10 -d /dev/video19
MJPG Streamer Version.: 2.0
 i: Using V4L2 device.: /dev/video19
 i: Desired Resolution: 640 x 480
 i: Frames Per Second.: 10
 i: Format............: JPEG
 i: TV-Norm...........: DEFAULT
Error opening device /dev/video19: video capture not supported.
Init v4L2 failed !! exit fatal
 i: init_VideoIn failed
Done bringing up all configured video devices
Scanning again in two minutes

In the new video stack version, the camera is detected without touching anything but no streaming and the journal logs are useless to say the least but it seems, it is also looking for a USB camera.

-- Boot b123c2c82ffb48738325562e583641dc --
Nov 28 17:09:15 rpi5-octopi systemd[1]: Starting camera-streamer.service - camera-streamer...
Nov 28 17:09:15 rpi5-octopi camera-streamer-control[670]: Running start for camera-streamer-libcamera.service...
Nov 28 17:09:15 rpi5-octopi camera-streamer-control[670]: ... done.
Nov 28 17:09:15 rpi5-octopi camera-streamer-control[670]: Adding path unit for autolaunch of camera-streamer-usb@default
Nov 28 17:09:16 rpi5-octopi camera-streamer-control[670]: Running start for camera-streamer-usb-default.path...
Nov 28 17:09:16 rpi5-octopi camera-streamer-control[670]: ... done.
Nov 28 17:09:16 rpi5-octopi systemd[1]: Finished camera-streamer.service - camera-streamer.

Have you tried running in safe mode?

No, it is a fresh install from scratch, nothing added, no restore.

Systeminfo Bundle

octoprint-systeminfo-20251128174046.zip (17.9 KB)

Additional information about your setup

OctoPrint version: 1.11.4, OctoPi version: 1.1.0, browser: Safari 26.1, operating system: Mac OS 26.1 , Camera: Raspberry Pi Camera V1.3 (OV5647 sensor)

Unfortunately, the Raspberry Pi 5 is missing a video hardware encoder that exists in previous versions. This missing encoder has caused many of the "camera solutions" to fail including the ones included with both OctoPi images.

While the following threads are mostly focused on the Camera Module 3, I believe they would apply equally to the Camera Module 1.3.

https://community.octoprint.org/t/pi5-raspberry-pi-module-3/62453

https://github.com/ayufan/camera-streamer/issues/149

https://github.com/OctoPrint/OctoPi-UpToDate/issues/19

There are additional threads in this forum that discuss the RPi 5 (or RPi5) as a suitable host for OctoPrint with the general concensus that it is overkill. At this point in time, an RPi 4 is a much better choice.

RPi4 sure is better than RPi5 because Module 3 camera not working in Octoprint. But without this camera RPi5 is example much faster to start because you can use NVMe SSD. Start take only few seconds and with card 1-2 minutes. I hope that somebody can fix this problem in the future...

This was actually discussed in the latest OctoPrint on Air at time stamp 26:41.

https://youtu.be/PwVG1EKRT-4?si=zC096kNl57c9Zct1&t=1601

It may be an OctoPi specific issue, so you could install pi os lite and then use octoprint_deploy script to install OctoPrint and it might work out better.

It really seems to be specific to mjpeg-streamer with the RPi5. I went another route as I am not really into headache time searching for a root cause analysis.

I installed Raspi 64bits and used the octoprint_deploy to install Octoprint. Then I tried several mjpeg streamer solutions with no luck, the RPi5 uses software h264 encoding and all these software are written for hardware encoding and using the rpicams as USB devices which does not work this way on RPi5.

I finally opted for a much easier way of streaming the camera, even 2 at once for different angles, using MediaMtx. It is super easy to install and set up. I had to disable the mjpeg-streamer and install the Webcam-iFrame plugin to get the video streamed in Octoprint.
Another awesome plugin, OctoPrint-MultiCamView, gives me the ability to see multiple cameras at once on the same page via a new tab in Octoprint, including iframe streamings.

For now, it will do as long as I am testing 2 cameras at once, I may try to investigate what is blocking mjpeg-streamer later but I actually prefer the low latency, low resources, super easy to configure and no headache MediaMtx solution.

Yeah, my other recommendation was going to be go2rtc as a potential alternative.