Rtsp Sink not working inside docker container

Please provide complete information as applicable to your setup.

• Hardware Platform Nvidia GPU
• DeepStream Version 3.6
• TensorRT Version
**• NVIDIA GPU Driver Version 530.30.02 **
• Issue Type bug
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
I am Currently trying to run a sample example deepstream application and trying to generate rtsp stream as output. I am running nvidia-deepstream inside docker container

Docker Image used : nvcr.io/nvidia/deepstream:6.3-triton-multiarch
Docker run command used : docker run --gpus all --net=host -it --rm -e DISPLAY=$DISPLAY --device /dev/snd -v /tmp/.X11-unix/:/tmp/.X11-unix -v ./sample-project/:/opt/nvidia/deepstream/deepstream/sources/project -w /opt/nvidia/deepstream/deepstream/sources/project nvcr.io/nvidia/deepstream:6.3-triton-multiarch

I am following steps mentioned in this blog NVIDIA Deepstream Quickstart. Run full YOLOv4 on a Jetson Nano at 22… | by Victor Sonck | ML6team

I have configured the source properly, and the application works perfectly for file sink
But as soon as I change the sink to rtsp (sink=4) the application says the rtsp stream has been started (rtsp://localhost:8554/ds-test) successfully but I cannot access the stream using either vlc or ffmpeg

I have already checked network connectivity (docker container running as net=host), port busy issues, and even tried to access the stream from within the container using gstreamer gst-launch-1.0 uridecodebin uri=rtsp://localhost:8554/ds-test
but still doesn’t work

Everywhere it gives me same error 503 Service Unavailable.

Following is my config file
[application]
enable-perf-measurement=1
perf-measurement-interval-sec=1

[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=4
uri=rtsp://localhost:8555/sample
num-sources=1
gpu-id=0
cudadec-memtype=0

[streammux]

live-source=0
batch-size=1

batched-push-timeout=40000

width=1280
height=720

[primary-gie]
enable=1
model-engine-file=…/engines/resnet10.caffemodel_b30_gpu0.engine

batch-size=1
interval=0

gie-unique-id=1
config-file=model_basic.txt

[tiled-display]
enable=1
rows=1
columns=1
width=1280
height=720

[osd]
enable=1
border-width=2
text-size=15
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Serif

[sink0]
enable=1
type=3

container=1

codec=1

enc-type=0
sync=0
bitrate=2000000

profile=0
output-file=output.mp4
source-id=0

[sink1]
enable=1

type=4

container=2
#1=h264 2=h265 3=mpeg4

codec=1
sync=0
bitrate=4000000

source-id=0
rtsp-port=8554
udp-port=5400

[tests]
file-loop=0

I have also tried other sample applications provided inside the container and in the documentation, and all of them give the same error, so its probably not an issue with config file.
Is it an issue with the deepstream docker container?

Please help me I am stuck at a deadend

  1. please enable [sink2] in /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt, then try deepstream-app -c source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt, then share the output log.
  2. is 8554 taken by other apps?

The pipeline runs perfectly, I even get the displayed output of Passengers and Cars recognition.
But when I try to play the output rtsp stream (rtsp://localhost:8554/ds-test) using ffplay, It gets stuck for a while and then I get this error

[rtsp @ 0x7f9278000b80] method DESCRIBE failed: 503 Service Unavailable
rtsp://localhost:8554/ds-test: Server returned 5XX Server Error reply

Also I have made sure no other application or process is using the tcp port 8554.

  1. please share the test log. wondering if there is some special printings.
  2. can you check if the 8554 is take by deepstream-app in container? if yes, can you use gst-discoverer-1.0 or ffprobe to test the rtsp url?
  3. if still can’t work, please try other RTSP port.

I get these warnings as I start the deepstream-app :

(gst-plugin-scanner:114): GStreamer-WARNING **: 03:43:56.094: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_udp.so’: librivermax.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:114): GStreamer-WARNING **: 03:43:56.098: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmpeg2dec.so’: libmpeg2.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:114): GStreamer-WARNING **: 03:43:56.100: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmpg123.so’: libmpg123.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:114): GStreamer-WARNING **: 03:43:56.103: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstchromaprint.so’: libavcodec.so.58: cannot open shared object file: No such file or directory

