Delay in starting RTSP streaming

• NVIDIA Jetson Xavier NX Developer Kit
• L4T 35.3.1

I’m trying to setup RTSPStreaming sink for TrafficCamNet model. Model works if I use FakeSink, but I’m unable to connect to the RTSPStreaming sink

Config file
[application]
enable-perf-measurement=1
perf-measurement-interval-sec=1

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

[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI
type=3
num-sources=1
uri=file://../../streams/sample_1080p_h265.mp4
gpu-id=0

[streammux]
gpu-id=0
batch-size=1
batched-push-timeout=40000
## Set muxer output width and height
width=1920
height=1080

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

[osd]
enable=1
gpu-id=0
border-width=3
text-size=15
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Arial

[primary-gie]
enable=1
gpu-id=0
# Modify as necessary
model-engine-file=../../models/tao_pretrained_models/trafficcamnet/resnet18_trafficcamnet_pruned.etlt_b1_gpu0_int8.engine
batch-size=1
#Required by the app for OSD, not a plugin property
bbox-border-color0=1;0;0;1
bbox-border-color1=0;1;1;1
bbox-border-color2=0;0;1;1
bbox-border-color3=0;1;0;1
gie-unique-id=1
config-file=config_infer_primary_trafficcamnet.txt

[sink1]
enable=0
type=3
#1=mp4 2=mkv
container=1
#1=h264 2=h265 3=mpeg4
codec=1
#encoder type 0=Hardware 1=Software
enc-type=0
sync=0
bitrate=2000000
#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 5=Overlay
type=4
#1=h264 2=h265
codec=1
#encoder type 0=Hardware 1=Software
enc-type=1
sync=0
bitrate=4000000
#H264 Profile - 0=Baseline 2=Main 4=High
#H265 Profile - 0=Main 1=Main10
profile=0
# set below properties in case of RTSPStreaming
rtsp-port=8554
udp-port=5400

[tracker]
enable=1
# For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively
tracker-width=640
tracker-height=384
ll-lib-file=/opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
# ll-config-file required to set different tracker types
# ll-config-file=../deepstream-app/config_tracker_IOU.yml
ll-config-file=../deepstream-app/config_tracker_NvDCF_perf.yml
# ll-config-file=../deepstream-app/config_tracker_NvDCF_accuracy.yml
# ll-config-file=../deepstream-app/config_tracker_DeepSORT.yml
gpu-id=0
enable-batch-process=1
enable-past-frame=1
display-tracking-id=1

[tests]
file-loop=0

deepstream-app output
# deepstream-app -c deepstream_app_source1_trafficcamnet.txt

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

Warning: 'input-dims' parameter has been deprecated. Use 'infer-dims' instead.
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
gstnvtracker: Batch processing is ON
gstnvtracker: Past frame output is ON
[NvMultiObjectTracker] Initialized
0:00:02.405156361  1058 0xaaaaccb78cf0 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1909> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-6.2/samples/configs/tao_pretrained_models/../../models/tao_pretrained_models/trafficcamnet/resnet18_trafficcamnet_pruned.etlt_b1_gpu0_int8.engine
INFO: [Implicit Engine Info]: layers num: 3
0   INPUT  kFLOAT input_1         3x544x960       
1   OUTPUT kFLOAT output_bbox/BiasAdd 16x34x60        
2   OUTPUT kFLOAT output_cov/Sigmoid 4x34x60         

0:00:02.463601745  1058 0xaaaaccb78cf0 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2012> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-6.2/samples/configs/tao_pretrained_models/../../models/tao_pretrained_models/trafficcamnet/resnet18_trafficcamnet_pruned.etlt_b1_gpu0_int8.engine
0:00:02.472016027  1058 0xaaaaccb78cf0 INFO                 nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus:<primary_gie> [UID 1]: Load new model:/opt/nvidia/deepstream/deepstream-6.2/samples/configs/tao_pretrained_models/config_infer_primary_trafficcamnet.txt sucessfully

Runtime commands:
	h: Print this help
	q: Quit

	p: Pause
	r: Resume

NOTE: To expand a source in the 2D tiled display and view object details, left-click on the source.
      To go back to the tiled display, right-click anywhere on the window.


**PERF:  FPS 0 (Avg)	
**PERF:  0.00 (0.00)	
** INFO: <bus_callback:239>: Pipeline ready

** INFO: <bus_callback:225>: Pipeline running

**PERF:  0.00 (0.00)	
**PERF:  59.60 (58.70)	
**PERF:  51.86 (35.82)	
**PERF:  11.44 (28.47)	
**PERF:  17.61 (25.81)	
**PERF:  18.06 (24.10)	

(deepstream-app:1058): GLib-GObject-WARNING **: 11:53:58.160: g_object_get_is_valid_property: object class 'GstUDPSrc' has no property named 'pt'
**PERF:  18.68 (23.00)	
**PERF:  22.54 (22.85)	
**PERF:  20.22 (22.60)	
**PERF:  19.97 (22.18)	
**PERF:  16.26 (21.53)	

ffmpeg log
~$ ffplay rtsp://<IP>:8554/ds-test
ffplay version 5.1.2-3ubuntu1 Copyright (c) 2003-2022 the FFmpeg developers
  built with gcc 12 (Ubuntu 12.2.0-14ubuntu2)
  configuration: --prefix=/usr --extra-version=3ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=3ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libaribb24 --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc --enable-libsmbclient
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
[h264 @ 0x7f50cc005840] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f50cc005840] decode_slice_header error
[h264 @ 0x7f50cc005840] no frame!
[h264 @ 0x7f50cc005840] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x7f50cc005840] decode_slice_header error
[h264 @ 0x7f50cc005840] no frame!
[h264 @ 0x7f50cc005840] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f50cc005840] decode_slice_header error
[h264 @ 0x7f50cc005840] no frame!
[h264 @ 0x7f50cc005840] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f50cc005840] decode_slice_header error
[h264 @ 0x7f50cc005840] no frame!
[h264 @ 0x7f50cc005840] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f50cc005840] decode_slice_header error
[h264 @ 0x7f50cc005840] no frame!
[h264 @ 0x7f50cc005840] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x7f50cc005840] decode_slice_header error
[h264 @ 0x7f50cc005840] no frame!
[h264 @ 0x7f50cc005840] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f50cc005840] decode_slice_header error
[h264 @ 0x7f50cc005840] no frame!
[h264 @ 0x7f50cc005840] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f50cc005840] decode_slice_header error
[h264 @ 0x7f50cc005840] no frame!
[h264 @ 0x7f50cc005840] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f50cc005840] decode_slice_header error
[h264 @ 0x7f50cc005840] no frame!
[h264 @ 0x7f50cc005840] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x7f50cc005840] decode_slice_header error
[h264 @ 0x7f50cc005840] no frame!
[h264 @ 0x7f50cc005840] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f50cc005840] decode_slice_header error
[h264 @ 0x7f50cc005840] no frame!
[h264 @ 0x7f50cc005840] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f50cc005840] decode_slice_header error
[h264 @ 0x7f50cc005840] no frame!
[h264 @ 0x7f50cc005840] non-existing PPS 0 referenced    0B f=0/0   

Ah, I see. It seems that the stream starts some time after launching the deepstream-app. Is this a bug? Or is it supposed to be like that? It obviously hinders usability because I receive (in deepstream-app output) the stream link 10-15 seconds before the stream actually starts

  1. from the logs, the player can’t get PPS which is a part of keyframe and used to decode. as you know, there are keyframes and non-keyframes, the player will decode failed if only receiving non-keyframes.
  2. some player will buffer the stream. it will show the video after some time, you can try EglSink.
  3. to narrow down this issue, you can use the network tool to check if the stream packets are already arrived.

So it’s OK to receive non-keyframes during app lifetime?

**There is no update from you for a period, assuming this is not an issue any more.

Hence we are closing this topic. If need further support, please open a new one.

Thanks.**
only after receiving keyframes, the palyer starts to decoding successfully; if only receiving non-keyframes, the palyer will always decode failed.

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