GstRTSPClientSink:s: Could not open resource for reading and writing. error
When attempting to stream a video(mp4) or webcam to the RTSP server using the following command:
GST_DEBUG=1 gst-launch-1.0 filesrc location=file.mp4 ! qtdemux name=d d.video_0 ! rtspclientsink protocols=tcp name=s location=rtsp://localhost:8554/mystream
I encounter an error stating 'Could not open resource for reading and writing.'
Setting pipeline to PAUSED ...
Pipeline is PREROLLED ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://localhost:8554/mystream
0:00:00.027324110 10316 0x565184e29aa0 ERROR default gstrtspconnection.c:1046:gst_rtsp_connection_connect_with_response: failed to connect: Could not connect to localhost: Connection refused
0:00:00.027375046 10316 0x565184e29aa0 ERROR rtspclientsink gstrtspclientsink.c:2022:gst_rtsp_conninfo_connect:<s> Could not connect to server. (Generic error)
ERROR: from element /GstPipeline:pipeline0/GstRTSPClientSink:s: Could not open resource for reading and writing.
Additional debug info:
gstrtspclientsink.c(3236): gst_rtsp_client_sink_connect_to_server (): /GstPipeline:pipeline0/GstRTSPClientSink:s:
Failed to connect. (Generic error)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
telnet 127.0.0.1 8554
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused