B0290 UVC camera freezes and has slow frame rate in OpenCV on Raspberry Pi 4B

Hi, I’m using a B0290 UVC camera with a Raspberry Pi 4B and I’m capturing video through OpenCV. The problem is the frames keep freezing, and the frame rate is extremely slow — even when I drop to the lowest resolution it’s still basically unusable. It seems to work intermittently and is pretty unstable overall. I tried looking for a driver for the Pi, but the instructions say no drivers are needed for a USB camera, so I’m stuck. How do I fix the freezing issue?

Thanks for the details. Since the B0290 is a UVC (USB) camera, you’re right — no RPi-specific drivers are needed, so we should focus on the OpenCV capture side and the camera’s own firmware rather than installing drivers.

A couple of things to start:

  1. Can you share the Python/OpenCV code you’re using for the capture? Even a short snippet of how you open the device and read frames would help.
  2. What does v4l2-ctl --list-formats-ext -d /dev/video0 show on your Pi? That tells us which resolutions/framerates the camera is actually exposing.
  3. Are you seeing any error messages or just silent frame freezing?

Also, which OS image are you running on the Pi 4B? Built-in UVC support varies a bit between kernels.

Here’s basically what I’m doing in OpenCV:

import cv2
cap = cv2.VideoCapture(0)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 640)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480)
while True:
    ret, frame = cap.read()
    if not ret:
        print("frame dropped")
        continue
    cv2.imshow("cam", frame)

I don’t get a hard error, just ret sometimes comes back False and then the stream freezes for a bit. No logs that I can see. I haven’t run that v4l2 command yet — I’ll try it.

That code is fine, so it’s not a capture-logic issue. The fact that ret goes False and then it freezes points more toward the camera/firmware side than OpenCV.

One thing worth knowing: we actually updated the firmware for the B0290 recently, and the instability you’re describing (freezing + very low framerate even at low resolution) matches issues that firmware addresses. Could you reprogram the firmware on your B0290 UVC camera with the latest version?

I’ve sent you the firmware package through private message — please check it and try the update.

Got the firmware package, thanks. I reprocessed/flashed the new firmware onto the camera. Took a couple of tries to get it to pick up correctly, but it went through.

Ran my OpenCV capture again at 640x480 and… the new upgrade worked like a charm. No more freezing, and the frame rate is normal now even without dropping resolution. Thank you for the help!

Great, glad that sorted it out. To summarize for anyone finding this thread later:

  • Setup: B0290 UVC camera on a Raspberry Pi 4B, video capture via OpenCV.
  • Symptom: intermittent operation, frames freezing, and very slow frame rate even at the lowest resolution; read() intermittently returning False.
  • What we ruled out: no drivers needed since it’s a UVC/USB camera (this was the source of the earlier confusion), and the OpenCV capture code itself was fine.
  • Fix: reprogramming the camera with the latest B0290 firmware resolved the freezing and framerate problem.

If you hit anything similar, updating the camera firmware is the first thing to try before digging into capture settings. Feel free to open a new thread if it comes back.