Hi everyone. I’m trying to get H.264 capture working on a UCTRONICS B0468 IMX323 USB2.0 camera module. The datasheet (https://www.uctronics.com/download/Amazon/B0468_IMX323_USB2.0_Camera_Module_Datasheet.pdf) says the camera supports H.264, but H.264 doesn’t show up as an available format and I can’t force it through ffplay either. I even looked at the vendor’s own screenshots and they don’t display H.264. I specifically need a camera that does H.264, and this one seems to not actually support it on Linux without some special driver - and I can’t find one listed on the vendor website.
Could you share a bit about your setup? Distro/kernel, which device node the camera lands on, and confirm the exact module. Also, run this so we can see what the driver is actually advertising:
v4l2-ctl --list-formats-ext -d /dev/video0
Paste the full output here.
Sure. I’m on Ubuntu 22.04 with the latest updates, the camera shows up as /dev/video0, and it’s the UCTRONICS B0468 IMX323 USB2.0 module. Here’s the output:
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 800x600
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 640x360
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 352x288
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 320x240
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.033s (30.000 fps)
[1]: ‘YUYV’ (YUYV 4:2:2)
Size: Discrete 800x600
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 640x360
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 352x288
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 320x240
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 800x600
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Thanks, that output is very telling. The driver is only exposing two formats:
There’s no H.264 entry anywhere in the VIDIOC_ENUM_FMT result. Before we dig further, can you confirm basic capture actually works on this module? Try MJPEG with ffplay like this:
ffplay -f v4l2 -input_format mjpeg -video_size 640x360 -i /dev/video0
Yes, that works fine - MJPEG plays back with that command. So the camera itself is functional, just no H.264 showing up.
Good, so capture is working, it’s specifically the H.264 format that’s missing. Let’s try forcing it through ffplay with a few name variants, since the v4l2 wrapper can be picky about the fourcc/name string. Try these one at a time: H264, h264, h.264, H.264, x264, and X264. Let me know what error you get.
Tried all of those variants - H264, h264, h.264, H.264, x264, X264 - and every single one fails with the same error:
[video4linux2,v4l2 @ 0x7fe958000cc0] No such input format: H264.
Thanks for testing all of those. Here’s where we’ve landed:
- v4l2-ctl --list-formats-ext -d /dev/video0 lists only:
- No H.264 format is enumerated by the driver.
- Forcing H.264 via ffplay fails regardless of the name variant (H264, h264, h.264, H.264, x264, X264), all with:
[video4linux2,v4l2 @ 0x7fe958000cc0] No such input format: H264. - MJPEG capture works fine with:
ffplay -f v4l2 -input_format mjpeg -video_size 640x360 -i /dev/video0
So the root cause is that the module isn’t exposing or negotiating an H.264 V4L2 capture format to the Linux system - only MJPG and YUYV are listed by the driver, which is why ffplay has nothing to bind to. The datasheet claims H.264 support, but that capability isn’t surfacing through the standard V4L2 path on Linux.
I’ve sent you a file via private message that support provided for storing/using H.264 video with this module. Please check your messages and give it a try. It won’t change what v4l2-ctl enumerates, but it should let you store H.264 video.