Android is strutting for Real Time Stream

Tim Müller tim at centricular.com
Thu Sep 21 13:24:58 UTC 2017


On Wed, 2017-09-20 at 14:13 -0300, Azure1 Sureale wrote:

Hi,

> 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).
> 
> 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

This is not the right way to reduce the latency.

What you need to do with playbin is: connect to the "source-setup"
signal and then in the callback you can set the "latency" property on
the source element if it's an rtspsrc. This will then configure the
rtpjitterbuffer latency of the jitterbuffer inside the rtspsrc element.
By default the latency is fairly high - 2seconds.

I have attached a patch to give you an idea how to do that, but I
haven't tested it. It might not even compile.

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com

Join us at the GStreamer Conference!
21-22 October 2017 in Prague, Czech Republic
http://gstreamer.freedesktop.org/conference/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-android-tutorial-5-add-source-setup-signal-example.patch
Type: text/x-patch
Size: 1991 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-android/attachments/20170921/02ac7a77/attachment.bin>


More information about the gstreamer-android mailing list