I am using an Arducam 64MP camera with libcamera in my GStreamer pipeline, but I am facing an issue where the video output appears cropped when selecting certain resolutions. Based on the libcamera-still --list
output, I have chosen 2312x1736 at 30 FPS (or alternatively 1920x1080 at 60 FPS) to maintain a high frame rate. However, when I use these resolutions in my GStreamer pipeline, the captured image is cropped compared to the expected full frame. My pipeline is:
gst-launch-1.0 libcamerasrc camera-name="/base/axi/pcie@120000/rp1/i2c@80000/arducam_64mp@1a" af-mode=continuous ! video/x-raw,format=RGB,width=2312,height=1736,framerate=30/1 ! videoconvert ! x264enc tune=zerolatency bitrate=3000 speed-preset=superfast ! h264parse ! rtph264pay config-interval=1 ! queue ! udpsink host=192.168.0.108 port=5000 sync=true
From libcamera-still --list
, my camera supports the following resolutions and frame rates:
Available cameras
-----------------
0 : arducam_64mp [9248x6944 10-bit RGGB]
Modes: 'SRGGB10_CSI2P' :
1280x720 [120.09 fps - (2064, 2032)/5120x2880 crop]
1920x1080 [60.04 fps - (784, 1312)/7680x4320 crop]
2312x1736 [30.00 fps - (0, 0)/9248x6944 crop]
3840x2160 [20.00 fps - (784, 1312)/7680x4320 crop]
4624x3472 [10.00 fps - (0, 0)/9248x6944 crop]
8000x6000 [3.00 fps - (624, 472)/9248x6944 crop]
9152x6944 [2.70 fps - (0, 0)/9248x6944 crop]
Interestingly, when I use libcamera-vid directly with the following command, the output is properly framed (not cropped) and runs at good FPS:
libcamera-vid -t 0 --autofocus-mode auto --framerate 30 --mode 1920:1080:30
This suggests that the issue might be related to how libcamerasrc handles the sensor mode selection within GStreamer. It seems that instead of downscaling the full sensor image, the camera is applying a crop at the selected resolution. I want to ensure that the video output maintains the full field of view while keeping at least 30 FPS. Could this be a limitation of libcamerasrc
, or is there a way to force full-frame scaling instead of cropping? Additionally, I have tried using videoscale
to manually resize, but I am unsure if this is the best approach.
Any guidance on resolving this issue and ensuring proper framing at any available resolution would be greatly appreciated.