deepstream-services-library icon indicating copy to clipboard operation
deepstream-services-library copied to clipboard

Example with RTSP inputs and individual RTSP output

Open micuentadecasa opened this issue 3 years ago • 6 comments

Hi all,

thanks for this incredible library, I would like to know if you have some sample about creating dynamic pipelines of RTSP streams , having different RSTP streams as input, processing them with a pgie and some sgies, and a different RTSP ouput for each stream.

I'm trying to do it with Deepstream 6.1, but when adding/deleting new streams I got some issues with Deepstream and I have to restart the pipelines.

Regards.

micuentadecasa avatar Aug 14 '22 12:08 micuentadecasa

@micuentadecasa re: "I'm trying to do it with Deepstream 6.1, but when adding/deleting new streams I got some issues with Deepstream and I have to restart the pipelines."

issues with DSL/DeepStream? or issues just trying with just DeepStream? Also, are you developing in Python or C/C++ ?

rjhowell44 avatar Aug 14 '22 16:08 rjhowell44

Hi @rjhowell44 , I'm doing it in Python and Deepstream 6.1, haven't tried still with DSL, I started from this code, https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/tree/master/apps/runtime_source_add_delete , I started with the 6.0.1 version and combining it with other code that I found, using a demuxer to create a different RTSP output for each stream. I faced some issues, like when one of the streams, a RTSP simulated video stopped, we receive the EOS, but seems that it is late, we tried stoping/removing the branch from the pipeline only for that stream but the all pipeline is broken, and we have to restart all the pipeline. If you want I can share the code privately.

micuentadecasa avatar Aug 14 '22 16:08 micuentadecasa

@micuentadecasa There are at least a couple of users that hang out on our Discord site using DSL exactly as you mention. Please join us if you're interested.

Unfortunately, we don't have the use case you've described covered in a single example. You will need to pull from the following.

  • here's an example of how to create you're RTSP Sources and Recording Taps (not sure if you need recording) https://github.com/prominenceai/deepstream-services-library/blob/master/examples/python/ode_occurrence_4rtsp_start_record_tap_action.py
  • here's an example of dynamically adding/removing sources... although it uses a Tiler which doesn't really work well for source remove. https://github.com/prominenceai/deepstream-services-library/blob/master/examples/python/dyn_uri_file_pgie_ktl_tiler_osd_window.py
  • and here's an example of how to create an RTSP Sink https://github.com/prominenceai/deepstream-services-library/blob/master/examples/python/1csi_live_pgie_osd_overlay_rtsp_h254.py
  • finally, here's an example of creating a demuxer with multiple branches and sinks - https://github.com/prominenceai/deepstream-services-library/blob/master/examples/python/2rtsp_splitter_demuxer_pgie_ktl_tiler_osd_window_2_file.py

Happy to help with any problems you might run into.

rjhowell44 avatar Aug 14 '22 17:08 rjhowell44

thanks @rjhowell44 , I will take a look at the samples and will connect in the Discord site Regards.

micuentadecasa avatar Aug 14 '22 17:08 micuentadecasa

@micuentadecasa also, one of the import services you'll need will be dsl_source_rtsp_state_change_listener_add which may not be in the above examples... and see the RTSP Stream Connection Management as well.

rjhowell44 avatar Aug 14 '22 19:08 rjhowell44

many thanks @rjhowell44

micuentadecasa avatar Aug 14 '22 20:08 micuentadecasa