Deepstream

Hi.

I want to connect the dvr device with my jetson TX2 from through deepstream. I set the following program to receive the dvr streaming by RTSP uri as shown below:

Copyright © 2019 NVIDIA Corporation. All rights reserved.

NVIDIA Corporation and its licensors retain all intellectual property

and proprietary rights in and to this software, related documentation

and any modifications thereto. Any use, reproduction, disclosure or

distribution of this software and related documentation without an express

license agreement from NVIDIA Corporation is strictly prohibited.

[application]

enable-perf-measurement=1

perf-measurement-interval-sec=5

#gie-kitti-output-dir=streamscl

[tiled-display]

enable=1

row=1

columns=1

width=640

height=520

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=4

uri=rtsp://192.168.1.131:455/Channel/CAM01

num-sources=1

#drop-frame-interval=2

gpu-id=0

(0): memtype_device - Memory type Device

(1): memtype_pinned - Memory type Host Pinned

(2): memtype_unified - Memory type Unified

cudadec-memqqqtype=0

[sink0]

enable=1

#Type - 1=FakeSink 2=EglSink 3=File

type=5

sync=1

source-id=0

gpu-id=0

qos=0

nvbuf-memory-type=0

overlay-id=1

[sink1]

enable=0

type=3

#1=mp4 2=mkv

container=1

#1=h264 2=h265

codec=1

sync=0

#iframeinterval=10

bitrate=2000000

output-file=out.mp4

source-id=0

[sink2]

enable=0

#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming

type=4

#1=h264 2=h265

codec=1

sync=0

bitrate=4000000

set below properties in case of RTSPStreaming

rtsp-port=455

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=0

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

##Boolean property to inform muxer that sources are live

live-source=0

batch-size=4

##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=40000

Set muxer output width and height

width=1920

height=1080

##Enable to maintain aspect ratio wrt source, and allow black borders, works

##along with width, height properties

enable-padding=0

nvbuf-memory-type=0

config-file property is mandatory for any gie section.

Other properties are optional and if set will override the properties set in

the infer config file.

[primary-gie]

enable=1

gpu-id=0

model-engine-file=…/…/models/Primary_Detector_Nano/resnet10.caffemodel_b12_fp16.engine

batch-size=12

#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

interval=4

gie-unique-id=1

nvbuf-memory-type=0

config-file=config_infer_primary_nano.txt

[tracker]

enable=1

tracker-width=480

tracker-height=272

#ll-lib-file=/opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_mot_iou.so

ll-lib-file=/opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_mot_klt.so

#ll-config-file required for IOU only

#ll-config-file=iou_config.txt

gpu-id=0

[tests]

file-loop=0

But when running this program, the zero output as shown below:

nujet@nujet-desktop:/opt/nvidia/deepstream/deepstream-4.0/samples/configs/deepstream-app$ deepstream-app -c test5.txt

** WARN: <parse_tiled_display:1304>: Unknown key ‘row’ for group [tiled-display]

** WARN: <parse_source:452>: Unknown key ‘cudadec-memqqqtype’ for group [source0]

** WARN: <create_pipeline:930>: Num of Tiles less than number of sources, readjusting to 1 rows, 1 columns

Creating LL OSD context new

gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_mot_klt.so

gstnvtracker: Optional NvMOT_RemoveStreams not implemented

gstnvtracker: Batch processing is OFF

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:189>: Pipeline ready

ERROR from src_elem0: Could not open resource for reading and writing.

Debug info: gstrtspsrc.c(7469): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin0/GstRTSPSrc:src_elem0:

Failed to connect. (Generic error)

Reset source pipeline reset_source_pipeline 0x7f4e7e1080

,ERROR from src_elem0: Could not open resource for reading and writing.

Debug info: gstrtspsrc.c(7469): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin0/GstRTSPSrc:src_elem0:

Failed to connect. (Generic error)

**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)

**PERF: 0.00 (0.00)

q

Quitting

App run successful

can you help me
my best regards,

Hi,
Please run the gst-launch command to make sure the URI is valid.

gst-launch-1.0 uridecodebin uri=rtsp://192.168.1.131:455/Channel/CAM01 ! nvoverlaysink

Hi.
when I used the media port of dvr (34567), the output is different from that by rtsp port (455) as shown below:

nujet@nujet-desktop:/opt/nvidia/deepstream/deepstream-4.0/samples/configs/deepstream-app$ gst-launch-1.0 uridecodebin uri=rtsp://192.168.1.131:34567/Channel/CAM01 ! nvoverlaysink
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.168.1.131:34567/Channel/CAM01
Progress: (open) Retrieving server options
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source: Could not read from resource.
Additional debug info:
gstrtspsrc.c(5917): gst_rtsp_src_receive_response (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Could not receive message. (Timeout while waiting for server response)
ERROR: pipeline doesn’t want to preroll.
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

nujet@nujet-desktop:/opt/nvidia/deepstream/deepstream-4.0/samples/configs/deepstream-app$ gst-launch-1.0 uridecodebin uri=rtsp://192.168.1.131:455/Channel/CAM01 ! nvoverlaysink
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.168.1.131:455/Channel/CAM01
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source: Could not open resource for reading and writing.
Additional debug info:
gstrtspsrc.c(7469): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Failed to connect. (Generic error)
ERROR: pipeline doesn’t want to preroll.
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

Can you help me
best regards,

Hi,
Looks like the URI is invalid or not supported in gstreamer. You may contact the vendor and check if they verify gstreamer.

Hi,
OK. thank you; but I have the following question:
Can I to connect the DVR device directly to Jetson device through DeeepStream SDK ? if Yes, How?

Best regarrds

Hi,
On TX2 developer kit, there are USB3 Type-A port, M2 slot, PCIe slot. If the device is with the hardware inferface, it should be fine to connect to the dev kit directly.