Dynamic depay in rtsp; How to detect RFC package in source bin deepstream

Hello,

I run deepstream app with rtsp source; but the type of video stream is not only H264 but have H265; so the deplay in source bin need to select gst-element deplay fit with source rtsp; (rtph264depay
or rtph265depay). I wonder how to detect RFC package of rtsp to choose depay?

Thank you so much!

You can use uridecodebin and it will figure out all that for you. It will even pick the right decoder. Then just link the appropriate video pad to the rest of your pipeline on the pad-added signal.

Hi,
Please try mdegans’ suggestion. It is type=2 in source group.
https://docs.nvidia.com/metropolis/deepstream/dev-guide/index.html#page/DeepStream%2520Development%2520Guide%2Fdeepstream_app_config.3.2.html%23wwpID0E0QB0HA

Hi mdegans and DaneLLL,

Thank you!

Hi DaneLLL,

I tried use uridecodebin for auto detected depay rtp h264 and h265 but when rtsp stream failed; uridecodebin can not restart source (reconnected to stream) like rtsp src bin; So I need to turn back to rtspsrc.

How I can use depay fit to rtsp src without use uridecodebin? Thank for help!

Hello everyone;

I can see the reconnect rtsp not work well for all problems about connection rtsp; so I change to uridecodebin + (dynamic add / delete source) to resolve my problems;

Thank you and this topic can be closed now.

Reconnection is a separate problem. There is another thread for that with a patch. I haven’t had a chance to test it and apply it’s logic to my own app, however.