Does Arducam's custom libcamera support GStreamer on Raspberry Pi 5 with Pivariety?

Hey everyone, I’m trying to get an Arducam Pivariety camera module B0264 (the dual monochrome version) working on a Raspberry Pi 5. I’ve added dtoverlay=arducam-pivariety,cam0 to /boot/firmware/config.txt and I’m using the custom Arducam Libcamera library.

When I try to capture an image, I’m getting really bad color issues. Here’s the command I’m running:

libcamera-still -t 0 --tuning-file settings.json.original

The colors are completely off — everything looks washed out and the white balance seems totally broken. Anyone run into this before?

A couple of things to look at here. First off, that .original extension on your tuning file is a bit suspicious — tuning files should just be plain .json. Are you sure settings.json.original is the right file? Typically you’d want to point --tuning-file at the proper tuning file meant for your specific camera module.

Which tuning file are you actually trying to use here? The B0264 needs its own dedicated tuning file — if you’re accidentally pointing at one made for a different Pivariety module, that would absolutely explain the color problems you’re seeing.

Good catch on the .original extension. I tried it without that too but no luck. I also went through the lens shading calibration guide over at the Arducam docs (Lens Shading Calibration - Arducam Wiki) and followed the whole procedure, but it didn’t seem to change anything. Still getting the same terrible colors.

Is there something else I might be missing with the calibration? I went through the steps exactly as documented.

This sounds like a lens shading calibration issue at its core. Here’s what’s likely happening: the Pivariety camera module has an internal MCU that stores a tuning file in its own flash, and it automatically applies that calibration whenever Libcamera initializes the camera. So even if you pass a tuning file at the command line, the MCU’s built-in calibration is still being applied underneath.

The key thing is that the lens shading calibration procedure needs to be done properly and the resulting calibration needs to be what gets flashed to the MCU — otherwise it just keeps applying the old (wrong) calibration every time. Can you walk through exactly what steps you performed from that guide? Also, are both monochrome modules exhibiting the same bad color behavior, or is it just one of them?

Thanks for the explanation about the MCU — that makes sense and I’ll dig into the calibration steps again more carefully.

Separate question while I’m working through this: does Arducam’s custom Libcamera library for the Pivariety cameras actually support GStreamer? I need to use GStreamer pipelines for my application downstream and I want to make sure this is going to work before I invest more time.

Dion here — yes, GStreamer is supported. Both rpicam-vid and libcamera-vid can be used as the video source for your GStreamer pipelines without any issues. The official Raspberry Pi documentation has a solid section on GStreamer integration that covers the setup:

https://www.raspberrypi.com/documentation/computers/camera_software.html#gstreamer

That should give you everything you need to pipe the camera output into your GStreamer workflow.

Just want to double-check — and I apologize for being pedantic here — but this definitely works with the customized Libcamera build for Arducam Pivariety cameras? Not just the stock Raspberry Pi libcamera? I saw the same doc link you shared (https://www.raspberrypi.com/documentation/computers/camera_software.html#gstreamer) but I’m trying to confirm that the custom Arducam build doesn’t break GStreamer compatibility in any way before I go down that path.

Dion again — yep, go ahead and use GStreamer with the customized libcamera. It works the same way. The Arducam custom build maintains compatibility with the standard libcamera API, so your GStreamer pipelines will function just like they do with the vanilla build. No surprises there.

Let us know if you run into any issues when you’re implementing it — happy to help troubleshoot if something comes up.