How to get square pixels from the devkit camera

I’ve given up on trying to get the IMX-219 cameras working with the Auvideo J90 board for now.

I’m using the camera that came with the devkit, on the devkit motherboard.

Doing a simple playback, the pixels of the camera are not square:

I’ve tried these configurations:

gst-launcher-1.0 nvcamerasrc ! nvoverlaysink
gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM),width=640, height=480, framerate=30/1, format=NV12' ! nvvidconv flip-method=2 ! nvoverlaysink

The on-screen aspect ratio is quite squished sideways (approximately as if compressiong 16:9 into 4:3)

My output display is 1280x800 pixels, and has square pixels.

What am I missing?

Also, can the onboard camera do more than 30 fps? I need at least 60 fps. Just trying to change the fpsRange or framerate to go higher just clamps it to 30.

Okay, some update.

When I use a smaller native format for the sensor, like 1280x720, it can go to 120 Hz, so that’s cool.

When I set the width=1280, height=720 format, it appears less squished. So that’s good. I still don’t know how to get 4:3 aspect ratio un-squished, though – cropped, instead of stretched?

Try below command on your platform. Set the sensor mode ratio and overlay-w/overlay-h the same to keep the aspect ratio.

gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM), framerate=(fraction)30/1' ! nvtee ! nvoverlaysink overlay-x=0 overlay-y=0 overlay-w=1280 overlay-h=720 overlay=1