How i add correct rtsp uri of camera in Deepstream reference app?

RTX 3060
Deepstream 6.1

i have new camera ezviz C3TN not good but i want to use for input stream in deepstream_app_source1_detection_models.txt .

this rtsp://192.168.18.65:554 work in VLC but here I got error so I add channel at the end rtsp://192.168.18.65:554/h.264/channel=1 of this uri then it got me the following black OSD .
also check my different combinations.

  1. rtsp://admin:HPAIWD@192.168.18.65:554/channel=1
  2. rtsp://admin:HPAIWD@192.168.18.65:554/cam/realmonitor?channel=1&subtype=0
  3. rtsp://192.168.18.65:554/user=admin&password=HPAIWD&channel=1
deepstream-app -c deepstream_app_source1_detection_models.txt 
** WARN: <parse_source:622>: Unknown key 'uri:rtsp://admin:HPAIWD@192.168.18.65:554/h.264/channel' for group [source0]

(deepstream-app:2951525): GLib-CRITICAL **: 18:14:49.242: g_str_has_prefix: assertion 'str != NULL' failed

** (deepstream-app:2951525): CRITICAL **: 18:14:49.242: gst_rtsp_url_parse: assertion 'urlstr != NULL' failed

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

Unknown or legacy key specified 'is-classifier' for group [property]
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:01.667942058 2951525 0x5651b9fe0150 INFO                 nvinfer gstnvinfer.cpp:646: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.1/samples/models/tao_pretrained_models/yolov4/new/yolov4_resnet18_epoch_070.etlt_b1_gpu0_fp32.engine
WARNING: [TRT]: The getMaxBatchSize() function should not be used with an engine built from a network created with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag. This function will always return 1.
INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:610 [Implicit Engine Info]: layers num: 5
0   INPUT  kFLOAT Input           3x384x1248      
1   OUTPUT kINT32 BatchedNMS      1               
2   OUTPUT kFLOAT BatchedNMS_1    200x4           
3   OUTPUT kFLOAT BatchedNMS_2    200             
4   OUTPUT kFLOAT BatchedNMS_3    200             

0:00:01.770388018 2951525 0x5651b9fe0150 INFO                 nvinfer gstnvinfer.cpp:646: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.1/samples/models/tao_pretrained_models/yolov4/new/yolov4_resnet18_epoch_070.etlt_b1_gpu0_fp32.engine
0:00:01.773441541 2951525 0x5651b9fe0150 INFO                 nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus:<primary_gie> [UID 1]: Load new model:/opt/nvidia/deepstream/deepstream-6.1/samples/configs/tao_pretrained_models/nvinfer_config.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:194>: Pipeline ready

ERROR from src_elem0: Resource not found.
Debug info: gstrtspsrc.c(7884): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin0/GstRTSPSrc:src_elem0:
No valid RTSP URL was provided
** INFO: <reset_source_pipeline:1579>: Resetting source 0
ERROR from src_elem0: Resource not found.
Debug info: gstrtspsrc.c(7884): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin0/GstRTSPSrc:src_elem0:
No valid RTSP URL was provided
**PERF:  0.00 (0.00)	
**PERF:  0.00 (0.00)	
**PERF:  0.00 (0.00)	
**PERF:  0.00 (0.00)	
**PERF:  0.00 (0.00)	
**PERF:  0.00 (0.00)	
**PERF:  0.00 (0.00)	
**PERF:  0.00 (0.00)	
**PERF:  0.00 (0.00)	
Quitting
[NvMultiObjectTracker] De-initialized
App run successful

I tried a different combinations but the same error black OSD and the above log.
please kindly solve this problem.

Can you post your " deepstream_app_source1_detection_models.txt " file?

According to the tool from the page Connect to Ezviz cameras (ispyconnect.com), the rtsp URL for your camera should be rtsp://admin:admin@192.168.1.XXX:554/H.264, have you tried this URL(update with your password and IP)?

here is the deepstream file.


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

[tiled-display]
enable=1
rows=1
columns=1
width=1920
height=1080
gpu-id=0

[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI
#type=3
type = 4
num-sources=1
#uri:rtsp://192.168.18.65:554/user=admin&password=HPAIWD&channel=1
#uri:rtsp://192.168.18.65:8000/user=admin&password=HPAIWD&channel=1
uri:rtsp://admin:HPAIWD@192.168.18.65:554/H.264
#uri:rtsp://admin:Sajid123@192.168.18.65/
#uri=file:///home/experts-vision/Documents/Jetson-app/vedio/camera-1_video_26.mp4
#uri=file://../../streams/sample_1080p_h265.mp4
#uri=file:///home/experts-vision/Downloads/full-test.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
live-source =1

[sink0]
enable=1
#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=1
text-size=8
text-color=1;1;1;1;
#text-bg-color= 0;0;0;0
#text-bg-color=0.3;0.3;0.3;1
text-bg-color=0;0;0;0.5
font=Times New Roman
#show-clock=1
#clock-color=1;0;0;1
[primary-gie]
enable=1
gpu-id=0
# Modify as necessary
batch-size=1
#Required by the app for OSD, not a plugin property
#infer-raw-output-dir= /home/experts-vision/Desktop/farid/inferenced/raw
bbox-border-color0=1;0;0;1
bbox-border-color1=0;1;0;1
bbox-border-color2=1;0;5;1
bbox-border-color3=2;255;0;1
bbox-border-color4=0;255;27;1
bbox-border-color5=1;25;0;1

gie-unique-id=1
# Replace the infer primary config file when you need to
# use other detection models
config-file = nvinfer_config.txt
[sink1]
enable=1
type=3
#1=mp4 2=mkv
container=1
#1=h264 2=h265 3=mpeg4
codec=2
#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=/home/experts-vision/Desktop/farid/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=0
sync=0
bitrate=2000000
#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
gpu-id=0
enable-batch-process=1
enable-past-frame=1
display-tracking-id=0

[tests]
file-loop=0

yes i tried this uri:rtsp://admin:HPAIWD@192.168.18.65:554/H.264but got me this error.

** ERROR: <parse_config_file:542>: parse_config_file failed
** ERROR: <main:687>: Failed to parse config file 'deepstream_app_source1_detection_models.txt'
Quitting
App run failed

Why this uri work in VLC but not in deepstream-app file

The format is wrong. This is not YAML config file, you can not use YAML format.
uri=rtsp://admin:HPAIWD@192.168.18.65:554/h.264/channel=1

sorry for typo
i used the following URI in deepstream_app_source1_detection_models.txt
uri:rtsp://admin:HPAIWD@192.168.18.65:554/H.264

but it got me error like this

** ERROR: <parse_config_file:542>: parse_config_file failed
** ERROR: <main:687>: Failed to parse config file 'deepstream_app_source1_detection_models.txt'
Quitting
App run failed

it worked with deepstream-test3 python application but not in deepstream_app_source1_detection_models.txt

The format is wrong. This configuration file is not YAML config file, you can not use YAML format in this configuration file.

If you want YAML configuration, please refer to /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/source30_1080p_dec_infer-resnet_tiled_display_int8.yml as your sample.

1 Like

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