gst-rtsp-server shared media not working as expected

Alan dartagnan64b at gmail.com
Mon Jul 12 05:32:29 UTC 2021


Hello,

I've been experimenting with the gst-rtsp-server test-launch.c example, I
noticed that gst_rtsp_media_factory_set_shared(factory, TRUE) is not
working as expected.  That is, when a second rtsp client connects and
requests the video stream, the server restarts the first rtsp client video
stream. So both clients end up getting video from the beginning of the
stream (file).

Is this a bug or as designed?

Steps to reproduce:
1) ./test-launch "( filesrc location=input.mp4 ! qtdemux name=d ! tee
name=t ! queue ! h264parse config-interval=-1 ! rtph264pay pt=96 name=pay0
)"
2) start VLC Player and connect to rtsp://127.0.0.1:8554/test and wait for
video to stream a few minutes
3) start another instance of VLC Player and connect to rtsp://
127.0.0.1:8554/test, wait for video to stream, the stream starts at the
beginning of the input.mp4 and the video stream in step 2 above stops and
plays from the beginning of the file.

The behavior is the same for rtsp server 1.16.2 and 1.18.4. Oddly, if I
start two gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test ! ...
instead of VLC Player this works: the second stream plays at time of
connection; however, if I start/stop one of the rtsp clients, video freezes
and doesn't play for the newly started client (at times, the stream totally
ends for both rtsp clients) . So it doesn't seem to be robust or reliable.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210712/48697e30/attachment.htm>


More information about the gstreamer-devel mailing list