RTMPSink reconnect

Hi,
I am using facenet with TensorRT for face recognition on jetson nano everything is working fine until my rtmp server restarts whenever it restarts I got this error on nano “rtmpsink could not write to resource” I tried googling how to reconnect to rtmp server if it fails but didn’t get any proper solution. Any suggestions from here regarding this?
I am using below pipeline

appsrc ! videoconvert ! x264enc speed-preset=ultrafast tune=zerolatency ! flvmux streamable=true ! \
	                    rtmpsink location=rtmp://IPADDRESS:1935?pwd=2021

Thanks in advance.

Hi,
It seems to be a network issue. We would suggest try other streaming protocol such as RTSP or UDP. See if the issue is still present.

You may also go to gstreamer forum to get further help. Users in the forum have more experience and may have seen similar issue before.

Hi @DaneLLL ,
It’s not network issue, whenever my rtmp server stops or restarts, the deepstream app running on Jetson device for sending data to server crashes and then I have to restart whole pipeline.
I have limitations for using rtmp sink and yes I tried on gstreamer’s forum also but didn’t get any satisfactory solution.
I want the pipeline to wait for server and whenever server is available again start sending data to server.

Thanks.

Hi,
Is the RTMP server the source to deepstream-app? If yes, a possible solution is to delete the source when the server stops, and add the source when the server restarts. There is a sample demonstrating this:
deepstream_reference_apps/runtime_source_add_delete at master · NVIDIA-AI-IOT/deepstream_reference_apps · GitHub

You may try to develop your use-case based on the sample.

Hi @DaneLLL ,
Your answer really helped to solve my issue and getting reference of this and others answers on forum I am trying to do same for rtsp source as well but I am having issue with it should I open new topic or can I post the problem here as well?

Please help to open a new topic. Thanks

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