RTSP sink in docker deepstream on Jetson Nano, can't open inside VLC

• Hardware Platform (Jetson)
• DeepStream Version*deepstream-l4t 5.0.1-20.09-samples
• JetPack Version (4.5)
• TensorRT Version*7.1.3.0
• Issue Type( questions)

At the moment I’m trying to use a rtsp sink stream on my jetson nano and open it with the VLC Player. Unfortunatly it is not working. If I try to open the rtsp stream I get a black window in VLC and after a few seconds the vlc player is stop working.

I use deepstream in a docker container and it is working fine for an egl sink.
I start the container with the following command and get an error. Which is due to the –net=host I think.

sudo docker run -p 8554:8554 -it --rm --net=host --runtime nvidia -v /home/nano/Dokumente/deepstream:/deepstream -e DISPLAY=$DISPLAY -w /deepstream -v /tmp/.X11-unix/:/tmp/.X11-unix nvcr.io/nvidia/deepstream-l4t:5.0.1-20.09-samples

Error:
WARNING: Published ports are discarded when using host network mode

Then I start the config file and get the following Information.

DeepStream: Launched RTSP Streaming at rtsp://localhost:8554/ds-test

My config file:

[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5
#gie-kitti-output-dir=streamscl

[tiled-display]
enable=0
rows=1
columns=1
width=1280
height=720
gpu-id=0
#(0): nvbuf-mem-default - Default memory allocated, specific to particular platform
#(1): nvbuf-mem-cuda-pinned - Allocate Pinned/Host cuda memory, applicable for Tesla
#(2): nvbuf-mem-cuda-device - Allocate Device cuda memory, applicable for Tesla
#(3): nvbuf-mem-cuda-unified - Allocate Unified cuda memory, applicable for Tesla
#(4): nvbuf-mem-surface-array - Allocate Surface Array memory, applicable for Jetson
nvbuf-memory-type=0

[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
uri=file://…/…/streams/testfahrt1.mp4
num-sources=1
#drop-frame-interval=2
gpu-id=0
cudadec-memtype=0

[sink0]
enable=0
#Type - 1=FakeSink 2=EglSink 3=File
type=2
sync=0
source-id=0
gpu-id=0
nvbuf-memory-type=0

[sink1]
enable=0
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=3
#1=mp4 2=mkv
container=1
#1=h264 2=h265
codec=1
#encoder type 0=Hardware 1=Software
enc-type=0
sync=0
#iframeinterval=10
bitrate=4000000
#H264 Profile - 0=Baseline 2=Main 4=High
#H265 Profile - 0=Main 1=Main10
profile=0
output-file=out.mp4
source-id=0

[sink2]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=4
#1=h264 2=h265
codec=1
#encoder type 0=Hardware 1=Software
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

[osd]
enable=1
gpu-id=0
border-width=1
text-size=15
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Serif
show-clock=1
clock-x-offset=800
clock-y-offset=820
clock-text-size=12
clock-color=1;0;0;0
nvbuf-memory-type=0

[streammux]
gpu-id=0
live-source=0
batch-size=1
##time out in usec, to wait after the first buffer is available
##to push the batch even if the complete batch is not formed
batched-push-timeout=-1
width=1280
height=720
##Enable to maintain aspect ratio wrt source, and allow black borders, works
##along with width, height properties
enable-padding=0
nvbuf-memory-type=0

[primary-gie]
enable=1
gpu-id=0
model-engine-file=…/…/models/mobilenetv2_4classes/model.engine
batch-size=1
#Required by the app for OSD, not a plugin property
bbox-border-color0=1;0;0;1
bbox-border-color1=255;100;20;1
bbox-border-color2=255;0;0;1
bbox-border-color3=0;128;0;1
bbox-border-color4=255;255;0;1
interval=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary_ssd.txt

[tests]
file-loop=0

Question:

Is it a problem with the connection between docker and the host due to the --net=host?

Is it even possible to use -p 8554:8554 with --net=host?
I use these because for the normal docker deepstream 5.0 version in NGC weh have the following information:

to enable RTSP out, network port needs to be mapped from container to host to enable incoming connections using the -p option in the command line; eg: -p 8554:8554

Cheers

Hi,
Hardware acceleration is not enabled in VLC. We suggest run gstreamer pipeline like:

gst-launch-1.0 uridecodebin ! nvoverlaysink

i don’t think i understand enough, so to me it looks like the actual questions weren’t addressed.

i’m running into the same problem at the moment, so i’m afraid it won’t be much help there, however i did try to startup docker using --net=host and -p 8554:8554 and saw this on the output:

sudo docker run -it -d --runtime nvidia --net=host --device /dev/video0 -p 8554:8554 --name joda -v /tmp/.X11-unix/:/tmp/.X11-unix nvcr.io/nvidia/deepstream-l4t:5.1-21.02-samples
WARNING: Published ports are discarded when using host network mode

so that might be one answer.

I also noticed that i can access the stream on the Jetson itself using :
smplayer rtsp://localhost:8554:8554/ds-test
and
smplayer rtsp://172.17.0.1:8554/ds-test
and
smplayer rsp://192.168.2.4:8554/ds-test
(where 172.17.0.1 is the ip address of the docker network interface.
and 192.168.2.4 is the ip address of the eth0 interface.)
but not using vlc

however i cannot access any of those from outside of the box.
it maybe that vlc just doesn’t like the encoding (or perhaps that is what @DaneLLL is trying to tell us, and i’m to thick to understand where the gst-launch-1.0 fits into the deepstream-app picture)

update: looks like it is just VLC that doesn’t like the standard rtsp stream from deepstream-app . i just installed IINA on my mac ( a different video player that supports streams) and pointed it to rtsp://192.168.2.4:8554/ds-test and it started working…
I hope this helps

Hi,
Please apply this and try again:
VLC Media Player Crashes - #4 by Honey_Patouceul

Sorry for my inactivity @DaneLLL and @tomschuring .

It is working on the Jetson Nano when I use Gstreamer with your advice @DaneLLL. I used following gstreamer pipeline.

gst-launch-1.0 uridecodebin uri=rtsp://localhost:8554/ds-test ! nvoverlaysink overlay-w=640 overlay-h=480 overlay=1 sync=0

At first I had very poor video quality and every few seconds the video stutters. With the sync=0 I resolved the stutter issue and with a higher bitrate in the deepstream-config I achieved a better video quality.

Thanks @tomschuring for the advice with the SMPlayer. It is working on my Laptop with Windows10 too. But know I have also the problem that every 3-4 seconds the SMPlayer is buffering.
Do you have the same issue?