How to create preview image for bayer cmos in AGX Orin?

i have a cmos work in AGX Orin, which output bayer data, how can i get a continues preview image by use v4l2 or vlc、gst、ffmpeg etc?

the cmos info as follows:
v4l2-ctl -d /dev/video0 --list-formats-ext
Type: Video Capture

    [0]: 'RG12' (12-bit Bayer RGRG/GBGB)
            Size: Discrete 4128x3008
                    Interval: Discrete 0.034s (29.000 fps)

and use v4l2-ctl command can save raw data success.

You may see Stream Bayer Data with Gtsreamer - #8 by Honey_Patouceul and adapt for RG12.

1 Like

hi Patouceul,
thank for your reply, i will have a try, and is exist any easier method?

now, the data flow of my project is:
bayer-sensor —> csi ----> vi -----> 12bit-bayer-raw-data, this flow is work by v4l2-ctl command;

finally, the data flow i want is:
bayer-sensor —> csi ----> vi -----> 12bit-bayer-raw-data ----> debayer-ISP ---->yuv-data —> H264 encode —> rtsp-preview;

the ISP function which only i needed is debayer.

the rtsp is easy to me, but , i don’t know how to get H264 data from a bayer-sensor by gst or other command on Orin Platform.

Make sure the nvarguscamerasrc working then reference

to test-launch . There are steps in [Jetson Nano FAQ ] (Jetson Nano FAQ) for rtsp:

Make sure the nvarguscamerasrc working then reference

how can sure the nvarguscamerasrc working?

gst-launch-1.0 nvarguscamerasrc ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,format=(string)NV12, framerate=(fraction)30/1" ! nvvidconv ! xvimagesink sync=false

gst command:

gst-launch-1.0 nvarguscamerasrc ! "video/x-raw(memory:NVMM), width=(int)4128, height=(int)3008,format=(string)NV12, framerate=(fraction)29/1" ! nvvidconv

the message:

Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gstnvarguscamera/gstnvarguscamerasrc.cpp, execute:751 No cameras available
Chandling interrupt.
Interrupt: Stopping pipeline …
Execution ended after 0:00:14.831702090
Setting pipeline to NULL …
Freeing pipeline …

but i run v4l2-ctl command , it is success:

v4l2-ctl --set-fmt-video=width=4128,height=3008,pixelformat=RG12 --set-ctrl bypass_mode=0 --stream-skip=0 --stream-mmap --stream-count=100 --stream-to=/dev/null -d /dev/video0

It could be the dts problem.
Have search in this forum to figure it out.

it is a nice suggest, work success, thanks.

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