After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 763281 - RTSP RECORD: pipeline never prerolls
RTSP RECORD: pipeline never prerolls
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
1.7.90
Other Linux
: Normal blocker
: 1.7.91
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-08 02:22 UTC by saxon.tseng
Modified: 2016-03-11 15:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
debug log of test-launch (1.50 MB, text/plain)
2016-03-08 02:22 UTC, saxon.tseng
  Details
test-record dbeug log (2.08 MB, text/plain)
2016-03-08 10:15 UTC, saxon.tseng
  Details
debug log for new test-record command (3.47 MB, text/plain)
2016-03-10 02:54 UTC, saxon.tseng
  Details
rtsp-stream: Ensure that the pipeline is live and later-added udpsrcs are syncing the state with the parent bin (3.02 KB, patch)
2016-03-10 11:58 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description saxon.tseng 2016-03-08 02:22:13 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
Comment 1 Sebastian Dröge (slomo) 2016-03-08 07:32:50 UTC
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.
Comment 2 saxon.tseng 2016-03-08 10:14:31 UTC
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
Comment 3 saxon.tseng 2016-03-08 10:15:05 UTC
Created attachment 323370 [details]
test-record dbeug log
Comment 4 Jan Schmidt 2016-03-08 11:38:43 UTC
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.
Comment 5 saxon.tseng 2016-03-10 02:52:07 UTC
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
Comment 6 saxon.tseng 2016-03-10 02:54:08 UTC
Created attachment 323562 [details]
debug log for new test-record command
Comment 7 Sebastian Dröge (slomo) 2016-03-10 08:25:28 UTC
Please provide what you were running on the server and on the client so we can reproduce it.
Comment 8 Sebastian Dröge (slomo) 2016-03-10 08:28:21 UTC
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.
Comment 9 Sebastian Dröge (slomo) 2016-03-10 08:41:46 UTC
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.
Comment 10 Sebastian Dröge (slomo) 2016-03-10 11:58:29 UTC
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.
Comment 11 Sebastian Dröge (slomo) 2016-03-10 17:49:22 UTC
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