RSTP stream disconnecting causes script to fail

I am using 2 rtsp stream as source which I am passing to pgie element, the script works fine with an MP4 video which is pre-recorded but using the same script for RTSP it consumes to much resources and the script fails after running for a while(10-15 secs). How can I can debug to check if the problem is caused by the RTSP stream or by the gstreamer.

Hi,
Please try this sample app:
deepstream_reference_apps/runtime_source_add_delete at master · NVIDIA-AI-IOT/deepstream_reference_apps · GitHub

It handles the condition the source is dynamically disconnected. Please apply it to your use-case and check if stability improves.

This script fails due to 2 reasons,

1.Network Disconnection
Whenever the network fluctuates the rtsp streams disconnects due to which the script stops. But in this case the streammux handle the situation where well and shut downs the pipeline.
2. Buffer has No PTS
While doing some digging I came across this link:

Where they faced a similar issue, but I am unsure that cause is same or not.

I would like to know how can I move forward with the above 2 issue so that my script keeps running and keep on trying to connect to rtsp stream after disconnection and how should I solve the Buffer has No PTS error.

Hi,
Please try deepstream-app with your RTSP source and see if it can keep the pipeline alive when disconnection occurs. In deepstream-app, there is a function check_rtsp_reconnection_attempts() for RTSP source in

/opt/nvidia/deepstream/deepstream/sources/apps/apps-common/src/deepstream_source_bin.c

See if it can handle the condition. If not and the pipeline still terminates, there may be no way to keep alive and the pipeline has to be stopped and re-initialized.

I tired using the Apps script but the script didn’t fail but the when I added a splitmultisink to it for saving Mp4s, the saved files were corrupted.
I got the same error mentioned in this link: android - GStreamer mp4mux gives "Buffer has no PTS" error using custom appsrc - Stack Overflow
Here they suggest to update the gstreamer library as they have added a new element to resolve the issue. But I dont want to update my gstreamer library is there any work around it?

Hi,
Since source code of the gstreamer plugins is public. You may check what the fix is and port it to your gstreamer version.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.