I have a Panasonic WV-SW559 camera set up as an RTSP stream.
VLC can perfectly open the RTSP stream and display it, as well as FFMPEG. However, when I try to set up a simple gstreamer pipeline, it does not want to open. I execute the following command:
gst-launch-1.0 rtspsrc --gst-debug=rtspsrc:5 location="rtspt://admin:[email protected]:554/MediaInput/h264/stream_1" ! fakesink
after which I get the following output:
0:00:00.063009504 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:8617:gst_rtspsrc_uri_set_uri:<rtspsrc0> parsing URI
0:00:00.063074922 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:8624:gst_rtspsrc_uri_set_uri:<rtspsrc0> configuring URI
0:00:00.063111485 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:8640:gst_rtspsrc_uri_set_uri:<rtspsrc0> set uri: rtspt://admin:[email protected]:554/MediaInput/h264/stream_1
0:00:00.063136642 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:8642:gst_rtspsrc_uri_set_uri:<rtspsrc0> request uri is: rtsp://192.168.2.148:554/MediaInput/h264/stream_1
Setting pipeline to PAUSED ...
0:00:00.064752828 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:8391:gst_rtspsrc_start:<rtspsrc0> starting
0:00:00.064910956 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:5567:gst_rtspsrc_loop_send_cmd:<rtspsrc0> sending cmd OPEN
0:00:00.064938405 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:5598:gst_rtspsrc_loop_send_cmd:<rtspsrc0> not interrupting busy cmd unknown
Pipeline is live and does not need PREROLL ...
0:00:00.065145962 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:8346:gst_rtspsrc_thread:<rtspsrc0> got command OPEN
0:00:00.065182682 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:4748:gst_rtspsrc_connection_flush:<rtspsrc0> set flushing 0
0:00:00.065214662 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:4614:gst_rtsp_conninfo_connect:<rtspsrc0> creating connection (rtspt://admin:[email protected]:554/MediaInput/h264/stream_1)...
Progress: (open) Opening Stream
0:00:00.065652329 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:4625:gst_rtsp_conninfo_connect:<rtspsrc0> sanitized uri rtsp://192.168.2.148:554/MediaInput/h264/stream_1
0:00:00.065710611 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:4659:gst_rtsp_conninfo_connect:<rtspsrc0> connecting (rtspt://admin:[email protected]:554/MediaInput/h264/stream_1)...
Progress: (connect) Connecting to rtspt://admin:[email protected]:554/MediaInput/h264/stream_1
0:00:00.081446411 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:7342:gst_rtspsrc_retrieve_sdp:<rtspsrc0> create options... (async)
0:00:00.081494537 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:7351:gst_rtspsrc_retrieve_sdp:<rtspsrc0> send options...
0:00:00.081575581 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:476:default_before_send:<rtspsrc0> default handler
Progress: (open) Retrieving server options
0:00:00.081618707 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:476:default_before_send:<rtspsrc0> default handler
0:00:00.081671521 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:5964:gst_rtspsrc_try_send:<rtspsrc0> sending message
0:00:00.088226524 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:5866:gst_rtsp_src_receive_response:<rtspsrc0> received response message
0:00:00.088280901 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:5885:gst_rtsp_src_receive_response:<rtspsrc0> got response message 400
0:00:00.088321370 23339 0x55cd528a30 WARN rtspsrc gstrtspsrc.c:6161:gst_rtspsrc_send:<rtspsrc0> error: Unhandled error
0:00:00.088335798 23339 0x55cd528a30 WARN rtspsrc gstrtspsrc.c:6161:gst_rtspsrc_send:<rtspsrc0> error: Bad Request (400)
0:00:00.088454915 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:7514:gst_rtspsrc_retrieve_sdp:<rtspsrc0> free connection
0:00:00.088526323 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:4715:gst_rtsp_conninfo_close:<rtspsrc0> closing connection...
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Unhandled error
Additional debug info:
gstrtspsrc.c(6161): gst_rtspsrc_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Bad Request (400)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
0:00:00.088648097 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:4721:gst_rtsp_conninfo_close:<rtspsrc0> freeing connection...
Setting pipeline to READY ...
0:00:00.088699505 23339 0x55cd528a30 WARN rtspsrc gstrtspsrc.c:7548:gst_rtspsrc_open:<rtspsrc0> can't get sdp
0:00:00.088747891 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:8346:gst_rtspsrc_thread:<rtspsrc0> got command LOOP
0:00:00.088786121 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:4748:gst_rtspsrc_connection_flush:<rtspsrc0> set flushing 0
0:00:00.088812372 23339 0x55cd528a30 WARN rtspsrc gstrtspsrc.c:5628:gst_rtspsrc_loop:<rtspsrc0> we are not connected
0:00:00.088832841 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:5636:gst_rtspsrc_loop:<rtspsrc0> pausing task, reason flushing
0:00:00.088855394 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:5567:gst_rtspsrc_loop_send_cmd:<rtspsrc0> sending cmd WAIT
0:00:00.088885863 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:5585:gst_rtspsrc_loop_send_cmd:<rtspsrc0> cancel previous request LOOP
0:00:00.088905135 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:5593:gst_rtspsrc_loop_send_cmd:<rtspsrc0> connection flush busy LOOP
0:00:00.088923000 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:4748:gst_rtspsrc_connection_flush:<rtspsrc0> set flushing 1
0:00:00.088996595 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:5567:gst_rtspsrc_loop_send_cmd:<rtspsrc0> sending cmd CLOSE
0:00:00.089030346 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:5593:gst_rtspsrc_loop_send_cmd:<rtspsrc0> connection flush busy WAIT
0:00:00.089045971 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:4748:gst_rtspsrc_connection_flush:<rtspsrc0> set flushing 1
0:00:00.089085660 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:8346:gst_rtspsrc_thread:<rtspsrc0> got command CLOSE
0:00:00.089109462 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:4748:gst_rtspsrc_connection_flush:<rtspsrc0> set flushing 0
0:00:00.089129619 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:7569:gst_rtspsrc_close:<rtspsrc0> TEARDOWN...
Setting pipeline to NULL ...
0:00:00.089211288 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:7574:gst_rtspsrc_close:<rtspsrc0> not ready, doing cleanup
0:00:00.089263997 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:7637:gst_rtspsrc_close:<rtspsrc0> closing connection...
0:00:00.089300769 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:8422:gst_rtspsrc_stop:<rtspsrc0> stopping
0:00:00.089330926 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:5567:gst_rtspsrc_loop_send_cmd:<rtspsrc0> sending cmd WAIT
0:00:00.089333374 23339 0x55cd528a30 DEBUG rtspsrc gstrtspsrc.c:2058:gst_rtspsrc_cleanup:<rtspsrc0> cleanup
0:00:00.089354260 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:5593:gst_rtspsrc_loop_send_cmd:<rtspsrc0> connection flush busy CLOSE
0:00:00.089419939 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:4748:gst_rtspsrc_connection_flush:<rtspsrc0> set flushing 1
0:00:00.089493430 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:7569:gst_rtspsrc_close:<rtspsrc0> TEARDOWN...
0:00:00.089520931 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:7574:gst_rtspsrc_close:<rtspsrc0> not ready, doing cleanup
0:00:00.089539212 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:7637:gst_rtspsrc_close:<rtspsrc0> closing connection...
0:00:00.089556192 23339 0x55cd6d9180 DEBUG rtspsrc gstrtspsrc.c:2058:gst_rtspsrc_cleanup:<rtspsrc0> cleanup
Freeing pipeline ...
Does anyone have an idea on why this could occur?
I have Panasonic WV-NW502S, and I am having exactly the same problem when I try to set up a RTSP stream using gstreamer. Some one suggested it might has something to do with RTSP server configuration, so now I am trying to find more specific information in that direction.
Update: my problem is solved with the command: sudo apt remove gstreamer1.0-plugins-ugly
I saw this solution several times in other posts like this one and this one, but I didn't try it because some people posted it didn't work for them. I finally gave it a try, and it fixed my problem.