Deepstream to read from a udp sink?

I have a setup where I’m writing images to a udp sink,

The pipeline that I use to display the contents of the port is as follows,

gst-launch-1.0 -v udpsrc port=5001 ! application/x-rtp, media=video, clock-rate=90000, encoding-name=JPEG, payload=26 ! rtpjpegdepay ! jpegdec ! xvimagesink sync=0

Is it possible to launch a deepstream pipeline to read from this port instead of rtsp url’s?

The other approach that I did try was setup a gstreamer rtsp server using the sample from github, even though I was able to access the stream from ffmpeg and gstreamer, deepstream wasn’t able to start with the video from the rtsp server hosted by gstreamer.

So to summarize my questions,

  1. Is it possible to start deepstream by listening to a udp port as an input source? If yes, how can it be achieved?
  2. Why is deepstream unable to read from the rtsp url launched from the gstreamer rtsp server example,
    RTSP server example.

Any help would be appreciated. Thanks.

Hi,
You can run gst-launch command first. Please refer to an example:

Once you have a working gst-launch command, you can implement the C or python sample based on it.

@DaneLLL,

few questions, I’m in no means a gstreamer or DS expert but most of the things in the previous comment are a bit blurry, there are multiple things that I’m not sure how to replicate using gst-launch,
First being caps element, do I use the same caps element which I use to run gst-launch to view the contents of the port?
In the above example you have a camera source linked to streammux, but in the following command,

gst-launch-1.0 -v udpsrc port=5001 ! application/x-rtp, media=video, clock-rate=90000, encoding-name=JPEG, payload=26 ! rtpjpegdepay ! jpegdec ! xvimagesink sync=0

where would I be linking the streammux? After the JPEG decoder? Then link the other elements as is.

There is another question, as far as I remember deepstream can use uridecodebin, can I make the app use uridecodebin to read from the port by any means? I’m currently writing opencv frames to udpsink, let’s say at uri 127.0.0.1 and at port 5001, any way to trick uridecodebin to decode the incoming stream from this port?

@DaneLLL, the error that I get when I use the rtsp url is as follows,

Reset source pipeline reset_source_pipeline 0x7fe0da62c408
,** WARN: <cb_rtspsrc_select_stream:435>: JPEG not supported
ERROR from src_elem3: No supported stream was found. You might need to allow more transport protocols or may otherwise be missing the right GStreamer RTSP extension plugin.

This I believe is due to rtsp plugin expecing h264/h265 encoded stream, but here it’s jpeg encoded stream. Can I set any param in the source code to let rtspsrc plugin to take in jpeg encoded stream?

Hi,
You can construct the pipeline like:

gst-launch-1.0 -v udpsrc port=5001 ! application/x-rtp, media=video, clock-rate=90000, encoding-name=JPEG, payload=26 ! rtpjpegdepay ! jpegdec ! nvvideoconvert ! 'video/x-raw(memory:NVMM),format=NV12' ! nvstreammux ! nvinfer ! ...