(gst-plugin-scanner:114): GStreamer-WARNING **: 03:43:56.127: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopenmpt.so’: libmpg123.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:114): GStreamer-WARNING **: 03:43:56.152: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmpeg2enc.so’: libmpeg2encpp-2.1.so.0: cannot open shared object file: No such file or directory

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

WARNING: [TRT]: CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See CUDA_MODULE_LOADING in 1. Introduction — CUDA C Programming Guide
WARNING: …/nvdsinfer/nvdsinfer_model_builder.cpp:1487 Deserialize engine failed because file path: /opt/nvidia/deepstream/deepstream-6.3/samples/configs/deepstream-app/…/…/models/Secondary_CarMake/resnet18.caffemodel_b16_gpu0_int8.engine open error
0:00:02.706939911 113 0x56367f122550 WARN nvinfer gstnvinfer.cpp:679:gst_nvinfer_logger:<secondary_gie_2> NvDsInferContext[UID 6]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1976> [UID = 6]: deserialize engine from file :/opt/nvidia/deepstream/deepstream-6.3/samples/configs/deepstream-app/…/…/models/Secondary_CarMake/resnet18.caffemodel_b16_gpu0_int8.engine failed
0:00:02.732119772 113 0x56367f122550 WARN

But it runs perfectly thereafter, displaying PERF of the model, and I even get the popup with car and passengers recognized

The problem remains same when I try to read rtsp stream I get the same error
[rtsp @ 0x7f9278000b80] method DESCRIBE failed: 503 Service Unavailable
rtsp://localhost:8554/ds-test: Server returned 5XX Server Error reply

As I am running the container on host network mode I am pretty sure the port is not used by any other process

Update: I have also tried running it on different port (8556) but I get the same issue as before

no narrow down the issue, please do some tests.

  1. when deepstream-app is running, can you use this command to test in container? will the printing refresh?
    sudo tcpdump -v host 224.224.255.255
  2. if using filesink, can the output file play? wondering if the encoding is fine.

The tcpdump command gives this as output
host.docker.internal.51017 > 224.224.255.255.5400: UDP, length 1354
08:52:56.086316 IP (tos 0x0, ttl 1, id 10202, offset 0, flags [DF], proto UDP (17), length 1373)
host.docker.internal.51017 > 224.224.255.255.5400: UDP, length 1345
08:52:56.118051 IP (tos 0x0, ttl 1, id 10204, offset 0, flags [DF], proto UDP (17), length 1428)
host.docker.internal.51017 > 224.224.255.255.5400: UDP, length 1400
08:52:56.118089 IP (tos 0x0, ttl 1, id 10205, offset 0, flags [DF], proto UDP (17), length 273)
and keeps on printing till the app stops

Yes I am unable to play the out.mp4 file generated, when I run app with file sink enabled

seems it is related to encoding.

  1. what is the GPU device model?
  2. please test this command, then share the 1.log and test.264.
    gst-launch-1.0 filesrc location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! nvvideoconvert ! video/x-raw\(memory:NVMM\),format=I420 ! nvv4l2h264enc bitrate=1000000 ! filesink location=test.264 >1.log 2>1.log

Nvidia GPU Model : NVIDIA GeForce GTX 1650/PCIe/SSE2

1.log output :
Setting pipeline to PAUSED …
Pipeline is PREROLLING …
Redistribute latency…
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Got EOS from element “pipeline0”.
Execution ended after 0:00:00.929473533
Setting pipeline to NULL …
Freeing pipeline …

test.264 output is complete gibberish

test.264 is H264 data. you can read it by H264 analysis tool, wondering if it can be decoded.

Yes I am able to play it with vlc media player. Its playing properly

could you share more logs? please restart the app by this command “export GST_DEBUG=6 && deepstream-app -c xx.txt >1.log 2>1.log”, then test playing RTSP in the docker container. then share the 1.log. you can compress the log by zip.

1.log (4.0 MB)
log file after running the application

sorry, xx.txt is only a sample. please replace xx.txt with your actual configuration file.

These are the logs after running the application with given config file
log.zip (83.7 MB)

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

dpsrc gstudpsrc.c:1557:gst_udpsrc_open:e[00m bound, on port 5400
udpsrc gstudpsrc.c:875:gst_udpsrc_fill:e[00m doing select, timeout -1

Sorry for the late reply, Is this still an DeepStream issue to support? Thanks!
from the logs, rtspserver can’t receive data from port 5400 because there is no “gst_udpsrc_fill:^[[00m read packet of 1400 bytes” this kind of printing.

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