GNOME Bugzilla – Bug 763281
RTSP RECORD: pipeline never prerolls
Last modified: 2016-03-11 15:56:23 UTC
Created attachment 323337 [details] debug log of test-launch Dear Sir, I found gst-rtsp-server support rtsp announce feature, but it seems don’t like Quicktime/Darwin streaming server. When I use ffmpeg client to test like “./ffmpeg -i "rtsp://10.0.84.42:554/live/ch01_0" -c copy -f rtsp rtsp://10.0.84.48:8554/test/office119.sdp” in Darwin Server, it will create office119.sdp file and then wait other client to access video. But in gst-rtsp-server, I will get “404 Not Found” Run rtsp-server: ./test-launch --gst-debug-level=9 videotestsrc ! x264enc ! rtph264pay name=pay0 pt=96 Attached file is the log dump of test-launch. Do I use wrong command or the ANNOUNCE feature is different with Quicktime/Darwin? If ANNOUNCE is different, how can I test announce in gst-rtsp-server? Regards, SaxonTseng
How are you running gst-rtsp-server for RECORD? See https://cgit.freedesktop.org/gstreamer/gst-rtsp-server/tree/examples/test-record.c and also the rtspclientsink element that allows sending media to an ANNOUNCE RTSP URI.
Dear Sir, Thanks for give comments, I also find bug758180 have example to test announce/record like below commands: receiver: ./test-record "( decodebin name=depay0 ! videoconvert ! autovideosink \ decodebin name=depay1 ! audioconvert ! autoaudiosink )" sender: gst-launch-1.0 filesrc location=test.mp4 ! qtdemux name=d ! \ queue ! aacparse ! rtspclientsink location=rtsp://127.0.0.1:8554/test name=s \ The test.mp4 file is H.264 mp4 format. But in my side I get the return error 415 (Unsupported Media Type) with gst-launch-1.0: ..... gstrtspclientsink.c(2885): gst_rtsp_client_sink_send (): /GstPipeline:pipeline0/GstRTSPClientSink:s: Got error response: 415 (Unsupported Media Type). Execution ended after 0:00:00.094661466 ...... Do it mean I miss any plugins or packages? The pakcages which I install now are: gstreamer gst-plugins-base gst-plugins-good gst-rtsp-server new attach file is test-record debug log Regards, SaxonTseng
Created attachment 323370 [details] test-record dbeug log
Your test-record pipeline requires both an audio and video component, and you're only sending an audio stream. Try: ./test-record "( decodebin name=depay0 ! audioconvert ! autoaudiosink )" as the receive.
Dear Jan Schmidt, Thanks for your comments, but after I use ./test-record --gst-debug-level=9 "( decodebin name=depay0 ! audioconvert ! autoaudiosink )" In the debug log, I find it still return error 415 (Unsupported Media Type) Please see the "test-recrod-trace1.txt", below is the line 22830 to 22845: 0:00:30.349576620 17596 0x183eca0 ERROR rtspclient rtsp-client.c:2345:handle_sdp: client 0x18a88b0: can't prepare media 0:00:30.349592780 17596 0x183eca0 ERROR rtspclient rtsp-client.c:2480:handle_announce_request: client 0x18a88b0: can't handle SDP 0:00:30.349596740 17596 0x7faed0009cf0 DEBUG default rtsp-thread-pool.c:154:do_quit: stop mainloop of thread 0x7faed0023ee0 0:00:30.349639530 17596 0x7faed0009cf0 TRACE GST_REFCOUNTING gstminiobject.c:440:gst_mini_object_unref: 0x7faed0023ee0 unref 2->1 RTSP response message 0x7faed5ac4a50 0:00:30.349660296 17596 0x7faed0009cf0 INFO rtspthreadpool rtsp-thread-pool.c:330:do_loop: exit mainloop of thread 0x7faed0023ee0 status line: 0:00:30.349679806 17596 0x7faed0009cf0 TRACE GST_REFCOUNTING gstminiobject.c:440:gst_mini_object_unref: 0x7faed0023ee0 unref 1->0 0:00:30.349697599 17596 0x7faed0009cf0 DEBUG default rtsp-thread-pool.c:69:_gst_rtsp_thread_free: free thread 0x7faed0023ee0 code: '415' reason: 'Unsupported Media Type' version: '1.0' headers: key: 'CSeq', value: '2' key: 'Server', value: 'GStreamer RTSP server' body: length 0 Regards, SaxonTseng
Created attachment 323562 [details] debug log for new test-record command
Please provide what you were running on the server and on the client so we can reproduce it.
0:00:30.244571210 17596 0x183eca0 DEBUG rtspmedia rtsp-media.c:1962:gst_rtsp_media_get_status: timeout, assuming error status 0:00:30.244638249 17596 0x183eca0 DEBUG rtspmedia rtsp-media.c:1968:gst_rtsp_media_get_status: got status 5 0:00:30.244661139 17596 0x183eca0 WARN rtspmedia rtsp-media.c:2573:wait_preroll: failed to preroll pipeline This is the problem btw, the pipeline never prerolled. Looks like it never got any data.
Actually I can reproduce this, e.g. > ./test-record "( decodebin name=depay0 ! autovideosink )" > ffmpeg -re -i test.mp4 -f rtsp -muxdelay 0.1 rtsp://127.0.0.1:8554/test test.mp4 is a video-only MP4 file. It waits forever for prerolling.
Created attachment 323613 [details] [review] rtsp-stream: Ensure that the pipeline is live and later-added udpsrcs are syncing the state with the parent bin Without this, RECORD pipelines are broken because a) we wait for ASYNC_DONE which never happens anymore because udpsrc would be added later. Previously it was there earlier and due to NO_PREROLL caused the pipeline to preroll immediately b) the udpsrc for the pipeline is added later and never set to PLAYING state, as the corresponding code previously was only for PLAY pipelines.
Attachment 323613 [details] pushed as 8b68edd - rtsp-stream: Ensure that the pipeline is live and later-added udpsrcs are syncing the state with the parent bin