Mjpg-streamer "no camera detected" on Pi Zero 2 W Bullseye with Arducam 16MP camera

Hi everyone. I’m hitting a weird problem with mjpg-streamer and an Arducam 16MP autofocus camera. On my Raspberry Pi 4 it works without issue, but on a Raspberry Pi Zero 2 W running Bullseye I just get “no camera detected” when I try to start it. I’m using the input_libcamera plugin. Anyone seen this before?

Can you give a bit more detail on both setups? Which OS versions, which mjpg-streamer build/plugin, and did this ever work on the Pi Zero 2 W?

Sure. Working box: Pi 4 with the same Arducam 16MP autofocus camera, mjpg-streamer with the libcamera / input_libcamera plugin. Failing box: Pi Zero 2 W on Bullseye, same camera and same plugin. It ran fine on Buster, but I’m trying to move over to Bullseye. Not using OctoPi, just a plain install.

Ok, since you’re targeting Bullseye, older mjpg-streamer builds don’t always have a working input_libcamera plugin. Have you tried building the input_libcamera plugin from the git repository on Bullseye? That’s usually where I’d start.

I did try that. The build actually completes, but the resulting mjpg-streamer won’t run afterwards — it complains about a missing libcam plug-in. So I can’t even reach the camera detection stage with the Bullseye build.

Let’s make sure we can reproduce a clean build. There are a couple of walkthroughs that helped me get the libcamera plugin going on Bullseye. Take a look at this Raspberry Pi forum thread: https://forums.raspberrypi.com/viewtopic.php?p=2007815#p2007815 and the Arducam autofocus/OctoPrint guide: Redirecting... . The Arducam page is OctoPrint-focused but the libcamera build steps still apply. Can you start over from scratch and note exactly which step fails?

Ok, so after starting over I got it compiled and working on the Pi 4. Honestly I’m not 100% sure which step actually fixed it, which is a bit frustrating. It’s working on the Pi 4 now. And to be clear, mjpg-streamer runs fine on Buster on the Zero — the problem only shows up when I try Bullseye.

Good, that at least tells us the build is viable on the Pi 4. Now let’s look at the failing Pi Zero 2 W. Can you run file mjpg-streamer and then try running it directly to see what happens? Post the output here.

Here’s what I get on the Pi Zero 2 W:

file mjpg-streamer
mjpg-streamer: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=9f02eefef9f742c54e3e97b4606f69669dcd4208, not stripped

./mjpg-streamer
Segmentation fault

So it’s not even a clean “no camera detected” at this point — it just segfaults.

Interesting. Since the same Arducam 16MP autofocus camera works correctly on the Pi 4, the camera itself is probably fine. The “no camera detected” on the Pi Zero 2 W, plus the segfault on the Bullseye build, points more toward the Pi Zero 2 W (or its software setup) than the camera. My working theory is that the problem is on the Zero 2 W side.

That makes sense, but how do I confirm it’s the board and not something specific to the camera on that model?

The best isolation test is to swap the hardware. If you have another camera available, connect it to the Pi Zero 2 W and see whether it gets detected at all. If another camera is also not detected (or shows the same behavior), that points strongly at the Pi Zero 2 W. Since the 16MP camera is confirmed working on the Pi 4, treat that camera as normal and focus on the Zero 2 W. To summarize where we are: the camera is likely fine, the current hypothesis is that the Pi Zero 2 W is the problem, and the next step is to test another camera on the Zero 2 W to isolate the fault.