Grayscale RTSP Stream (nvarguscam)


I’m trying to add gray scale for my rtsp stream which i created with gstreamer.I know with H264 it’s not possible and tried to convert stream before decoding. Can you help me with this ?

This pipelines didn’t work for me

./test-launch “nvarguscamerasrc ! video/x-raw(memory:NVMM),format=(string)GRAY8,width=1920,height=1080,framerate=30/1 ! videoconvert ! ‘video/x-raw, format=(string)I420’ ! nvvidconv ! nvv4l2h264enc insert-vui=1 ! h264parse ! rtph264pay name=pay0”

** ./test-launch "nvarguscamerasrc ! video/x-raw(memory:NVMM),format=NV12,width=1920,height=1080,framerate=30/1 ! nvvidconv ! videoconvert ! video/x-raw, format=GRAY8! omxh264enc ! h264parse ! rtph264pay name=pay0**

Thanks a lot!

Please share what camera you are using. GRAY8 is not supported in nvaguscamerasrc so it may not be used in this use-case. Would need information about the camera so that we can suggest next.


Raspberry Pi Noir V2 Cam

DaneLLL via NVIDIA Developer Forums <>, 1 Şub 2023 Çar, 07:02 tarihinde şunu yazdı:

The camera is not supported by default. You would need to modify device tree and enable sensor driver first. Please check sensor driver programming guide in developer guide.

Raspberry Pi V2 camera is supported by default.

I am a little confused ,you said that my camera is supported,so what should i do now ?

The supported camera is
Buy a Raspberry Pi Camera Module 2 – Raspberry Pi

Raspberry Pi Noir V2 Cam is not supported.


Google is your friend

I’ve tried it before . I know Google is my friend :)

I have an Adafruit RPi v2 IMX219 NoIR that has same hardware as the standard one but without the IR filter.
This may result in wrong colors without a modified ISP conf, but it may be ok for trying with grayscale if you can use it in normal NV12 color mode.

The following seems working (on Xavier NX running R35.2.1) : first converting to monochrome then encoding into JPG for rtpjpeg, but not sure it is reliable,…you may only try it if your application is not critical and if you have some time to waste ;-)


./test-launch "nvarguscamerasrc ! video/x-raw(memory:NVMM),format=NV12,width=1920,height=1080,framerate=30/1 ! nvvidconv compute-hw=GPU ! video/x-raw(memory:NVMM),format=GRAY8 ! nvvidconv ! video/x-raw,format=I420 ! nvjpegenc ! image/jpeg,format=MJPG ! rtpjpegpay name=pay0"

Local Jetson receiver (Note switching to TCP transport):

gst-launch-1.0 rtspsrc protocols=tcp location=rtsp:// latency=0 ! rtpjpegdepay ! image/jpeg,format=MJPG ! nvv4l2decoder mjpeg=1 ! nvvidconv ! nv3dsink

Is the problem that the camera does not work? or that grayscale does not work?

I don’t have the hardware to test this. If it is an issue with gray8 format, you could try writing a CUDA filter that removes chrominance via nvivafilter

These articles helped me:
Live streaming from Jetson TX2 with custom CUDA filters (Part I) | by Alex Yang Ph.D. | Medium
NVIDIA Jetson nanoで 4Kカメラは扱えるか? GPU(CUDA)を使った魚眼レンズ補正処理の性能を徹底検証 | 育児×家事×IoT (

Better yet, take a look at this:
Jetson TX1 TX2 ISP Control with Nvcamerasrc | Jetson ISP Converter - RidgeRun Developer Connection

The problem is grayscale not working when i stream(rtsp) with h264.

Out of this case, grayscale work.

I can also stream(rtsp) without grayscale.Today i will try these and let you know.

Many thanks !

2 Şub 2023 Per, saat 06:10 tarihinde Mhd0425 via NVIDIA Developer Forums <> şunu yazdı:

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