GStreamer Pipelines for Encoding RAW10 Monochrome Video

I currently have an IMX335 camera successfully streaming RAW10 monochrome video to my Jetson Xavier NX that runs Jetson Linux R32.6.1. I wonder if there are any recommendations of GStreamer pipelines (color space translation in particular) for hardware accelerated video encoding (h265 for example) for this setup. Thanks in advance!

Hi,
For hardware encoder, the supported formats are YUV420 8-bit and 10-bit. So you would need to convert RAW10 to either format.

Please share your command for getting RAW10 frame data from the camera sensor for reference. So that we can check and suggest next.

Thanks for the reply, I have a few follow-up questions:

  1. I’m using nvarguscamerasrc as the first module in my GStreamer pipeline. According to gst-inspect-1.0, nvarguscamerasrc should support both NV12 and P010_LE. However, it seems that only NV12 is actually supported in my testing. Is this the case or I am doing something wrong?
  2. According to the Accelerated GStreamer Guide, the gst-omx plugin is deprecated. Does that mean we should develop applications based on the gst-v4l2 plugin?
  3. I followed the 10-bit H.265 encode and decode example in the Accelerated GStreamer Guide and they seem to be working properly:
    gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)2616, height=(int)1964, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)P010_10LE' ! nvv4l2h265enc bitrate=8000000 ! h265parse ! qtmux ! filesink location=test.mp4 -e
    gst-launch-1.0 filesrc location=test.mp4 ! qtdemux ! queue ! h265parse ! nvv4l2decoder ! nvvidconv ! 'video/x-raw(memory:NVMM), format=NV12' ! nv3dsink -e
    I would love any feedbacks and suggestions.
  4. Are there any GStreamer plugins for displaying monochrome videos? I’ve been using nvoverlaysink, which has a red tint.

Hi,
NV12 is supported in nvarguscamerasrc. So in the pipeline:

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)2616, height=(int)1964, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)P010_10LE' ! nvv4l2h265enc bitrate=8000000 ! h265parse ! qtmux ! filesink location=test.mp4 -e

Frame data of the source is YUV420 8 bit and nvvidconv plugin converts it to YUV420 10 bit. P010_LE is added for experimental purpose and it may not work properly. Please set to NV12 in nvarguscamerasrc plugin.

Is the 10-bit YUV420 format that you’re referring to I420_10LE in NVIDIA terms?

Hi,
It should be P010_10LE, which is NV12 10-bit.

Is P010_10LE monochrome or chromatic? Also are there any video sinks that can display monochrome video streams?