Deepstream Python App Issues (NvdsAnalytics + MessageBroker + RTSP Output)

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson Nano)
• DeepStream Version-5.01.
• JetPack Version (4.4)
• TensorRT Version[7.0]
• Issue Type( questions)

Hi,

Would like to ask for help to debug my pipeline (Python-App)
Here’s my pipeline:
source -> streammux -> infer -> track -> nvdsanalytics -> rtsp-out

This pipeline works fine since I was able to grab the value from nvds analytics and also get the rtsp output.
However, there are some issues when I tried to extend my pipeline into:

source -> streammux -> infer -> track -> nvdsanalytics -> message out -> rtsp-output

1. I added new message variable in the nvdsmeta_schema.h (under NvDsEventMsgMeta) however when I run this pipeline, it produces error

AttributeError: ‘pyds.NvDsEventMsgMeta’ object has no attribute ‘lcCnt_input1_zone5_vehicle’

How do I compile the nvdsmeta_schema.h so then the pyds would recognize the new attributes. I could easily done it on c++ app.

2 I could not get both result (rtsp-output) and (message-payload) when I’m combining my pipeline.
Here’s how I link my pipeline.

print(“Adding elements to Pipeline \n”)
pipeline.add(pgie)
pipeline.add(tracker)
pipeline.add(analytics)
pipeline.add(tiler)
pipeline.add(nvvidconv)
pipeline.add(nvosd)
pipeline.add(nvvidconv_postosd)
pipeline.add(tee)
pipeline.add(queue1)
pipeline.add(queue2)
pipeline.add(msgconv)
pipeline.add(msgbroker)
pipeline.add(caps)
pipeline.add(encoder)
pipeline.add(rtppay)
pipeline.add(sink)

print("Linking elements in the Pipeline \n")
streammux.link(pgie)
pgie.link(tracker)
tracker.link(analytics)
analytics.link(tiler)
tiler.link(nvvidconv)
nvvidconv.link(nvosd)
# nvosd.link(nvvidconv_postosd)
nvosd.link(tee)
queue1.link(msgconv)
msgconv.link(msgbroker)
queue2.link(nvvidconv_postosd)
nvvidconv_postosd.link(caps)
caps.link(encoder)
encoder.link(rtppay)
rtppay.link(sink)

sink_pad=queue1.get_static_pad("sink")
tee_msg_pad=tee.get_request_pad('src_%u')
tee_render_pad=tee.get_request_pad("src_%u")
if not tee_msg_pad or not tee_render_pad:
    sys.stderr.write("Unable to get request pads\n")
tee_msg_pad.link(sink_pad)
sink_pad=queue2.get_static_pad("sink")
tee_render_pad.link(sink_pad)

rtsp-out.py (20.8 KB)

Details of my lines attached on the file (feel free to reproduce the issues).

thanks

It’s expected since you also need to modify the pyds bindings when you add new variable under NvDsEventMsgMeta, however currently the binding is not open-sourced, we will check internally to see if any WAR . BTW we will opensource the bindings in later release.

For your 2nd question, what’s the error log? not sure if you have tried with c/c++ sample?

For my 2nd question, the pipeline works. However, my kafka consumer app did not receive any message and my VLC player did not receive any rtsp stream.

I tried to enable the rtsp output for c++ on the config file

[sink0]
enable=1
type=4
codec=1
sync=0
bitrate=4000000
rtsp-port=8567
udp-port=5400

This is a config file based on deepstream-nvdsanalytics-test app.
I did not make any change on the c++ file.
However, could not get the rtsp output out.

any suggestion?

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

Ok, does that work if you change the output sink form rtsp to filesink or eglsink?