UB241 UVC camera unstable, can't set 60fps except at 320x240 MJPG on Ubuntu 18.04

Hi, I’m stuck on a problem with a UB241 UVC camera and I can’t figure out if I’m doing something wrong or if it’s a hardware/ firmware thing.

I can’t set the frame rate to 60 fps on any resolution other than 320x240 in MJPG. At every other resolution only 30 fps works. On top of that the camera sometimes lags. It’s working intermittently and honestly feels unstable.

I’m on Linux Ubuntu 18.04 and I’m following the instruction manual. I’ve already gone through several tutorials and forum threads but nothing helped. I’m working on a project and it has stopped because of this, so any help would really be appreciated. I just want to get 60 fps working at the larger MJPG resolutions.

Hi, thanks for the detailed report. So the symptom is: MJPG gives you 60 fps only at 320x240, everything else tops out at 30 fps, plus occasional lag on Ubuntu 18.04 with the UB241.

Can you grab a few things for me so I can narrow this down?

  1. What your camera actually advertises:
v4l2-ctl -d /dev/video0 --list-formats-ext
  1. How you’re setting the format, e.g. is it with v4l2-ctl --set-fmt-video or from a capture app like ffmpeg/GStreamer/OpenCV?
  2. The USB enumeration so I can confirm the device ID and link speed:
lsusb
lsusb -t

Paste the output here and I’ll take a look.

Here’s what I get.

lsusb -t shows the camera sitting on a USB 2.0 bus. It’s plugged directly into a rear port, no hub.

For the formats, the MJPG listing gives something like this:

[0]: 'MJPG' (Motion-JPEG, compressed)
    Size: Discrete 320x240
        Interval: Discrete 0.017s (60.000 fps)
        Interval: Discrete 0.033s (30.000 fps)
    Size: Discrete 640x480
        Interval: Discrete 0.033s (30.000 fps)
    Size: Discrete 1280x720
        Interval: Discrete 0.033s (30.000 fps)
    Size: Discrete 1920x1080
        Interval: Discrete 0.033s (30.000 fps)

So 60 fps only shows up under 320x240, exactly like I described. There’s no 60 fps option at the higher resolutions at all.

I’ve tried setting it with v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=MJPG and then forcing --set-parm=60, but it either stays at 30 or errors out. Same result when I select the format from my capture app. I followed a few tutorials that suggest the camera should do 1080p60 in MJPG, that’s why I bought it.

Thanks, that’s helpful. The fact that the format list itself only exposes 60 fps at 320x240 (and not at 720p/1080p) means we’re not just looking at an app-side setting — the modes being negotiated are limited.

A couple more questions while I dig in:

  • Are you on the stock uvcvideo module, or did you build/replace anything? (lsmod | grep uvcvideo, and uname -a)
  • Does the lag correlate with a specific resolution or does it happen across the board?
  • Have you tried a USB 3.0 port just to rule out link/bus issues?

I’ll start testing this on my side. It may take me a little while because I want to reproduce it properly at the higher MJPG resolutions.

Stock uvcvideo, nothing custom. uname -a is a standard 4.15 kernel from the 18.04 install.

The lag is mostly at the higher resolutions and seems random, not tied to a fixed interval. I tried a USB 3.0 port and got the same behavior — still 30 fps cap on everything except 320x240 MJPG.

Honestly I’ve spent a lot of time on this and my project is on hold. If you can reproduce it on your end that would at least tell me it’s not just me.

I’ve been testing it and there might be a problem. The 60 fps showing up only at 320x240 in MJPG does look off compared to what’s expected at the higher resolutions, so this isn’t just a configuration thing on your end.

I need to test it in more detail before I can confirm what’s going on. Give me a little time — I’ll get back to you with feedback in the next two days. Thanks for your patience on this one.

Just checking in on this — any news about the case? My project is still on hold.

Quick recap of what I reported so it’s all in one place:

  • Camera works intermittently and is unstable.
  • I can’t set the frame rate to 60 fps on resolutions other than 320x240 in MJPG — only 30 fps work.
  • Sometimes the camera lags.
  • Troubleshooting so far: followed several tutorials and forums, no luck.
  • Environment: UB241 UVC camera, Ubuntu 18.04, stock uvcvideo.

And per your last message you said you tested it and there might be a problem, and you’d give feedback within two days. Any update would be great, thanks.

Thanks for the follow-up, and sorry for the wait — I know the project being on hold makes this frustrating.

Current status: I’ve reproduced the behavior where the higher MJPG resolutions only expose 30 fps while 320x240 has the 60 fps option, and this needs deeper testing on our side before I can give you a definitive root cause. So to be clear, no confirmed root cause yet and no verified workaround at the moment.

Please hold off on further changes on your end for now — I don’t want you chasing settings that won’t help. I’ll post back here with the results once the detailed testing is done. Appreciate your patience.