Android is strutting for Real Time Stream

Azure1 Sureale sureale.azure1 at gmail.com
Fri Sep 29 15:41:39 UTC 2017


Thank you Nicolas. Tim has given a similar solution last week.

We are now facing a new problem. We moved from ffserver to gst-rtps-server.
I explained the issue in a previous email.

On Thu, Sep 28, 2017 at 2:39 PM, Nicolas Dufresne <nicolas at ndufresne.ca>
wrote:

> Le mercredi 20 septembre 2017 à 14:13 -0300, Azure1 Sureale a écrit :
> > Hello, I'm trying to have an Android Player receiving a RTSP stream
> > from the internet and play it with very low latency.
> > I'm using Tutorial 5 from the GStreamer home. Without any change my
> > stream has a latency about 2 seconds (worst than Vitamio that I was
> > using previously).
>
> This is the default configuration on rtpsrc. Connect to "source-setup"
> signal on playbin, and then setup a lower latency. Here's a code
> snipet:
>
> static void
> source_setup_cb (GstElement *playbin, GstElement *source, gpointer
> user_data)
> {
>   if (g_str_equal ("GstRTSPSrc", g_type_name (source)))
>     g_object_set (source, "latency", 50, NULL); /* in ms */
> }
>
> {
>   ...
>   g_signal_connect (pipeline, "source-setup", G_CALLBACK
> (source_setup_cb), NULL, NULL);
>   ...
> }
>
>
>
> > With futher investigation we realized we could change the latency to
> > 0 in the pipeline using this code:
> >
> > ****************************************************************
> > data->pipeline = gst_parse_launch("playbin", &error);
> >     gst_pipeline_set_latency(data->pipeline,0); //This is what I
> > wrote
>
> That's won't work, since you'll have to display the frame before you
> even have started decoding them, it make no sense. It's better to
> configure the element, and let the normal latency workflow run.
>
> >
> >     if (error) {
> >     gchar *message = g_strdup_printf("Unable to build pipeline: %s",
> > error->message);
> >     g_clear_error (&error);
> >     set_ui_message(message, data);
> >     g_free (message);
> >     return NULL;
> >   }
> >
> > ****************************************************************
> >
> > Now the stream is strutting, alas dropping frames. However the stream
> > is faster than the base code.
> > Based on other questions, I tried to add rtpjitterbuffer into the
> > pipeline but seems that is not that simple.
> >
> > How can I construct or change the pipeline to have low latency and no
> > strutting?
>
> The configuration depends on your network, GStreamer don't implement
> dynamic latency, though you may implement it yourself by warning QoS
> event about dropped frame (to detect too low latency) and do some
> adjustment.
>
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170929/b529c944/attachment.html>


More information about the gstreamer-devel mailing list