Grayscale RTSP Stream (nvarguscam)

Hello,

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!

Hi,
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.

Hi,

Raspberry Pi Noir V2 Cam

DaneLLL via NVIDIA Developer Forums <notifications@nvidia.discoursemail.com>, 1 Şub 2023 Çar, 07:02 tarihinde şunu yazdı:

Hi,
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.

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

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

Raspberry Pi Noir V2 Cam is not supported.

Try:

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 ;-)

Server:

./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://127.0.0.1:8554/test 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
and
NVIDIA Jetson nanoで 4Kカメラは扱えるか? GPU(CUDA)を使った魚眼レンズ補正処理の性能を徹底検証 | 育児×家事×IoT (mydns.jp)

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 <notifications@nvidia.discoursemail.com> şunu yazdı:

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