I'm streaming an RTSP stream of audio and video using gst-rtsp-server starting from the examples/test-video.c code.
I'm using autossh to forward the local port 8554 to port 3000 on my ssh gateway. I can access the stream locally at: rtsp://192.168.1.104:8554/stream and I can access the stream remotely at: rtsp://myurl:3000/stream I cannot access both the streams together: for some reasons, the first connection to the stream sets the network for the rest of the clients. When all clients are disconnected, I can access both of the addresses and again, the next client have to be on the same network. When I try to attach the second client from a different network: 0:00:20.583489777 10356 0x19b6690 ERROR rtspclient rtsp-client.c:2286:handle_describe_request: client 0x18f6df8: no media I can access the stream N times, since: gst_rtsp_media_factory_set_shared (factory, TRUE); but always, all clients have to be local or all clients have to be remote. Any hints? |
A bit of logs to help out:
0:00:06.711999431 10608 0x14167b0 FIXME default gstutils.c:3764:gst_pad_create_stream_id_internal:<rpicamsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id 0:00:06.713950395 10608 0x1416780 FIXME default gstutils.c:3764:gst_pad_create_stream_id_internal:<appsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id 0:00:06.912338832 10608 0x13d2690 FIXME rtspmedia rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing 0:00:07.046474422 10608 0x13d2690 FIXME rtspmedia rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing 0:00:07.047287408 10608 0x13d2690 WARN rtspmedia rtsp-media.c:3451:gst_rtsp_media_suspend: media 0x13ff138 was not prepared 0:00:12.645305854 10608 0x13d2690 WARN rtspmedia rtsp-media.c:3712:gst_rtsp_media_set_state: media 0x13ff138 was not prepared 0:00:13.441799548 10608 0x1476af0 FIXME default gstutils.c:3764:gst_pad_create_stream_id_internal:<rpicamsrc1:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id 0:00:13.443320520 10608 0x1476ac0 FIXME default gstutils.c:3764:gst_pad_create_stream_id_internal:<appsrc1:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id 0:00:13.629415178 10608 0x129dd20 FIXME rtspmedia rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing 0:00:13.773946582 10608 0x129dd20 FIXME rtspmedia rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing 0:00:13.774754567 10608 0x129dd20 WARN rtspmedia rtsp-media.c:3451:gst_rtsp_media_suspend: media 0x13ff278 was not prepared >>> here attachs the second client from a different network <<< 0:00:23.922597300 10608 0x143d580 FIXME default gstutils.c:3764:gst_pad_create_stream_id_internal:<rpicamsrc2:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id 0:00:23.924215271 10608 0x143d490 FIXME default gstutils.c:3764:gst_pad_create_stream_id_internal:<appsrc2:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id mmal: mmal_vc_component_enable: failed to enable component: ENOSPC 0:00:23.951330784 10608 0x143d580 ERROR rpicamsrc RaspiCapture.c:1241:raspi_capture_set_format_and_start: camera component couldn't be enabled 0:00:23.957637671 10608 0x143d580 WARN basesrc gstbasesrc.c:2948:gst_base_src_loop:<rpicamsrc2> error: Internal data flow error. 0:00:23.958480656 10608 0x143d580 WARN basesrc gstbasesrc.c:2948:gst_base_src_loop:<rpicamsrc2> error: streaming task paused, reason error (-5) 0:00:23.960889613 10608 0x145f690 WARN rtspmedia rtsp-media.c:2278:default_handle_message: 0x13ff3b8: got error Internal data flow error. (gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:media-pipeline/GstBin:bin2/GstRpiCamSrc:rpicamsrc2: streaming task paused, reason error (-5)) 0:00:23.963292570 10608 0x129dd20 WARN rtspmedia rtsp-media.c:2573:wait_preroll: failed to preroll pipeline 0:00:23.964245552 10608 0x129dd20 WARN rtspmedia rtsp-media.c:2877:gst_rtsp_media_prepare: failed to preroll pipeline 0:00:24.007065783 10608 0x129dd20 ERROR rtspclient rtsp-client.c:763:find_media: client 0x1312c60: can't prepare media 0:00:24.011692700 10608 0x129dd20 ERROR rtspclient rtsp-client.c:2286:handle_describe_request: client 0x1312c60: no media As you can see, it looks like we're trying to relaunch the pipeline instead of creating a new session to jump in. This wont happen if I try to connect the second client to the stream from the same network of the first client. 0:00:06.180315159 10665 0x2107b0 FIXME default gstutils.c:3764:gst_pad_create_stream_id_internal:<rpicamsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id 0:00:06.182136126 10665 0x210780 FIXME default gstutils.c:3764:gst_pad_create_stream_id_internal:<appsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id 0:00:06.377422624 10665 0x1cc690 FIXME rtspmedia rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing 0:00:06.383724511 10665 0x1cc690 FIXME rtspmedia rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing 0:00:06.384523497 10665 0x1cc690 WARN rtspmedia rtsp-media.c:3451:gst_rtsp_media_suspend: media 0x1f9138 was not prepared >>> here, it comes the second client from the same network <<< 0:00:10.797286359 10665 0x1cc690 FIXME rtspmedia rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing 0:00:10.803551247 10665 0x1cc690 FIXME rtspmedia rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing 0:00:17.166038147 10665 0x1cc690 FIXME rtspmedia rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing 0:00:17.242016784 10665 0x1cc690 WARN rtspmedia rtsp-media.c:3712:gst_rtsp_media_set_state: media 0x1f9138 was not prepared Any help would be appreciated, Thanks. |
On Mo, 2016-03-07 at 10:54 -0800, bomba wrote:
> A bit of logs to help out: > [...] > As you can see, it looks like we're trying to relaunch the pipeline instead > of creating a new session to jump in. This wont happen if I try to connect > the second client to the stream from the same network of the first client. Please file a bug about this at https://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer It looks like the matching of the media fails because of using different IPs/hostnames... and then it tries to create a new media instead of reusing the old one. -- Sebastian Dröge, Centricular Ltd · http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (968 bytes) Download Attachment |
gst-rtsp-server/gst/rtsp-server/rtsp-media-factory.c +1278
static gchar * default_gen_key (GstRTSPMediaFactory * factory, const GstRTSPUrl * url) { gchar *result; const gchar *pre_query; const gchar *query; guint16 port; pre_query = url->query ? "?" : ""; query = url->query ? url->query : ""; gst_rtsp_url_get_port (url, &port); result = g_strdup_printf ("%u%s%s%s", port, url->abspath, pre_query, query); return result; } Why result is composed using the port? This actually causes the problem. result = g_strdup_printf ("%s%s%s", url->abspath, pre_query, query); Fixes it. Is it safe? |
Free forum by Nabble | Edit this page |