How do I push a udpsrc live stream via Gstreamer to RTSP?

Hi guys
So I was wondering, Is there a way to convert the following udpsrc streaming codes into a RTSP stream?

These are the codes that I currently use,

Transmitting code:

gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)60/1' ! nvv4l2h265enc maxperf-enable=1 bitrate=8000000 iframeinterval=40 preset-level=1 control-rate=1 ! h265parse ! rtph265pay config-interval=1 ! udpsink host= localhost port=5000 sync=false async=false

Receiving code:

gst-launch-1.0 -vvv udpsrc port=5000 ! application/x-rtp,encoding-name=H265,payload=96 ! rtph265depay ! h265parse ! queue ! avdec_h265 ! autovideosink sync=false async=false -e

Any help will be much appreciated!

Hi,
Does cleaning the cache help you?
https://devtalk.nvidia.com/default/topic/1068271/jetson-nano/udpsrc-not-recognised-at-gstreamer-in-ubuntu/post/5410861/#5410861

For RTSP streaming, you may try test-launch.
https://devtalk.nvidia.com/default/topic/1043770/jetson-tx2/problems-minimizing-latency-and-maximizing-quality-for-rtsp-and-mpeg-ts-/post/5295828/#5295828

And also a similar post:
https://devtalk.nvidia.com/default/topic/1063969/jetson-nano/how-do-i-receive-rtsp-live-stream-from-a-different-computer-/post/5388429/#5388429

Hi DaneLLL,

Thank you for the help! For the first post, cleaning the cache did not help. I suspect because that was running ubuntu on a desktop computer as I wanted to use Gstreamer to receive the live stream. I have reformatted the SSD and will be install Gstreamer again.

As for the RTSP streaming, I have downloaded this streaming engine called wowza on the nano. However it seems to take up alot of RAM space running the engine here so I may have to switch back to test-launch. Is there anyway where I am able to edit the test-launch folder to suit my project needs?

Once again, Thank you for all the help! Really appreciate it :)

Also, for the udpsrc stream that I am using,

gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)60/1' ! nvv4l2h265enc maxperf-enable=1 bitrate=8000000 iframeinterval=40 preset-level=1 control-rate=1 ! h265parse ! rtph265pay config-interval=1 ! udpsink host= localhost port=5000 sync=false async=false

Will I be able to wrap this entire pipeline with the test-launch? So it would look something like :

./test-launch "gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1280,\
 height=(int)720, format=(string)NV12, framerate=(fraction)60/1' ! nvv4l2h265enc maxperf-enable=1 \
bitrate=8000000 iframeinterval=40 preset-level=1 control-rate=1 ! h265parse ! rtph265pay config-\
interval=1 ! udpsink host= localhost port=5000 sync=false async=false "

Or do I have to change udpsrc to rtspsrc?

Thank you! :>

Hi,
The string should end in rtph265pay(or rtph264pay if you use h264 encoder).

nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)60/1' ! nvv4l2h265enc maxperf-enable=1 bitrate=8000000 iframeinterval=40 preset-level=1 control-rate=1 ! h265parse ! rtph265pay config-interval=1

There is a known issue in using nvv4l2h264enc/nvv4l2h265enc in test-lauch:
https://devtalk.nvidia.com/default/topic/1064110/
You may apply the patch to rebuild libgstnvvideo4linux2.so

Hi DaneLLL,

Thank you for the prompt reply!

How would I apply the new patch to rebuild libgstnvvideo4linux2.so?

Also, if I may ask, I have a ubuntu PC(not the jetson nano) running Gstreamer to receive the live stream feed from my Jetson Nano. However on the PC, I ran into some GStreamer error which I was hoping you’d know how to solve.

When I run the simple video test code:

gst-launch-1.0 videotestsrc ! autovideosink

I get this error :

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Got context from element 'autovideosink0-actual-sink-vaapi': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayGLX\)\ vaapidisplayglx1";
Setting pipeline to PLAYING ...
New clock: GstSystemClock

And nothing plays. However when I replace autovideosink with glimagesink, it works :

gst-launch-1.0 videotestsrc ! glimagesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

Why can’t the autovideosink work?
Again, Thank you for the help

Hi,
You can find source code packages in download center:
https://developer.nvidia.com/embedded/downloads#?search=source

The fix is included in r32.3.1. Or you may upgrade to the release.