RTSP-Server: Can't get multiple streams per URI to work

Pavel Aborilov aborilov at gmail.com
Mon Jun 8 04:39:36 PDT 2015


I think you can set different payload type for payloader on server side and
then filter on client side after rtspsrc like:
application/x-rtp, payload=pt_num

On Mon, Jun 8, 2015 at 2:35 PM Martin Scheffler <martinscheffler at gmail.com>
wrote:

> Hi all,
> I am trying to get multiple streams in a single RTSP session to work.
>
> I think I have the server side correct:
>
> --------------------------------8<-------------------------------
> #include <gst/gst.h>
> #include <gst/rtsp-server/rtsp-server.h>
> int main(int argc, char* argv[])
> {
>     gst_init (&argc, &argv);
>     GMainLoop* loop = g_main_loop_new(NULL, FALSE);
>     GstRTSPServer* server = gst_rtsp_server_new ();
>
>     GstRTSPMountPoints* mounts = gst_rtsp_server_get_mount_points (server);
>     GstRTSPMediaFactory* factory = gst_rtsp_media_factory_new();
>     gst_rtsp_media_factory_set_launch (factory, "( audiotestsrc freq=1000
> is-live=true !  audioconvert ! rtpL16pay name=pay0  audiotestsrc freq=5000
> !  audioconvert ! rtpL16pay name=pay1 )");
>     gst_rtsp_media_factory_set_shared (factory, TRUE);
>     gst_rtsp_mount_points_add_factory (mounts, "/test", factory);
>     g_object_unref (mounts);
>     gst_rtsp_server_attach (server, NULL);
>     g_main_loop_run (loop);
>  return 0;
> }
> --------------------------------8<-------------------------------
> I can listen to the first stream with this command line:
> gst-launch-1.0.exe rtspsrc location=rtsp://localhost:8554/test !
> rtpL16depay ! queue ! audioconvert ! autoaudiosink
> But how can I listen to the second one (pay1)?
> I tried this GStreamer command line:
> gst-launch-1.0.exe rtspsrc location=rtsp://localhost:8554/test name=src
> src.stream_1 ! rtpL16depay ! queue ! audioconvert ! autoaudiosink
> but that does not work. The server gives out a warning "media 05bxxx was
> not prepared" and the client shows a datastream error.
> I can connect to the server with VLC (although an ancient version, maybe
> it is too old)?
> VLC shows the two audio channels and plays the second one. The server
> prints:
> --------------------------------8<-------------------------------
> 0:02:32.239700172  3376   00547960 ERROR             rtspclient
> rtsp-client.c:1279:handle_play_request: client 00545D58:
>  no aggregate path /test/stream=1
> 0:02:32.241088051  3376   00547960 ERROR             rtspclient
> rtsp-client.c:947:handle_teardown_request: client 00545D
> 58: no aggregate path /test/stream=1
> 0:02:32.281316632  3376   05BC7768 WARN                  udpsrc
> gstudpsrc.c:552:gst_udpsrc_create:<udpsrc8> error: get a
> vailable bytes failed
> 0:02:32.282693343  3376   05BC7768 WARN                 basesrc
> gstbasesrc.c:2933:gst_base_src_loop:<udpsrc8> error: Int
> ernal data flow error.
> 0:02:32.284821948  3376   05BC7768 WARN                 basesrc
> gstbasesrc.c:2933:gst_base_src_loop:<udpsrc8> error: str
> eaming task paused, reason error (-5)
> 0:02:32.291064085  3376   00547960 WARN               rtspmedia
> rtsp-media.c:3068:gst_rtsp_media_set_state: media 05BE21
> 18 was not prepared
> --------------------------------8<-------------------------------
> So any chance of getting this to work?
> Thanks for your help!
> Cheers,
> Martin
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150608/ca739a4f/attachment.html>


More information about the gstreamer-devel mailing list