rtsp server from android to pc

Sebastian Dröge slomo at circular-chaos.org
Tue Oct 1 02:35:47 PDT 2013


On Mo, 2013-09-30 at 15:09 -0700, yoyosuper8 wrote:
> So, I've implemented the following code from this example I found online:
> 
>   GMainLoop *loop;
>   GstRTSPServer *server;
>   GstRTSPMediaMapping *mapping;
>   GstRTSPMediaFactory *factory;
>  
>   gst_init (&argc, &argv);
>   loop = g_main_loop_new (NULL, FALSE);
>   server = gst_rtsp_server_new ();
>   mapping = gst_rtsp_server_get_media_mapping (server);
>   factory = gst_rtsp_media_factory_new ();
>   gst_rtsp_media_factory_set_launch (factory,
>         "( videotestsrc is-live=1 ! x264enc ! rtph264pay name=pay0 pt=96
> )");
>  
>   gst_rtsp_media_factory_set_shared (factory, TRUE);
>   gst_rtsp_media_mapping_add_factory (mapping, "/test", factory);
>   g_object_unref (mapping);
>   gst_rtsp_server_attach (server, NULL);
>   g_main_loop_run (loop);
> 
> 
> My app is able to launch and it seems to be working, since the android app
> does not crash :)
> In my terminal I look into the android device to see the open ports
> available or listening by executing the command $ cat /proc/net/tcp and I
> see that my device is listening on port 8554 which is the port coded for
> rtsp-server to use. I then try to use vlc to connect to it as such:
> rtsp://192.168.1.11:8554/test but I get an error saying "live555 error:
> Failed to connect with rtsp://192.168.1.11:8554/test"
> However, as vlc is trying to connect, I check the network connections on my
> android device and I see that my laptop is attempting or made a connection
> with my device because I see it when I run "cat /proc/net/tcp"
> So why is it failing? Does any one have any clue?

You might have to enable "Internet" permissions for your Android app.
Also try connecting to that RTSP stream with a GStreamer application.

Then check the GStreamer debug logs on the sender and receiver to check
where things go wrong.


Also from your description I assume you're using the old 0.10 version?
I'd recommend that you use 1.2.0 and gst-rtsp-server from latest git.
Use this cerbero repository for that:
http://cgit.freedesktop.org/gstreamer/sdk/cerbero/

The 1.2 branch will allow you to build the latest stable 1.2 version.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131001/059f5986/attachment.pgp>


More information about the gstreamer-devel mailing list