Capture TPG using Gstreamer

Hi,

I am trying to run test pattern generator(TPG) on TX2. I follow this TPG as reference and successfully capture data in .raw format using v4l2-ctl. As per tpg driver(tpg_t18x.c) the tpg only support two v4l2 pixel formats V4L2_PIX_FMT_SRGGB10 (RG10) and V4L2_PIX_FMT_RGB32 (RGB4).

When i tried to capture using Gstreamer i get this:

desktop:~$ gst-launch-1.0 -v v4l2src device="/dev/video4" ! video/x-raw,format=RGB4 ! videoconvert ! queue ! x264enc ! video/x-h264 ! matroskamux ! filesink location=file.mp4 -e

WARNING: erroneous pipeline: could not link v4l2src0 to videoconvert0, neither element can handle caps video/x-raw, format=(string)RGB4

As RG10 and RGB4 not supported in Gstreamer. Is there any way to capture TPG data using Gstreamer?
Can i debug the NVCSI and VI using TPG?

Please help us to solve the issue.

Regards,
Vikas Dwivedi

Hi,
Since captured frames are in raw format and you need to do debayering or format conversion, we suggest use jetson_multimedia_api. Please take a look at

/usr/src/jetson_multimedia_api/samples/v4l2cuda

If you can customize the sample to capture raw frames, you can create NvBuffer in YUV420 or NV12, convert the raw data into the NvBuffer through, and then can use NvVideoEncoder to get H264 stream.

In the gstreamer pipeline, it looks like videoconvert plugin does not support RGB4 to I420 conversion and exits with error.