Hi, I’m having trouble getting 120fps working with my Arducam B0348 on a Raspberry Pi 3B+ (1GB RAM).
I followed the instructions and installed the drivers and library, and the camera works fine with the libcamera app and the picamera2 python wrapper. The problem is two things:
The gstreamer pipeline given in the manual doesn’t work for me.
Thanks for the details and the system info. Before we go deeper, one important thing to understand about this sensor:
The 120fps figure refers to the sensor’s raw frame speed WITHOUT any post-processing. Post-processing also takes time, so the moment you add image save, image encoding, or video encoding on top, it becomes very hard (usually impossible) to actually hit 120fps end to end.
So the gstreamer pipeline in the manual and your libcamera-vid command are both doing encoding, which is why you’re not seeing 120 frames.
Can you first test the raw frame speed on its own? Try this:
libcamera-still -t 0 --framerate 120
This bypasses the capture-to-file encoding overhead so you can confirm whether the sensor itself is running at 120fps. Also, when you ran the libcamera-vid command, what exactly did you see in the output? Any errors, or did it just complete slower than expected?
I can see the sensor running at the higher frame rate when nothing is being saved or encoded, so I guess that matches what you’re saying about raw frame speed. When I add the -v flag to libcamera-vid I can see it’s not really reaching 120fps in the actual output.
But my use case requires post-processing. I need to use this camera with the Raspberry Pi to build an IP camera, so I can’t avoid the encoding step. Image size can be 640 x 480.
I read on the forum that certain configuration settings like exposure time and others can help it get close to 120 fps. What are the best settings I should use to get as close to 120fps as possible while still doing post-processing?
Got it, that’s the classic tradeoff here. Let me set expectations clearly first:
The sensor’s raw frame speed (no post-process) can reach up to 120fps. That part is fine.
Post-process needs time. Once you add image save + image encode, or video encode, it is hardly possible to reach 120fps.
So for an IP camera stream where you’re encoding, you won’t hit a true 120fps end to end. What you can do is tune things to get as close as the platform allows.
On a Pi 3B+ the bottleneck is really the CPU-side encoding, not the sensor. A few things to try:
Keep resolution at 640x480 (good, you’re already there).
Lower the exposure time so the sensor isn’t holding the frame. Try something like --shutter with a small value and see how it affects the reported fps.
Reduce the encoder load: use a lower-bitrate/faster H.264 profile in your pipeline, and avoid any extra processing steps you don’t strictly need.
Measure with -v so you can see the actual frame rate the pipeline reports, and adjust one setting at a time.
Can you share the exact gstreamer pipeline you’re using, and the -v output from libcamera-vid? That way I can tell you where the time is actually going and which knob is worth turning.
Makes sense. Here’s the -v output from libcamera-vid with the 640x480 setup, and I’m using the gstreamer pipeline from the manual (the one that uses the libcamerasrc → encoder → sink path).
When I watch the frame count over the 1000ms run, it comes in well below 120, and the CPU on the Pi 3B+ looks pretty loaded during encoding. My exposure time settings are whatever the defaults are right now.
If 120fps end to end just isn’t realistic on the Pi 3B+ because of the encode step, I’d rather know that now so I can plan around it.
Right, and based on what you’re describing that lines up with the expected behavior:
The sensor can output up to 120fps raw (no post-process) — confirmed by your libcamera-still test.
The encode step is what’s holding you back. On a Pi 3B+, adding image save and image encode or video encode makes it very hard to reach 120fps, so the shortfall you’re seeing is the post-processing, not a broken driver or a bad install.
Summary of where we are:
Raw frame speed test: use libcamera-still -t 0 --framerate 120 to confirm the sensor side.
For your IP camera use case, you’re adding encode, so a true 120fps stream is not achievable on this board. Tune exposure/shutter and keep the pipeline as lean as possible (640x480, minimal processing) to get as close as the hardware allows.
The gstreamer pipeline in the manual assumes the same raw-vs-post-process distinction — it won’t magically beat the encoder limit either.
If you can paste the exact pipeline string and the -v numbers, I can point at the specific stage that’s eating the time. But at this point the honest conclusion is: 120fps raw = yes on this sensor, 120fps with encoding on a Pi 3B+ = not realistic.