Page 1 of 1

Camera aspect ratio

Posted: 2025-10-20 21:35
by PlatimaTinkers
Hey so I have a Pico Ultra with MIS5001 connected, and I've been modifying `/oem/usr/share/rkipc-mis5001-500w.ini` to suit, however, I've found that when changing the [video.0] width, height, max_width and max_height, the image is stretched. It appears that the camera mode is not changed perhaps, just the output?

I've tried 1920x1080 and 2880x1616, but get the same results.

How can I get an actual 16:9 image, instead of 4:3 image that is stretched?

Thank you in advance!

Re: Camera aspect ratio

Posted: 2025-10-21 6:12
by yangxj121
Hello, you can use the v4l2-ctl command to obtain the desired ratio. For related commands, you can refer to https://wiki.luckfox.com/IMX415-Camera/

Re: Camera aspect ratio

Posted: 2025-10-24 0:08
by PlatimaTinkers
Hi,

Thanks, but this does not appear to work when using RTSP?

I am wanting to have RTSP streaming + UVC, ideally using FASTBOOT, with 16:9 resolution.

I tried but as you can see it does not like it.

Code: Select all

[root@luckfox root]# v4l2-ctl -d /dev/video11 --set-fmt-video=width=1920,height=1080,pixelformat=NV12
VIDIOC_S_FMT: failed: Device or resource busy
Thoughts? Thank you 🙏

Re: Camera aspect ratio

Posted: 2025-10-27 7:14
by PlatimaTinkers
Hi,

That did not work:

Code: Select all

[root@luckfox root]# v4l2-ctl -d /dev/video11 --stream-off
v4l2-ctl: unrecognized option `--stream-off'
As mentioned, I can change the resolution in /oem/usr/share/rkipc-mis5001-500w.ini but that does not change the aspect ratio, so I want to know how to change that.

This is for the RTSP stream with the factory buildroot image. I don't need to use V4L2 ideally.

Thanks

Re: Camera aspect ratio

Posted: 2025-10-27 7:42
by Crocodile
Hello, by default, the RTSP streaming of the rkipc application is implemented based on the RKMPI library. In the VI stage, the RAW image of the sensor is obtained and scaled according to the resolution specified in the rkipc-mis5001-500w.ini configuration (unlike the crop operation, which will stretch the image). The crop operation can be implemented by introducing the VPSS component (rkipc does not introduce it by default and requires secondary development).
The resolution setting of v4l2-ctl is also a scale operation, and the configuration is not shared with the configuration of rkmpi.
To enable both RTSP and UVC to work simultaneously, it is necessary to combine the source code of rkipc and uvc-tiny-app on the source code level, and introduce two VENCs to complete it. This is not a simple task. If used on fastboot, the difficulty of the read-only file system will further increase. We currently have no development plans in this area and cannot provide suggestions.

Re: Camera aspect ratio

Posted: 2025-10-27 21:56
by PlatimaTinkers
Thank you for that information, but I apologise it still was not what I was asking.

I've done this with a Milk-V Duo now instead, which works with a 16:9 aspect ratio when set to 1920x1080.

Re: Camera aspect ratio

Posted: 2025-10-28 2:13
by Crocodile
The ISP designs for different platforms are different, and the output of the same software application on different platforms is also different.
The Milk-V Duo you are using may have integrated the crop function into the ISP.
As far as I know, the ISP of rv1106 does not have a crop function. The target resolution settings are all achieved through scaling. The 1920x1080 images you obtained using v4l2-ctl are all obtained by stretching from the original 2592 x 1944. The best way to obtain a normal 16:9 ratio is to use the crop operation of VPSS to crop the original image.

Re: Camera aspect ratio

Posted: 2025-10-29 1:08
by PlatimaTinkers
Thank you kindly for that information!