How to let nvarguscamerasrc support MONO Y10 format?

Hi,
I am going to bring up AR0145 on jetson Nano which is MONO Y10 format sensor. I have added Y10 formats in driver codes and with below command I can capture out Y10 frame well: v4l2-ctl --set-fmt-video=width=1280,height=800,pixelformat=Y10 --stream-mmap -d /dev/video0 --stream-poll --stream-count=1 --stream-skip=20 --stream-to=cap1.raw

Now I need to preview the frames with gst command and I tried below commands it says “execute:740 No cameras available”:
gst-launch-1.0 -v -m nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=1280, height=800, format=(string)NV12, framerate=(fraction)120/1’ ! nvoverlaysink -e
How could I preview well with gst-launch-1.0 command with the MONO Y10 sensor? Thanks.

may I know what’s the sensor format dumps,
please examine with… $ v4l2-ctl -d /dev/video0 --list-formats-ext

since it’s MONO Y10 format, please try fetch the stream with v4l2src instead.
let’s check you’re able to access to the steam and dump single frame as JPG file.
for example, $ gst-launch-1.0 v4l2src num-buffers=1 ! "video/x-raw, format=(string)Y10, width=(int)1280, height=(int)800, framerate=(fraction)30/1" ! nvvidconv ! nvjpegenc ! filesink location=cam0.jpg

if above works, here’s another example to preview the stream.
$ gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,framerate=30/1,width=1280,height=800 ! xvimagesink

Hi, JerryChang,
Thanks for help.
For command " v4l2-ctl -d /dev/video0 --list-formats-ext" I got below:


For command gst-launch-1.0 I got below results:

@JerryChang any suggestion? Thanks.

let’s check whether you’re able to access to the steam and dump single frame as JPG file,
it looks incorrect command for video converter, please refer to developer guide, Accelerated GStreamer.

@JerryChang Sorry I don’t understand, do you mean I need to find a command myself in link you provided ?

yes, as mentioned above, it seems incorrect command for video converter,
hence, please give it a try since I don’t have MONO Y10 for verification.

Sorry I have no idea which command to try, do you have any suggested one? Thanks. @JerryChang

@JerryChang It seems v4l2src does not support Y10?

Hi,
Y10 looks to be 10-but GRAY format. It is not supported in v4l2src. Please run

gst-inspect-1.0 v4l2src

And supported GRAY formats are 8-bit GRAY and 16-bit GRAY:

(string)GRAY8, (string)GRAY16_LE, (string)GRAY16_BE

@DaneLLL
Thanks for the information! Do you know any command that I can preview the Y10 frames on Nano HDMI screen?

Hi,
By default it is impossible to preview 10-bit GRAY. If the camera source supports other formats, we would suggest set to other format instead of Y10

@DaneLLL
Thank you very much for the feedback. I will try to switch to RAW-Y8 settings, but I meet errors with Y8 settings while I have created another case in Got "frame start syncpt timeout!0" , do you have any idea on that? Thanks.

@DaneLLL
Do you know if ISP of Nano supports GREY(GRAY8 of RAW) format? Mono sensor also needs BLC, LSC, NR…

This is not answering the original question with nvarguscamerasrc, but what you could try would be:

  • capturing Y10 frames from V4L into stdout
  • converting Y10 to GRAY16_LE with a converter such as here (it was for bayer, but adapting the code to your case would be straight forward).
  • Then use gstreamer with input caps GRAY16_LE for displaying or more…
v4l2-ctl -d /dev/video0 --set-ctrl=bypass_mode=0,sensor_mode=0 --set-fmt-video=width=1280,height=800,pixelformat=Y10 --stream-mmap --stream-to=- | ./Y10_16 1280 800 | gst-launch-1.0 filesrc location=/dev/stdin blocksize=$(expr 1280 \* 800 \* 2) do-timestamp=1 ! queue ! video/x-raw,format=GRAY16_LE,width=1280,height=800,framerate=120/1 ! videoconvert ! xvimagesink sync=0

Where Y10_16 is the converter you’ve built.
Not sure if 120 fps wil be acheived. Boost with jetson_clocks.

2 Likes

How to let nvarguscamerasrc support MONO Y10 format?

it needs ISP settings update to enable momochrome sensor support via nvarguscamerasrc.
please contact with sensor vendors, we don’t support this through public forum discussion thread.

@Honey_Patouceul
Thank you very much. This could be a solution for now while I can get around 78 fps from a 120 fps input stream.

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