B0265R stereo camera on Pi 4 Bullseye can't capture two full-res images simultaneously

Hi, hoping someone can help me before I go crazy with this. Setup: Raspberry Pi 4B 8GB, latest Bullseye (64-bit userland, 32-bit actually mattering here I guess). Camera is the B0265R 12MP 2 synchronized stereo camera for RPi, IMX477 based, using the stereo HAT.

What I actually need is to capture 2 full-resolution shots from both cameras at the same time. Right now I can’t do it. On Bullseye with libcamera I can’t get the 8112x3040 full resolution out of the stereo setup at all (from what I read the official driver is not “full-spelling” for this). I tried the libcamera-still and libcamera-hello commands, and dual camera can stream two images on the screen, but then I get this in the output:

ERROR IPARPI cam_helper.cpp:180 Embedded data buffer parsing failed

It doesn’t stop the streaming but I’d like to know why it happens. Also I cannot find the B0265R camera module anywhere in /dev on the Pi 4 with the latest Bullseye, is that expected?

One more thing: I managed to use I2Cset in the terminal to switch the stereo HAT into “single camera mode” and manually get a full-resolution image from one camera at a time. But I cannot obtain TWO images at nearly the same time from both cameras - switching between the two cameras requires some time lapsing.

I was also looking at the stereo_depth_demo in the MIPI_Camera repo but the SDK driver associated with that demo seems outdated and doesn’t appear to work with IMX477 (B0265R) on Bullseye. The repo intro says the libcamera-arducam driver is “coming soon” - do I just wait for that?

Welcome! Let me split this into two separate things because they have very different answers.

First, the error. On the stereo HAT the two sensors are muxed onto a single CSI path, and libcamera is told the front end is one camera. The “Embedded data buffer parsing failed” message comes up because the Stereo HAT does not output embedded data, so libcamera goes looking for the embedded data buffers that IMX477 normally provides and can’t find them. It’s cosmetic for streaming, but it’s a symptom of the same design.

Second, the resolution thing. Can you paste the exact commands you’re running and the full output? Specifically:

  • the libcamera-still / libcamera-hello command lines you used
  • how you enabled the dual camera
  • what I2Cset command you used to switch to single camera mode

Also, when you say you want “2 full-resolution shots at the same time” - do you mean 4056x3040 from each camera, i.e. 8112x3040 stitched/full-spelling, or two independent 4056x3040 files captured with the same timestamp?

Sure, here’s everything.

Commands I used: libcamera-still and libcamera-hello, after following the procedure to enable the dual camera. Dual camera streams two images on screen fine but the embedded data error shows up.

For single camera mode I used I2Cset in the terminal (under Bullseye on the Pi 4) to flip the stereo HAT into “single camera mode” - that works, I get a full-resolution image from one camera each time. Then I wrote a Python script using the smbus module (same thing as I2Cset) to automatically switch single camera mode, i.e. rapidly flip between the two cameras. That did NOT work - I could not get two individual images from both cameras, switching between the two cameras just takes some time lapsing that I can’t get around.

Resolution I’m after: 8112x3040 full-resolution, or really 4056*2 x 3040 “full-spelling” where both cameras run at their native resolution.

Links I’ve been reading:

So my options seem to be: switch to Jetson Nano and use the B0265N, downgrade the Pi 4 to Buster so I can use the old MIPI driver, or wait for the libcamera-arducam driver. Is the B0265N able to capture max resolution from both cameras at the same time? If it can I’d replace the B0265R with it.

Just to add some more context on what I’m trying to build, because it might change your answer.

I also got the 64MP synchronized 4-camera setup (the 64MP ultra-high-res camera for Raspberry Pi) and I’m not sure it can give me shots from two cameras at the same time either - I wanted at least stereo vision out of it. With the 4x 64MP synchronized HAT I still can’t capture 2 full-resolution shots at the same time, it uses “synthesized” capture. If that really is the limitation, I may end up cancelling it.

So the real questions:

  1. Does any product you sell have two MIPI interfaces so both cameras can shoot at max resolution at the same time?
  2. On the new autofocus 64MP product - does it give the internal focal length as an intrinsic parameter when taking the shot (e.g. readable from the photo metadata)?
  3. If I lower the resolution below max, can I then capture two images at the same time?
  4. Do you have near-future plans for a libcamera-based driver that can capture max resolution for both cameras simultaneously?

Also the same fundamental problem: capturing images from each camera in dual camera mode at each time just doesn’t work.

Okay, this all comes down to one design fact, so let me be upfront about it.

For the synthesized binocular/HAT products, the host has to believe the front end is a single camera. That’s the only way the official commands and the official ISP pipeline work normally. So the two sensors are composited into one image by the HAT:

  • The synthesized image keeps its resolution, but the frame rate is halved.
  • Each camera’s horizontal resolution is halved in the composite (vertical resolution stays the same, horizontal FOV stays the same, so the image is horizontally compressed).

