1

I try to run libcamera-vid with several camera modules at higher resolutions, but fail. Calling libcamera-still works as expected.

The behavior can be reproduced with several modules with OmniVision 5647, Sony IMX219 and IMX519 sensors. Trouble starts at 2592×1944. Image file can be generated, video cannot be started.

For example, using an IMX219 module, the command libcamera-vid -v -n --width 3280 --height 2464 --output - does not give any output and terminates immediately after being called:

[0:24:20.369130982] [1186] INFO Camera camera_manager.cpp:299 libcamera v0.0.4+22-923f5d70 [0:24:20.500309865] [1187] WARN RPI raspberrypi.cpp:1357 Mismatch between Unicam and CamHelper for embedded data usage! [0:24:20.504227416] [1187] INFO RPI raspberrypi.cpp:1476 Registered camera /base/soc/i2c0mux/i2c@1/imx219@10 to Unicam device /dev/media3 and ISP device /dev/media0 Acquired camera /base/soc/i2c0mux/i2c@1/imx219@10 Configuring video... [0:24:20.507309968] [1186] INFO Camera camera.cpp:1028 configuring streams: (0) 3280x2464-YUV420 [0:24:20.508741634] [1187] INFO RPI raspberrypi.cpp:851 Sensor: /base/soc/i2c0mux/i2c@1/imx219@10 - Selected sensor format: 3280x2464-SBGGR10_1X10 - Selected unicam format: 3280x2464-pBAA Camera streams configured Available controls: 

[...]

Buffers allocated and mapped Video setup complete Opened H264Encoder on /dev/video11 as fd 24 Got 6 output buffers Got 12 capture buffers Closing Libcamera application(frames displayed 0, dropped 0) Camera stopped! Tearing down requests, buffers and configuration Camera closed ERROR: *** failed to start output streaming *** 

Other resolutions up to 1920×1080 work fine, but 3280×2464 should be possible, no?

$ libcamera-vid --list-cameras Available cameras ----------------- 0 : imx219 [3280x2464] (/base/soc/i2c0mux/i2c@1/imx219@10) Modes: 'SRGGB10_CSI2P' : 640x480 [103.33 fps - (1000, 752)/1280x960 crop] 1640x1232 [41.85 fps - (0, 0)/3280x2464 crop] 1920x1080 [47.57 fps - (680, 692)/1920x1080 crop] 3280x2464 [21.19 fps - (0, 0)/3280x2464 crop] 'SRGGB8' : 640x480 [103.33 fps - (1000, 752)/1280x960 crop] 1640x1232 [41.85 fps - (0, 0)/3280x2464 crop] 1920x1080 [47.57 fps - (680, 692)/1920x1080 crop] 3280x2464 [21.19 fps - (0, 0)/3280x2464 crop] 

The camera is recognized at startup with a warning (which shows up for other image sensors as well):

$ dmesg | grep imx [ 0.115807] platform 3f801000.csi: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/imx219@10 [ 13.467359] imx219 10-0010: Consider updating driver imx219 to match on endpoints 

I also tried to put

bcm2835-v4l2 # enable higher-resolution video options bcm2835-v4l2 max_video_width=3240 max_video_height=2464 

to /etc/modules-load.d/rpi-camera.conf as suggested here, but without any noticeable change.

However, libcamera-still -n --width 3280 --height 2464 -n -o /tmp/foo.bar gives the expected JPEG image file with full resolution.

OS: Raspberry Pi OS bullseye 64bit lite, Raspi 3B, libcamera-apps-lite version git20230301+54a781d, libcamera0 version git20230302+923f5d70-1.

1 Answer 1

1

Unfortunately, the H.264 encoder in the Raspberry Pi's GPU is limited to a maximum resolution of 1920x1080. This is a hardware limitation, and it's not possible to simply "enlarge" the encoder to support higher resolutions like 2592x1944. No way. Using of software encoding:

rpicam-vid -t 0 --width 2592 --height 1944 -n --inline --listen -o - | ffmpeg -i - -vcodec libx264 -s 2592x1944 -tune zerolatency -bufsize 100k -f mpegts tcp://192.168.1.180:5050 

gives you 0.08 frames per second.

Other fun thing is "crop": If you want to use camera in mode

1920x1080 [47.57 fps - (680, 692)/1920x1080 crop]

you will not see a full-size wanted picture - it will be automatically cropped.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.