**• Hardware Platform: ** GPU • DeepStream Version: 5 • TensorRT Version: 7 • NVIDIA GPU Driver Version (valid for GPU only) 450 • Issue Type( questions, new requirements, bugs) questions • Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description) Deepstream Python
Hello, I’m a couple weeks new to Deepstream SDK. My app receives multiple RTSP streams and saves some cutout images using OpenCV with the osd probe.
It is based on the Python Sample: apps/deepstream-imagedata-multistream
However, I would like to combine it with apps/deepstream-test1-rtsp-out sample in order to get a RTSP output for every RTSP input received (and processed). I just can’t manage to make it work because RTSP out sample is made for only 1 input. So, my question is:
Is this possible? To batch frames from multiple streams, infer on them, and then send the frames through different RTSP streams?
I thought maybe udp sinks for every stream but I can’t find anything useful
Hello, thank you all for your quick responses. I still need some help, I feel like I’m about to solve it.
Here’s my progress:
Like @Andrew_Smith suggested, I’ve used “Gst-interpipe” and created a pipeline for streaming infering & processing, and another for udpsink & RTSP streaming.
This works correctly when I use only one streaming as input for Pipeline 1. However, when adding more the “nvv4l2h264enc” fails because it’s receiving the frames batch.
As @Fiona.Chen mentioned, adding Gst-nvstreamdemux is the answer for this. But when I add it to my pipeline 1 like this:
I then stop receiving image in my Pipeline 2. Also I get this warning: sys:1: Warning: g_object_get_is_valid_property: object class 'GstUDPSrc' has no property named 'pt'
I was thinking maybe the interpipesrc would have to listen-to something like: output.src_0 , output.src_1 but I cant manage to make it work.
Please use gst-launch to check your pipeline first. You can send us your gst-launch pipeline(without interpipesink, it is 3rd party proprietary software, we can not debug with it) so that we can reproduce the problem.
Yes, please let me explain what I mean. For example, in case 3 it manages src_0 and src_1 from nvstreamdemux: ! mux.sink_1 demux.src_0 ! queue ! nvvideoconvert ! nveglglessink demux.src_1 ! queue ! nveglglessink
However, in Python when I make the UDP Sink, I have to set the host & port. udpsink1 = Gst.ElementFactory.make("udpsink", "udpsink") udpsink1.set_property('host', '224.224.255.255') udpsink1.set_property('port', 8554) udpsink1.set_property('async', False) udpsink1.set_property('sync', 1)
Then I do the linking of the pipeline:
…nvstreamdemux.link(encoder) encoder.link(rtp_pay) rtp_pay.link(udpsink1)
As you can see, the output of nvstreamdemux is all going through the same udpsink. How do I make src_0, src_1, src_n to go through its own udpsink1, udpsink2, udpsink3? What other element do I need?
You need to create multiple udpsink instances for multiple demux src output.
Please use “gst-inspect-1.0 nvstreamdemux” to query the introduction of nvstreamdemux, you can see that the src pads of nvstreamdemux are “on-request”:
Pad Templates:
SINK template: ‘sink’
Availability: Always
Capabilities:
video/x-raw(memory:NVMM)
format: { (string)NV12, (string)RGBA }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
That means you can request nvstreamdemux src pad with assigned name just as what we have done with nvstreammux sink pads. And you can link the requested src pad with the sink pad of the udpsink you want to connect to this stream.
demux_test.py (19.3 KB)
hello @carloselilopezt ,
this is a simple python test code for 2 rtsp streams in and 2 rtsp streams out which not be optimized,you can have a try
I think this one deserves another thread, but i want to use tracker and MQTT. btw your file works properly in my jetson with rtsp:// and file:// links.
since it uses 2 stream paths, each sources has their url output. how do i differentiate those besides the link? For example doing MQTT for each sources