Struggling to compile Arducam IMX335 drivers for mediamtx on Pi Zero 2 W

Hi all, I’m trying to get Mediamtx running on a Raspberry Pi Zero 2 W with an Arducam 5MP-IMX335 camera. Running the latest Raspberry Pi Bookworm OS (32-bit). I installed the prerequisites from the Arducam docs for libcamera apps, but when I start the Mediamtx server I get this error:

Configuration file ‘imx335.json’ not found for IPA module ‘rpi/vc4’

Anyone know what’s going on here? The camera is connected via the CSI ribbon and the Pi detects it, but Mediamtx won’t start. Is there something extra I need for this sensor?

That error typically means the IPA (Image Processing Algorithm) config for your sensor isn’t where libcamera expects it. Can you run this and paste the output? It’ll show us exactly which libcamera packages are installed:

dpkg -l | grep libcamera

That should tell us if the Arducam-specific libcamera packages made it onto the system properly.

So I ran that and it looks like I have some libcamera packages but I’m not sure they’re the right ones. I’ve been digging into this more and I think the issue might actually be with how Mediamtx is built. The open-source Mediamtx binary that supports WebRTC might be compiled without the Arducam sensor drivers baked in. I found some docs suggesting I’d need to compile custom drivers into the Mediamtx project itself — here’s a screenshot of what I’m looking at:

compilation instructions

Has anyone had to go down this route before, or am I overcomplicating this?

You don’t need to recompile Mediamtx — this is actually simpler than that. The root cause is that the Arducam custom libcamera packages (libcamera_dev and libcamera_apps) aren’t installed on your system. Without those, the imx335.json IPA configuration file is simply not present for the rpi/vc4 module to find.

Here’s what you need to run:

wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh
chmod +x install_pivariety_pkgs.sh
./install_pivariety_pkgs.sh -p libcamera_dev
./install_pivariety_pkgs.sh -p libcamera_apps

This will pull down the Arducam-specific libcamera packages and drop all the sensor IPA configs (including imx335.json) into the correct paths. Once those are in place, Mediamtx should pick up the camera through libcamera without any custom compilation needed.

That did the trick — thank you! All the drivers from the Arducam docs page are installed now and the IMX335 is working perfectly with Mediamtx. I’ve got RTSP and WebRTC streams both running stable on the Pi Zero 2 W. Really appreciate the help.

I do have a follow-up question though — I’m planning another build and need different camera hardware.

For this next project I’m looking for an Arducam camera with these specs:

  • 150°+ field of view (minimum, wider is better)
  • Capable of 4K still capture, and ideally 1080p at 60fps for video
  • MIPI CSI interface
  • Drivers that work on Raspberry Pi Bookworm 32-bit

Anything in the lineup that fits? I was looking at a few options but wanted to check before ordering.

The B0262 (IMX477 sensor) sounds like a good match for those requirements. For the wide FOV you’re after, there are two lens options worth looking at:

The IMX477 sensor handles 4K still capture and can stream 1080p comfortably. Both lens options use MIPI CSI and are supported under Bookworm 32-bit with the same libcamera setup you already have working.