How to make rtsp stream with gstreamer commandline

• Hardware Platform (Jetson / GPU) Nvidia Gtx1060
• DeepStream Version 5.0
• JetPack Version (valid for Jetson only)
• TensorRT Version 7.0
• NVIDIA GPU Driver Version (valid for GPU only) 440.100
Ubuntu 18.04 x86_64

I am using this command to use detection , tracking etc. But how can i make rtsp stream like in deepstream-app example using gst commandline.

gst-launch-1.0
filesrc location= /opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! m.sink_0
filesrc location= /opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! m.sink_1
filesrc location= /opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! m.sink_2
filesrc location= /opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! m.sink_3
nvstreammux name=m batch-size=4 width=1920 height=1080 !
nvinfer config-file-path= /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary.txt batch-size=4 unique-id=1 !
nvtracker ll-lib-file=/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_mot_klt.so !
nvinfer config-file-path= /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_secondary_carcolor.txt batch-size=16 unique-id=2 infer-on-gie-id=1 infer-on-class-ids=0 !
nvmultistreamtiler rows=2 columns=2 width=1280 height=720 ! nvvideoconvert ! nvdsosd ! nveglglessink

Hi,
Please refer to

For RTSP source, you can set uri=rtsp://RTSP_ADDRESS

Actually I was trying to find out how to publish output stream as rtsp. Like we set in deepstream-app below.

[sink2]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=4
#1=h264 2=h265
codec=1
enc-type=0
sync=0
#iframeinterval=10
bitrate=400000
#H264 Profile - 0=Baseline 2=Main 4=High
#H265 Profile - 0=Main 1=Main10
profile=0
rtsp-port=8554
udp-port=5400

Hi,
By default we can run RTSP server through test-launch. Please check

It is advanced to run it in gst-launch command. There is a solution from RidgeRun:

You may contact them to get help.

1 Like