RTSP Streaming via OpenCV

I’m developing a RTSP streaming system using Jetson-Nano.
My design is as followings.

  1. Get video from gstreamer pipeline into OpenCV
  2. processing images using OpenCV function
  3. Streaming processed image

I already completed step 1 and 2.
But I suffer from 3rd step.
I’m thinking of passing the processed image to cv :: VideoCapture and streaming RTSP with gstreamer.
So, I created a VideoCapture variable initialized with pipeline(this pipeline is another one using input).
the pipeline is "appsrc, videoconvert, encode, rtppay and sink for streaming.
I confirmed streaming is done.But the streaming is very slow(delay about 5 secs).
In my analysis, the cause is videoconvert in gstreamer.
I want to use nvvidconv or nvvideoconvert. But these element cannot receive RGB or BGR format.
And videocapture in OpenCV can treat only 3 channels format(RGB or BGR…, cannot treat RGBA format and so on).

How can I stream using nvvidconv or nvvideoconvert?
(Or is there any other good way to convert format?)

Hello, I don’t really have an answer to your question but I too am trying to do a RTSP stream on the nano and use openCV to receive that stream!

If I may, could I ask what server do you use for your RTSP stream and what streaming pipeline you use to start streaming?

This is my thread and all the codes I use are there : https://devtalk.nvidia.com/default/topic/1064849/trying-to-get-ultra-low-live-streaming-latency-lt-100ms-on-the-drone-using-nano/?offset=9#5392817

Thank you!

Thank you for your fast reply and threads!

I made a system with reference to DeepStream.
In DeepStream, once streamed with UDP, it is received by itself and re-streamed with RTSP.
RTSP streaming reference is ‘test-launch.c’ in this site([url]https://github.com/GStreamer/gst-rtsp-server/tree/master/examples[/url])
And my input is usb camera, so I’m using v4l2src element.

Hi sdaktoo:

 could you share you step3 command? "appsrc, videoconvert, encode, rtppay and sink for streaming."

thank you

I think I found the solution to your question, the code is on this topic.
I hope it will help you.