That’s why you can’t get 4056x3040 from each camera at the same time - it’s not a bug, it’s how the synthesis works. Same story on the 4x 64MP HAT: it uses 2x2 synthesis. Cameras 0 and 1 are fully synchronized, cameras 2 and 3 are fully synchronized, and cameras 2/3 run one frame behind 0/1.

On your libcamera question: the official libcamera path can’t do full resolution for both cameras simultaneously with this hardware. The only way to get max resolution from both at the same time is the old MIPI Camera driver, but then you lose the official commands and ISP image processing, and the image quality is poor. For the official 5MP/8MP/12MP sensors that’s really not recommended.

About the embedded data error: since the Stereo HAT doesn’t output embedded data, the fix is to manually modify libcamera’s code and compile it yourself. The code in the link you have may not be the latest - follow the official build docs to grab current sources. If you want to go that route I can point you at the reference lines.

If you genuinely need two MIPI interfaces with full-resolution simultaneous capture, StereoPi is the example to look at - it uses a CM4 carrier board with two MIPI interfaces, and it can capture 12MP from two cameras at the same time.

Thanks, that explains a lot. A couple of clarifications though.

So downgrading my Pi 4 to Buster lets me use the old MIPI driver - can I do that with the B0265N? I assume yes from what you said but want to confirm. And even if it works, you’re saying the image quality is bad, so it’s not a real solution for a 12MP official sensor?

On the 64MP 4-camera HAT, can you confirm the details? Specifically: if a camera fails does the composite still come out, are official commands and ISP supported, and can the HAT be detached and connected directly to the Pi? I remember reading it’s a customized model that needs the HAT to provide a clock.

And for StereoPi - is that really doing 12MP on both cameras simultaneously, or is it also synthesizing?

Confirming point by point.

Old MIPI driver: yes, it can be used on Buster, including for the B0265N. But with the MIPI driver you won’t get the ideal image - the official commands/ISP are out. That’s the tradeoff.

B0265N: it’s a binocular synthesis design, same family of limitation. It does not support capturing max resolution from both cameras at once. To keep the synthesized image resolution unchanged (so the platform thinks there’s one camera and the official commands/ISP work), the horizontal resolution of each camera gets halved when compositing. Vertical resolution and horizontal FOV stay the same, the horizontal image is just compressed.

64MP 4-camera HAT details, as I have them:

  1. It uses 2x2 synthesis. Cameras 0 and 1 are completely synchronized, cameras 2 and 3 are completely synchronized, and 2/3 are one frame behind 0/1.
  2. The synthesized image resolution stays the same, frame rate is halved.
  3. If any camera fails the composite still outputs, with the failed camera’s area black.
  4. Official commands and ISP are supported.
  5. It’s a customized model - the HAT has to provide the clock, so it can’t be removed and plugged straight into the Pi.

StereoPi is different - it’s a CM4 carrier board with two real MIPI interfaces, so both cameras run full-res simultaneously, no synthesis.

Also worth knowing: the stereo_map example isn’t ideal and there are no plans to continue developing it right now, but you can use it as a reference. And there’s no 12MP synchronized product in the pipeline that I’m aware of, though there is an 8MP one.

Okay, one more round of questions and then I’ll decide.

  • So there’s really nothing off-the-shelf that gives me two MIPI interfaces with max resolution on both cameras at the same time? That’s the core requirement - full-resolution synchronized stereo. Is there any chance of getting that as a custom build?
  • About the autofocus 64MP: does it report the internal focal length as an intrinsic parameter in the shot metadata? I need that for stereo calibration.
  • And is the B0265R factory calibrated? Is there a calibration procedure or an SDK example like depth calculation I can use with it? I couldn’t find one.

Straight answers:

  • No regular off-the-shelf product matches “two MIPI interfaces, both cameras at max resolution at the same time.” What we can do is build it as a customization - our sales team handles that. I’ll leave the contact below.
  • On intrinsic/focal length reporting for the autofocus 64MP: that’s not something this stereo/synthesis thread can answer precisely, so please put that question to sales/support directly with the product name - they’ll have the metadata spec.
  • B0265R is NOT factory calibrated. There is no calibration program/procedure provided, and no SDK example (no depth calculation sample) for it.

One more reference on your autofocus question - the metadata comes from the ISP pipeline, so whether focal length lands in the EXIF depends on the driver path you’re using (official libcamera/ISP vs old MIPI driver, which as we covered loses the ISP). Keep that in mind.

Summarizing where this landed so you have it all in one place.

Conclusion: max-resolution synchronized dual-camera capture isn’t possible on the synthesized binocular/HAT products (B0265R, B0265N, the 64MP 4-cam HAT). The platform has to see a single camera front end so the official commands and ISP work, and the synthesis halves each camera’s horizontal resolution in the composite (frame rate halved, vertical res and horizontal FOV unchanged). The “Embedded data buffer parsing failed” error is separate and expected - the Stereo HAT doesn’t output embedded data, so libcamera can’t find it; streaming still works.

What you can do:

Reference threads and repos:

Your I2Cset / smbus single-camera switching approach is fine for grabbing one camera at a time, but as you found, the switch latency between cameras is exactly why you can’t get two individual shots “at the same time” that way.