My goal is to use Synchronized Quad Camera Kit IMX519’s four in one mode.
My expected result is that the frame size is 5120x2880 (1 camera frame is 1280x720, quadrupled to 5120x2880).
The actual result is that the frame size is 1280x720.
def gstreamer_pipeline(
# Issue: the sensor format used by Raspberry Pi 4B and NVIDIA Jetson Nano B01 are different
# in Raspberry Pi 4B, this command
# $ libcamera-still --width 1280 --height 1280 --mode 1280:1280
# uses sensor format 2328x1748.
# However, v4l2-ctl --list-formats-ext do not have such format.
sensor_id=0,
capture_width=1280,
capture_height=720,
# known issue:
# if the frame_rate is set to the suggested frame rate by `$ v4l2-ctl --list-formats-ext``
# the captured frame will have black pixels at the bottom of the frame.
# the solution:
# subtract the suggested frame rate by 1.
frame_rate=10-1,
display_width=1280,
display_height=720
):
return (
f"nvarguscamerasrc sensor-id={sensor_id} ! "
f"video/x-raw(memory:NVMM),width=(int){capture_width},height=(int){capture_height},format=(string)NV12,framerate=(fraction){frame_rate}/1 ! "
f"nvvidconv flip-method=0 ! "
f"video/x-raw,format=(string)BGRx ! "
f"videoconvert ! "
f"video/x-raw,format=(string)BGR ! "
f"appsink"
)