The RTSP output from nvrtspoutsinkbin is not accessible inside docker container

Hardware Platform (Jetson / GPU) - Jetson orin nano
• DeepStream Version - 7.0
• TensorRT Version - 8.6.2.3
• CUDA - 12.2
• Issue Type( questions, new requirements, bugs) - Question

Hi, I am using nvrtspoutsinkbin plugin as a sink to get the processed stream out using the rtsp url, when I run locally in the device, and try to play the output RTSP url in the VLC, it works.

However, when I run the pipeline, inside the container (using deepstream 7.0 image) as the network attached to the host, I am having issue playing the same RTSP url in the VLC. It is not working, Any idea/suggestion how I can fix this?

And one more thing, is this nvrtspoutsinkbin depreciated now, I couldn’t find anything related this in the new deepstream documentation.
And is this the optimal way to do this or is there any better way to get the processed stream’s Output RTSP url. All I need is to get a working RTSP url for processed stream and play it using VLC while the pipeline is running inside the container in the jetson device? Thanks in advance

This problem is usually caused by the network inability of docker to connect to the host.

How do you start docker? Did you add the --network=host parameter?

I can use vlc to play the rtsp stream output by docker in the host

You can continue to use nvrtspoutsinkbin, or you can also refer to create_udpsink_bin in /opt/nvidia/deepstream/deepstream/sources/apps/apps-common/src/deepstream_sink_bin.c.

nvrtspoutsinkbin is used for graphcomposer, not a public plugin, so some issues may not be solved in time.

Yes, I have used the host network to start the docker, But it doesn’t work.
Can I able to print a log for output RTSP url inside the docker container terminal?, I am running compiled c++ pipeline

Please make sure the following command line works properly

gst-launch-1.0 filesrc location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! nvrtspoutsinkbin

Use ffplay play rtsp stream in host

ffplay rtsp://host-ip:8554/ds-test   

getting this error when I run the pipeline inside the docker. can you help me with this?

Note that you are using Orin nano, which does not support hardware encoding. Try the following command line to use software encoding. But please install x264enc first.

apt-get update
apt-get install -y gstreamer1.0-libav
# ubuntu 22.04
apt-get install --reinstall -y gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly  libswresample-dev libavutil-dev libavutil56 libavcodec-dev libavcodec58 libavformat-dev libavformat58 libavfilter7 libde265-dev libde265-0 libx265-199 libx264-163 libvpx7 libmpeg2encpp-2.1-0 libmpeg2-4 libmpg123-0


gst-launch-1.0 filesrc location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! nvrtspoutsinkbin enc-type=1

Hey Thanks, pipeline works now

However I still have issue viewing the rtsp stream in VLC on my local computer,
for you info, my orin nano and local computer are on the same network, and I am accessing the device through ssh in my vscode and by forwarding rtsp port , I am trying to play in my vlc

This is rtsp url formar I used in vlc - rtsp://host-ip:8554/ds-test

Where do I start to fix this issue?

How do you start docker? Can you share the command line?

Also, host-ip refers to the ip of the host where you run docker, You can view it with ifconfig and please use ffplay to test.

Command to start the docker

sudo docker run --rm --privileged --network host --runtime=nvidia --env-file .env test:3.0

I ran the pipeline command by going inside the container bash terminal

And when I tried to run ffplay command, This is what I got

I don’t understand why the rtsp-server returns 404, the ds-test endpoint should exist

If ffplay and gst-launch-1.0 are run on the same device, it works. But when you run ffplay on another device, it doesn’t work? I can’t think of any other reason besides network issues

This works with the different RTSP port now. And also in the pipeline there was a element not properly loaded, so it’s working now when tried to fix it.

Thanks for the help and support!

Glad to hear that, thanks.

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