0

I'm using gstreamer to get rtsp stream. I use command: gst-launch-1.0 rtspsrc location='rtsp://user:password@address:554/live/main' latency=100 ! queue ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! videoscale ! video/x-raw,width=640,height=480 ! autovideosink
I used it on the first computer and it worked.
Then I used it on the second computer and it worked too.
After that I did some uninstall/install operations with opencv on the second one.
And now I can't get the stream from the second PC. But on the first one it still works with the same command.

Output:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Got context from element 'autovideosink0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://user:password@address:554/live/main
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not open resource for reading and writing.
Additional debug info:
gstrtspsrc.c(7469): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Failed to connect. (Generic error)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

What did I do and how can I repair it? Thanks in advance!

1 Answer 1

0

With use of GST_DEBUG=1 gst-launch-1.0... I understood that the problem was in http-proxy.

2
  • Can you elaborate a little more what the problem actually was, and how you solved it?
    – AdminBee
    Commented Dec 15, 2022 at 11:32
  • @AdminBee I'm not sure why it was a thing. I had a system http proxy ($http_proxy set). But this proxy is working. I can use my browser, can ping servers etc.. I added GST_DEBUG=1 to the beginning of the command and it said ERROR default gstrtspconnection.c:1004:gst_rtsp_connection_connect_with_response: failed to connect: HTTP proxy connection not allowed . I wiped $http_proxy and after that gstreamer started to work.
    – Dmitry
    Commented Dec 15, 2022 at 12:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .