How to create an rtsp sink with deepstream python program?

So, in gstreamer, a pipeline flows from one or more sources to one or more sinks. In this case, the pipeline is linear, with one source, and one sink. All I did was swap out a display sink with the rtsp sink elements provided in Nvidia’s example.

If you want to send video to multiple sinks (a display, and the network), You will have to add and link a tee element just before the encoder to split the pipeline into two branches, add two queues and link the queues to the tee by requesting pads from the tee and linking them to the sink pads of the two queues you created. You can’t just go tee.link(queue) because the pads don’t exist on tees until you request them. Then you can link() one queue to the encoder ,then the rest of the rtsp elements as exists currently… and the other queue directly to a sink like nvoverlaysink. I am not sure if any of Nvidia’s python examples use a tee like this, but you can search the sources for “tee” and see if there is an existing example.

Try it out, and if you run into issues, post your code here.