Problem with jetson nano v4l2 pixel format

hello dear moderator.
I have jetson nano developer kit which os is jetpack 4.6.1 / l4t 32.7.1
so I’m working on a project that force me to record videos only with " V4L2_PIX_FMT_SGBRG8" format in order to inhance project efficiency. after lot’s of searching in nvidia forums and struggling with my board , i didn’t get any positive result.

my webcam is " Sony Playstation 3 PS3 USB Eye Camera" so i test it with other system and my ordered format was correctly supported !!
first i try to recognize pixel format with “v4l2-ctl --list-formats-ext” on jetson nano and the result was only “YUYV”, not anything else …
in some topics i saw that they mention to change “camera_common.c” but i can’t find this file in my jetson nano
in other topic they suggested to expand jetson camera driver or may recompile kernel.
i try to build gstreamer and v4l2 and lot’s of thing from sources , but it was not helpful.

so please help me to find a way in order to add " V4L2_PIX_FMT_SGBRG8" format into my jetson nano.
is there any specific version of jetpack to support this format ??
if not , should i creat new webcam driver for jetson nano ?? but how ??

thanks

Hi,
This would need other users to share experience. By default USB cameras use UVC driver and not sure if the format is supported. General formats are YUV422 such as YUYV, UYVY. Although you don’t want to capture YUYV frame data in the use-case, you may still try v4l2-ctl command and see if the captured frame data is good. You can try the command like:

v4l2-ctl --set-fmt-video=width=_WIDTH_,height=_HEIGHT_,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100 -d /dev/video0 --stream-to=test.raw

Please set width=_WIDTH_,height=_HEIGHT_ to actual resolution.

actually i in my project i have to transfer picture via 1 channel with usb . so i can just use “gray” or “sgrbg8” which both of them are not supported in my jetson nano !!
changing width and height of picture , won’t help me to solve my problem that i test it before …

so is there any specific version of kernel or may any patch for camera driver to support other formats instead of YUYV ?

Hi,
The format is unique and it may not be supported in default UVC driver. Would see if other users have experience to customize UVC driver to include the format.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.